:root {
    --primary-color: #FF6B35;
    --accent-color: #FF8C42;
    --light-orange: #FFB366;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --gray: #E9ECEF;
    --text-color: #2C3E50;
    --bg-color: #FFFFFF;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Poppins', sans-serif;
    --shadow: 0 4px 20px rgba(255, 107, 53, 0.15);
    --shadow-hover: 0 8px 30px rgba(255, 107, 53, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background: linear-gradient(135deg, var(--white) 0%, var(--light-gray) 100%);
    color: var(--text-color);
    line-height: 1.6;
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    width: 100%;
    box-shadow: var(--shadow);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.logo-container img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--primary-color);
    background-color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-icon {
    width: 18px;
    height: 18px;
}

nav a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.login-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 3rem 2.5rem;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--primary-color);
    z-index: 2;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

input, select, button {
    padding: 1rem 1.2rem;
    font-size: 1rem;
    border: 2px solid var(--gray);
    border-radius: 12px;
    transition: all 0.3s ease;
    background-color: var(--white);
    height: 56px;
    box-sizing: border-box;
    width: 100%;
}

.input-group input {
    padding-left: 3.5rem;
    padding-right: 1rem;
    line-height: 1.2;
    padding-top: 0;
    padding-bottom: 0;
    height: 56px;
    box-sizing: border-box;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    transform: translateY(-1px);
}

button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    font-weight: 600;
    cursor: pointer;
    border: none;
    padding: 1rem 1.2rem;
    font-size: 1.1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 56px;
}

.button-icon {
    width: 20px;
    height: 20px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

button:active {
    transform: translateY(0);
}

.message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    border: 1px solid;
    display: none;
}

.message:not(:empty) {
    display: block;
}

.error {
    background-color: #FFF5F5;
    color: #E53E3E;
    border-color: #FEB2B2;
}

.success {
    background-color: #F0FFF4;
    color: #38A169;
    border-color: #9AE6B4;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background-color: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray);
}

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

th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

tr:hover {
    background-color: var(--light-gray);
}

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

.grid input {
    background-color: var(--white);
}

h2 {
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.title-icon {
    width: 28px;
    height: 28px;
}

h3 {
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-orange);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.label-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

#dadosAluno {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray);
}

.nota-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin: 0.5rem 0;
    background-color: var(--light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.nota-materia {
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.materia-icon, .nota-icon, .welcome-icon, .freq-icon, .status-icon, .error-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.error-icon {
    color: #E53E3E;
}

.nota-valor {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.nota-boa {
    color: #38A169 !important;
}

.nota-media {
    color: #D69E2E !important;
}

.nota-ruim {
    color: #E53E3E !important;
}

.frequencia-info {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--light-orange) 0%, var(--accent-color) 100%);
    color: white;
    border-radius: 16px;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.frequencia-info h3 {
    color: white;
    border: none;
    margin: 0 0 1rem 0;
}

.frequencia-valor {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 2rem;
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray);
}

.form-section h3 {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .login-container {
        width: 90%;
        max-width: 380px;
        padding: 2.5rem 2rem;
        margin: 1rem auto;
    }

    nav {
        flex-direction: column;
        align-items: center;
    }

    h1 {
        font-size: 2rem;
    }

    .logo-container img {
        width: 40px;
        height: 40px;
    }

    .grid {
        grid-template-columns: 1fr;
    }
    
    .form-section {
        padding: 1.5rem;
    }
}
