/* ==========================================================
   style.css
   ----------------------------------------------------------
   Custom styles for OTOPS on top of Bootstrap 5.
   Color scheme: dark green + yellow, matching the DepEd
   Schools Division of Nueva Vizcaya seal.
   ========================================================== */

:root {
    --otops-primary: #0d3d28;       /* dark green */
    --otops-primary-dark: #072318;  /* deeper green for gradients/hover */
    --otops-accent: #f9c412;        /* yellow, from the seal's rays */
    --otops-accent-dark: #d9a800;
}

/* ---------- Decorative letterhead fonts ---------- */
/* Self-hosted (not loaded from Google's CDN) so the app keeps working
   on restricted/offline school networks. Open-license stand-ins for
   the official template's licensed "Old English Text MT" (blackletter)
   and "Trajan Pro" (engraved capitals) fonts. */
@font-face {
    font-family: 'Grenze Gotisch';
    src: url('../fonts/GrenzeGotisch-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Grenze Gotisch';
    src: url('../fonts/GrenzeGotisch-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cinzel';
    src: url('../fonts/Cinzel-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cinzel';
    src: url('../fonts/Cinzel-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

body.app-body {
    background-color: #f2f4f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Navbar ---------- */
.app-navbar {
    background: linear-gradient(90deg, var(--otops-primary), var(--otops-primary-dark));
    border-bottom: 3px solid var(--otops-accent);
}

.app-navbar .navbar-brand img {
    height: 32px;
    width: 32px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.app-navbar .navbar-brand img.waypoint-logo-img {
    background: #fff;
    border-radius: 50%;
    padding: 2px;
}

.app-navbar .nav-link.active {
    color: var(--otops-accent) !important;
    font-weight: 600;
}

/* ---------- Footer ---------- */
.app-footer {
    margin-top: auto;
    background-color: #ffffff;
    border-top: 3px solid var(--otops-accent);
}

/* ---------- Login Page ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--otops-primary) 0%, var(--otops-primary-dark) 100%);
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.login-card .card-header {
    background-color: var(--otops-primary);
    color: #fff;
    text-align: center;
    padding: 2rem 1.5rem 1.25rem;
    border-bottom: 4px solid var(--otops-accent);
}

.login-card .card-header .app-logo-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #fff;
    padding: 4px;
    box-shadow: 0 0 0 3px var(--otops-accent);
}

.login-card .card-body {
    padding: 2rem 1.75rem;
}

.login-card .btn-login {
    background-color: var(--otops-primary);
    border-color: var(--otops-primary);
    color: #fff;
}

.login-card .btn-login:hover {
    background-color: var(--otops-accent-dark);
    border-color: var(--otops-accent-dark);
    color: #1a1a1a;
}

.demo-accounts {
    font-size: 0.8rem;
}

/* ---------- Dashboard placeholder cards ---------- */
.welcome-card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.06);
}

.stat-card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease-in-out;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card .stat-icon {
    font-size: 1.75rem;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.module-placeholder {
    border: 2px dashed #c7cdd6;
    border-radius: 0.75rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: #6c757d;
    background-color: #fbfcfd;
}

/* ---------- Buttons (brand override) ---------- */
.btn-primary {
    background-color: var(--otops-primary);
    border-color: var(--otops-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--otops-primary-dark);
    border-color: var(--otops-primary-dark);
}

.btn-outline-primary {
    color: var(--otops-primary);
    border-color: var(--otops-primary);
}

.btn-outline-primary:hover {
    background-color: var(--otops-primary);
    border-color: var(--otops-primary);
}

/* ---------- Travel Authority form look ---------- */
/* Font sizes/families and logo dimensions below are taken
   directly from the official DepEd Schools Division of Nueva
   Vizcaya "TRAVEL-ORDER.docx" template (header2.xml/footer2.xml,
   the variant actually used since the template has "different
   first page" enabled). Decorative fonts (Old English Text MT,
   Trajan Pro, Bookman Old Style) are declared with the same
   generic-family fallback chain Word itself would use, so
   systems that have them installed render identically, and
   others degrade gracefully to a serif font. */
.travel-authority-card {
    max-width: 900px;
    margin: 0 auto;
}

.travel-authority-header-img {
    max-width: 100%;
    width: 620px;
    height: auto;
}

.travel-authority-title {
    font-family: 'Bookman Old Style', 'Georgia', serif;
    font-weight: bold;
    font-size: 11pt;
    text-transform: uppercase;
}

.travel-authority-rule {
    border: none;
    border-top: 1.5px solid var(--otops-primary);
    border-bottom: 1px solid var(--otops-primary);
    height: 4px;
    opacity: 1;
}

.travel-authority-table th,
.travel-authority-table td {
    font-family: 'Bookman Old Style', 'Georgia', serif;
    font-size: 11pt;
    vertical-align: middle;
}

.travel-authority-table th {
    background-color: #f4f7f4;
    width: 32%;
}

.travel-authority-footer-logos {
    /* Source: footer2.xml wp:extent 1180891 x 612017 EMU = 1.291in x 0.669in */
    width: 124px;
    height: 64px;
    object-fit: contain;
    opacity: 0.55;
}

.travel-authority-footer-seal {
    /* Source: footer2.xml wp:extent 474854 x 472656 EMU = 0.519in x 0.517in */
    width: 50px;
    height: 50px;
    object-fit: contain;
    opacity: 0.55;
}

.travel-authority-footer-contact {
    font-family: 'Times New Roman', Times, serif;
    font-weight: bold;
    font-size: 9pt;
    color: #333;
    text-align: left;
}

.travel-authority-footer-contact div {
    line-height: 1.6;
}

.travel-authority-footer-contact i {
    /* Matches the exact icon color sampled from the original
       template's icon images (RGB ~118, 210, 15). */
    color: #76d20f;
}

/* ---------- Attestation / signature box ---------- */
.travel-authority-attestation-box {
    border: 1px solid #adb5bd;
    border-radius: 0.25rem;
}

.travel-authority-attestation-box .box-section {
    padding: 0.9rem 1rem;
}

.travel-authority-attestation-box .box-section + .box-section {
    border-top: 1px solid #dee2e6;
}

.e-signature-box {
    background-color: #f4f9f5;
    border: 1px solid #d9e6dc;
    border-radius: 0.5rem;
}

.signature-block {
    padding-top: 2.25rem;
    margin-top: 0.75rem;
}

.signature-block .signature-name-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.signature-block .signature-name {
    font-weight: 600;
    font-family: 'Brush Script MT', cursive;
    font-size: 1.25rem;
    color: var(--otops-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.signature-block .signature-date {
    font-size: 0.78rem;
    color: #198754;
    font-style: italic;
    white-space: nowrap;
}

.signature-block .signature-meta {
    font-size: 0.78rem;
    color: #6c757d;
    font-style: italic;
}

.signature-block .signature-line {
    font-size: 0.8rem;
    color: #6c757d;
}

.signature-block-pending {
    border-top: 1px dashed #adb5bd;
    color: #6c757d;
    font-style: italic;
    padding-top: 0.75rem;
}

.signature-block-rejected {
    border-top: 1px solid #dc3545;
    padding-top: 0.5rem;
}

/* ---------- Date-range calendar widget ---------- */
.date-range-calendar-month {
    margin-bottom: 1rem;
}

.date-range-calendar-title {
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 0.4rem;
    color: var(--otops-primary);
}

.date-range-calendar-grid {
    width: 100%;
    border-collapse: collapse;
}

.date-range-calendar-grid th {
    font-size: 0.7rem;
    color: #6c757d;
    font-weight: 600;
    text-align: center;
    padding: 0.15rem 0;
}

.date-range-calendar-grid td {
    text-align: center;
    padding: 1px;
}

.date-range-day {
    width: 26px;
    height: 26px;
    line-height: 26px;
    margin: 0 auto;
    font-size: 0.75rem;
    border-radius: 50%;
    color: #495057;
}

.date-range-day-in-range {
    background-color: rgba(13, 61, 40, 0.12);
    color: var(--otops-primary);
    font-weight: 600;
}

.date-range-day-start,
.date-range-day-end {
    background-color: var(--otops-primary);
    color: #fff;
    font-weight: 700;
}
