@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Basic reset and body styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #111827; /* Dark background */
    color: #d1d5db; /* Lighter text */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background-color: #111827; /* Dark background */
}

/* Navigation bar */
.nav {
    background: rgba(31, 41, 55, 0.8); /* Dark background with blur */
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #374151; /* Darker border */
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav h1 {
    color: #f9fafb; /* Light text */
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    color: #9ca3af; /* Lighter gray */
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.nav-links a:hover {
    background-color: #374151; /* Darker hover */
    color: #f9fafb; /* White text on hover */
}

/* Cards */
.card {
    background: #1f2937; /* Dark card background */
    border-radius: 1rem; /* Softer, larger radius */
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); /* Subtle shadow */
    border: 1px solid #374151; /* Darker border */
    margin-bottom: 2rem;
}

.login-card {
    max-width: 400px;
    text-align: center;
}

.login-card h2, h3 {
    margin-bottom: 2rem;
    color: #f9fafb; /* Light text */
    font-weight: 600;
}

.register-link {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.register-link a {
    color: #4f46e5; /* A modern indigo */
    text-decoration: none;
    font-weight: 500;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #9ca3af; /* Lighter label color */
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #4b5563; /* Darker border */
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #374151; /* Dark input background */
    color: #f9fafb; /* Light text */
}

.form-control:focus {
    outline: none;
    border-color: #6366f1; /* Lighter indigo */
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25); /* Focus ring with new color */
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #4f46e5; /* Indigo */
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: #4338ca;
}

.btn-secondary {
    background-color: #4b5563; /* Gray */
    color: white;
    margin-top: 0.5rem;
}

.btn-danger {
    background-color: #ef4444; /* Red */
    color: white;
}

.btn-success {
    background-color: #22c55e; /* Green */
    color: white;
}


/* Table */
.table-container {
    overflow-x: auto;
    margin-top: 1.5rem;
    border: 1px solid #374151; /* Darker border */
    border-radius: 0.75rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #1f2937; /* Dark table background */
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #374151; /* Darker border */
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table th {
    background-color: #374151; /* Darker header */
    font-weight: 500;
    color: #9ca3af; /* Lighter header text */
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
}

.table th:hover {
    background-color: #4b5563; /* Hover effect */
}

.table tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.table tbody tr:hover {
    background-color: #374151; /* Darker row hover */
}

/* Filters and Type Selector */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.type-selector .type-option {
    display: inline-block;
}
.type-selector input[type="radio"] {
    display: none;
}
.type-selector label.btn {
    background-color: #374151; /* Dark background */
    border: 1px solid #4b5563; /* Darker border */
    cursor: pointer;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #d1d5db; /* Light text */
    border-radius: 0.5rem;
    margin-right: 5px;
    transition: all 0.2s ease-in-out;
}
.type-selector label.btn:hover {
    background-color: #4b5563; /* Darker hover */
    border-color: #6b7280;
}
.type-selector input[type="radio"]:checked + label.btn {
    background-color: #4f46e5;
    color: white;
    border-color: #4f46e5;
}


/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    min-width: 300px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border: 1px solid transparent;
}

.alert-success {
    background-color: #166534;
    color: #dcfce7;
    border-color: #22c55e;
}

.alert-error {
    background-color: #991b1b;
    color: #fee2e2;
    border-color: #ef4444;
}

/* Stats and Charts */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #1f2937; /* Dark card background */
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    border: 1px solid #374151;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #4f46e5;
}

.stat-label {
    color: #9ca3af; /* Lighter text */
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.chart-container {
    position: relative;
    height: 400px;
    margin-top: 1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.6); /* Darker overlay */
    backdrop-filter: blur(5px);
    z-index: 1000;
    padding: 1rem;
    overflow-y: auto;
}

.modal-content {
    background: #1f2937; /* Dark modal background */
    margin: 5% auto;
    padding: 2.5rem;
    border-radius: 1rem;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
    transition: color 0.2s ease-in-out;
}

.close:hover {
    color: #f9fafb; /* Light hover color */
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-container {
        font-size: 0.9rem;
    }
    .table th, .table td {
        padding: 0.75rem;
    }
}

.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}
