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

:root {
    --primary-color: #1f2331;
    /* Dark Slate Navy */
    --primary-light: #3b4256;
    --primary-dark: #11141c;
    --secondary-color: #64748b;
    --accent-color: #3b82f6;
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

main {
    flex: 1;
    padding: 2rem 0;
}

/* Header */
.site-header {
    background-color: var(--surface-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border-color);
}

.header-top {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    color: white;
    padding: 1rem 0;
}

.header-top-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: left;
}

.site-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    background-color: white;
}

.header-top h1 {
    color: white;
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.header-top p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav-container {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.main-nav {
    display: flex;
    gap: 2rem;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

.main-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.main-nav a:hover,
.main-nav a.active {
    background-color: rgba(31, 35, 49, 0.1);
    color: var(--primary-dark);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    margin-left: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-light);
    color: white !important;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-light);
    color: var(--primary-light);
}

.btn-outline:hover {
    background-color: var(--primary-light);
    color: white;
}

/* Cards & Sections */
.card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

/* Footer */
.site-footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-col a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-color);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(31, 35, 49, 0.2);
    background-color: var(--surface-color);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 9999px;
    background-color: var(--border-color);
    color: var(--text-secondary);
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef9c3;
    color: #854d0e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #e0f2fe;
    color: #075985;
}

/* Dashboard layout */
.dashboard-container {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
}

.sidebar {
    width: 250px;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    height: fit-content;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    font-weight: 500;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: rgba(31, 35, 49, 0.1);
    color: var(--primary-dark);
}

.dashboard-content {
    flex: 1;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background-color: var(--surface-color);
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--bg-color);
    font-weight: 600;
    color: var(--text-primary);
}

tr:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.text-primary {
    color: var(--primary-dark);
}

.text-muted {
    color: var(--text-secondary);
}

/* Profile Card specific */
.profile-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.profile-img-placeholder {
    width: 80px;
    height: 80px;
    background-color: var(--primary-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
}

.profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.profile-info h3 {
    margin-bottom: 0.25rem;
}

.profile-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(17, 20, 28, 0.9), rgba(31, 35, 49, 0.8)), url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 6rem 1rem;
    text-align: center;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
}

.hero h2 {
    color: white;
    font-size: 2.5rem;
    max-width: 800px;
    margin: 0 auto 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Responsive Design & Mobile Menu */
.nav-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-dark);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle svg {
    display: block;
}

@media (min-width: 769px) {
    .nav-wrapper {
        justify-content: center;
    }
    
    .nav-container {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header-top-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .site-logo {
        width: 70px;
        height: 70px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-container {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--surface-color);
        box-shadow: var(--shadow-md);
        padding: 1.5rem;
        border-top: 1px solid var(--border-color);
        z-index: 100;
    }

    .nav-container.active {
        display: flex;
    }

    .main-nav {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .auth-buttons {
        margin-left: 0;
        margin-top: 1.5rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }

    .auth-buttons .btn {
        width: 100%;
    }

    /* General responsive tweaks */
    .header-top h1 {
        font-size: 1.2rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero {
        padding: 4rem 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-bottom: 1.5rem;
    }
}