:root {
    /* Color Palette - Premium Modern (Indigo/Slate/Emerald) */
    --primary-color: #4f46e5;
    /* Indigo 600 */
    --primary-hover: #4338ca;
    /* Indigo 700 */
    --secondary-color: #10b981;
    /* Emerald 500 */
    --accent-color: #f59e0b;
    /* Amber 500 */

    --bg-body: #f8fafc;
    /* Slate 50 */
    --bg-card: #ffffff;
    --text-main: #1e293b;
    /* Slate 800 */
    --text-muted: #64748b;
    /* Slate 500 */
    --border-color: #e2e8f0;
    /* Slate 200 */

    --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);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html[data-theme="dark"] {
    --bg-body: #0f172a;
    /* Slate 900 */
    --bg-card: #1e293b;
    /* Slate 800 */
    --text-main: #f1f5f9;
    /* Slate 100 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --border-color: #334155;
    /* Slate 700 */

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);

    /* Adjust headings color override from line 54 if needed, usually text-main covers it unless specifically overridden */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border_box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    /* Slate 900 */
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 2rem;
    max-width: 1920px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: none;
    font-size: 1rem;
    width: 70%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    width: 70%;

}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    width: 70%;
}

.btn-secondary:hover {
    background-color: #eef2ff;
}

/* Header */
header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Footer */
footer {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 3rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Landing Page Hero */
.hero {
    padding: 5rem 0;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    background: -webkit-linear-gradient(45deg, #4f46e5, #0ea5e9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: left;
    transition: transform 0.2s;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Authentication */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 70px - 200px);
    /* Adjust based on header/footer */
    padding: 2rem;
    background-color: #f1f5f9;
}

.auth-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    border: 1px solid var(--border-color);
}

.avaliacao-auth-card {
    background: white;
    padding: 4rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 80%;
    border: 1px solid var(--border-color);
}

.evaluation-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 900px;
    /* Wider for evaluations */
    margin: 0 auto;
    /* Center alignment */
    border: 1px solid var(--border-color);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 1.75rem;
    color: #1e293b;
}

.auth-header p {
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #334155;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.btn-block {
    display: block;
    width: 70%;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.tab-link {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
}

.tab-link:hover {
    color: var(--primary-color);
}

.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections */
.form-section-title {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media print {

    header,
    footer,
    .tabs,
    .btn,
    .no-print {
        display: none !important;
    }

    .tab-content {
        display: block !important;
        page-break-after: always;
    }

    .container {
        width: 100%;
        max-width: none;
        padding: 0;
    }
}

/* Responsive Styles */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* Mobile Table Cards Strategy */
@media (max-width: 768px) {

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    /* Hide headers (but not display:none to prevent accessibility issues if meaningful)
       Actually for card view we hide head */
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        margin-bottom: 1rem;
        background: white;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        box-shadow: var(--shadow-sm);
        padding: 1rem;
    }

    td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50% !important;
        /* Make space for label */
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        text-align: right;
    }

    td:last-child {
        border-bottom: none;
    }

    td:before {
        position: absolute;
        top: 0.5rem;
        left: 0.5rem;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        text-align: left;
        color: var(--text-muted);
        content: attr(data-label);
    }
}

/* Navigation Desktop */
nav {
    display: flex;
    align-items: center;
}

@media (max-width: 1024px) {
    .header-inner {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--bg-card);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        box-shadow: var(--shadow-md);
    }

    nav.active {
        display: flex;
    }

    nav a,
    nav button {
        margin-right: 0 !important;
        width: 100%;
        display: block;
        text-align: left;
        padding: 0.5rem 0;
    }

    nav div {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-left: 0 !important;
        gap: 1rem;
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .container,
    .container-fluid {
        padding: 0 1.5rem;
    }

    .auth-card,
    .evaluation-card {
        padding: 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }
}

/* Evaluation Dashboard */
.bimestre-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.bimestre-selector .btn {
    flex: 1;
    min-width: 120px;
    padding: 1rem;
    font-size: 1.1rem;
    width: 70%;
}

.app-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    height: 100%;
    gap: 2rem;
    display: flex;
    flex-direction: column;
}

.management-card {
    background: #f0fdf4;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
    height: 100%;
}

.tutor-card {
    background: #fffbeb;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #fcd34d;
}

html[data-theme="dark"] .app-card {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .management-card {
    background: #14532d;
    /* Green 900 */
    border-color: #166534;
}

html[data-theme="dark"] .tutor-card {
    background: #713f12;
    /* Yellow 900 */
    border-color: #854d0e;
}