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

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
}

/* LOGIN */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1C407D, #0f2f63);
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.20);
}

.login-brand h1 {
    color: #1C407D;
    font-size: 32px;
    margin-bottom: 8px;
}

.login-brand p {
    color: #6b7280;
    margin-bottom: 20px;
}

.custom-form p {
    margin-bottom: 16px;
}

.custom-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: #111827;
}

.custom-form input,
.custom-form select,
.custom-form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #fff;
    outline: none;
}

/* BOTÕES */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-block;
    padding: 12px 16px;
    background: #1C407D;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 16px;
    background: #F5D010;
    color: #111827;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
}

.btn-danger {
    display: inline-block;
    padding: 12px 16px;
    background: #b42318;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
}

/* HOME PÚBLICA */
.public-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1C407D, #0f2f63);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.public-wrapper {
    display: grid;
    grid-template-columns: 1fr 460px;
    gap: 40px;
    max-width: 1200px;
    width: 100%;
    align-items: center;
}

.public-hero {
    color: #fff;
}

.public-brand h1 {
    font-size: 56px;
    margin-bottom: 10px;
}

.public-brand p {
    font-size: 24px;
    opacity: 0.92;
    margin-bottom: 28px;
}

.public-copy h2 {
    font-size: 42px;
    margin-bottom: 10px;
}

.public-copy p {
    font-size: 20px;
    line-height: 1.5;
    max-width: 650px;
}

.public-form-card {
    background: #fff;
    padding: 32px;
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.public-form-card h3 {
    color: #1C407D;
    margin-bottom: 20px;
    font-size: 28px;
}

/* LAYOUT INTERNO */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #1C407D;
    color: #fff;
    padding: 24px 18px;
    position: sticky;
    top: 0;
    min-height: 100vh;
}

.sidebar-brand {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.sidebar-brand h2 {
    font-size: 28px;
    margin-bottom: 6px;
}

.sidebar-brand p {
    font-size: 14px;
    opacity: 0.88;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar nav a {
    display: block;
    color: #fff;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: 0.2s ease;
    font-weight: 600;
}

.sidebar nav a:hover {
    background: rgba(255,255,255,0.12);
}

.sidebar-footer {
    margin-top: 28px;
}

.sidebar-footer a {
    color: #F5D010;
    font-weight: 700;
    text-decoration: none;
}

.main-content {
    flex: 1;
    padding: 28px;
}

.topbar {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 24px;
}

.topbar h1 {
    font-size: 30px;
    color: #1C407D;
    margin-bottom: 6px;
}

.topbar p {
    color: #6b7280;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.card {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 16px;
    padding: 22px;
}

.card h3 {
    color: #1C407D;
    margin-bottom: 10px;
}

.card p {
    color: #4b5563;
    line-height: 1.5;
}

.section-box {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 16px;
    padding: 22px;
}

.section-box h2 {
    color: #1C407D;
    margin-bottom: 12px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.list-placeholder {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.list-item {
    background: #f8fafc;
    border: 1px solid #d9e2ec;
    border-radius: 12px;
    padding: 16px;
    line-height: 1.6;
}

.item-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.messages {
    margin-bottom: 18px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 700;
}

.errorlist {
    margin: 8px 0 0 18px;
    color: #b42318;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 10px;
    font-weight: bold;
    color: #1C407D;
}

.calendar-weekdays div {
    background: #eef3fa;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day {
    min-height: 140px;
    background: #f8fafc;
    border: 1px solid #d9e2ec;
    border-radius: 12px;
    padding: 10px;
}

.calendar-day--muted {
    opacity: 0.45;
}

.calendar-day--today {
    border: 2px solid #F5D010;
}

.calendar-day-number {
    font-weight: bold;
    margin-bottom: 10px;
    color: #1C407D;
}

.calendar-event {
    background: #e8f1ff;
    border: 1px solid #b2ccf5;
    color: #173B74;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
    margin-bottom: 6px;
    line-height: 1.4;
}

/* TABELAS */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
}

table th {
    background: #1C407D;
    color: #fff;
    text-align: left;
    padding: 14px;
    font-size: 14px;
}

table td {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* POPUP LEMBRETE */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.popup-box {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.popup-box h3 {
    color: #1C407D;
    margin-bottom: 12px;
    font-size: 24px;
}

.popup-box p {
    margin-bottom: 16px;
    line-height: 1.6;
    color: #374151;
}

/* RESPONSIVO */
@media (max-width: 1100px) {
    .cards {
        grid-template-columns: 1fr;
    }

    .section-header,
    .calendar-header,
    .public-wrapper {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .public-wrapper {
        display: flex;
    }

    .calendar-weekdays,
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        position: relative;
    }
}
