* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: linear-gradient(rgba(255,255,255,0.88), rgba(255,255,255,0.88)),
                url('https://images.unsplash.com/photo-1500937386664-56d1dfef3854?auto=format&fit=crop&w=1400&q=80') center/cover no-repeat fixed;
    color: #1b4332;
    min-height: 100vh;
}

.navbar {
    background-color: #1b5e20;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo {
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links li a {
    text-decoration: none;
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    transition: 0.3s ease;
    padding-bottom: 4px;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: #d8f3dc;
    border-bottom: 2px solid #d8f3dc;
}

.hero {
    text-align: center;
    padding: 80px 20px 40px;
}

.hero h1 {
    font-size: 42px;
    color: #1b5e20;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.7);
}

.floating-text-container {
    overflow: hidden;
    white-space: nowrap;
    background: rgba(27, 94, 32, 0.92);
    color: #fff;
    padding: 14px 0;
    margin: 20px auto 40px;
    width: 90%;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.floating-text {
    display: inline-block;
    padding-left: 100%;
    animation: scrollText 14s linear infinite;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

@keyframes scrollText {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.cards-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 80px;
}

.section-title {
    text-align: center;
    font-size: 30px;
    color: #1b5e20;
    margin-bottom: 35px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.card {
    background: rgba(255, 255, 255, 0.96);
    border: 2px solid #2e7d32;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.card h3 {
    color: #1b5e20;
    font-size: 22px;
    margin-bottom: 12px;
}

.card p {
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.card button {
    background: #2e7d32;
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.card button:hover {
    background: #1b5e20;
}

.footer {
    background: #1b5e20;
    color: #fff;
    text-align: center;
    padding: 18px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 12px;
        padding: 20px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .floating-text {
        font-size: 18px;
    }
}

/* backend form styles */
.form-page {
    max-width: 1100px;
    margin: 30px auto 80px;
    padding: 0 20px;
}

.form-box,
.table-box {
    background: rgba(255, 255, 255, 0.96);
    border: 2px solid #2e7d32;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    margin-bottom: 30px;
}

.form-title {
    color: #1b5e20;
    text-align: center;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.btn {
    background: #2e7d32;
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    margin-top: 10px;
}

.btn:hover {
    background: #1b5e20;
}

.message {
    max-width: 1100px;
    margin: 20px auto;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: bold;
}

.success {
    background: #d8f3dc;
    color: #1b5e20;
}

.error {
    background: #ffd6d6;
    color: #8b0000;
}

.table-box {
    overflow-x: auto;
}

.table-box table {
    width: 100%;
    border-collapse: collapse;
}

.table-box th,
.table-box td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.table-box th {
    background: #1b5e20;
    color: #fff;
}
.form-page {
    max-width: 1150px;
    margin: 40px auto 80px;
    padding: 0 20px;
}

.form-box,
.table-box {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid #dce8dc;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.10);
    margin-bottom: 30px;
}

.form-title {
    text-align: center;
    color: #1b5e20;
    font-size: 32px;
    margin-bottom: 8px;
}

.form-subtitle {
    text-align: center;
    color: #555;
    margin-bottom: 25px;
    font-size: 15px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: bold;
    color: #1b4332;
    margin-bottom: 8px;
    font-size: 15px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cfd8cf;
    border-radius: 10px;
    font-size: 15px;
    background: #f9fffa;
    outline: none;
    transition: 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
    background: #fff;
}

.form-actions {
    margin-top: 25px;
    text-align: center;
}

.btn {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    transition: 0.3s ease;
    box-shadow: 0 6px 14px rgba(46, 125, 50, 0.25);
}

.btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #1b5e20, #145a1f);
}

.message {
    max-width: 1150px;
    margin: 20px auto;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: bold;
}

.success {
    background: #d8f3dc;
    color: #1b5e20;
    border-left: 5px solid #2e7d32;
}

.table-box {
    overflow-x: auto;
}

.table-box table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table-box th,
.table-box td {
    padding: 14px;
    border-bottom: 1px solid #e6e6e6;
    text-align: left;
    font-size: 15px;
}

.table-box th {
    background: #1b5e20;
    color: #fff;
    font-size: 15px;
}

.table-box tr:nth-child(even) {
    background: #f7fbf7;
}

.table-box tr:hover {
    background: #eef7ee;
}

.empty-state {
    text-align: center;
    color: #666;
    padding: 25px;
}

@media (max-width: 768px) {
    .form-box,
    .table-box {
        padding: 20px;
    }

    .form-title {
        font-size: 26px;
    }
}
.image-slider {
    width: 95%;
    margin: 25px auto 0;
    overflow: hidden;
    position: relative;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.35);
    padding: 18px 0;
}

.image-track {
    display: flex;
    width: max-content;
    animation: scrollImages 35s linear infinite;
    gap: 20px;
}

.image-track img {
    width: 260px;
    height: 180px;
    object-fit: cover;
    border-radius: 16px;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    transition: transform 0.3s ease;
}

.image-track img:hover {
    transform: scale(1.05);
}

@keyframes scrollImages {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .image-track img {
        width: 200px;
        height: 140px;
    }
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid #dce8dc;
    border-radius: 18px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.10);
}

.stat-card h3 {
    color: #1b5e20;
    margin-bottom: 10px;
    font-size: 22px;
}

.stat-card p {
    font-size: 34px;
    font-weight: bold;
    color: #2e7d32;
}

.status-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 14px;
}

.status-badge.present {
    background: #d8f3dc;
    color: #1b5e20;
}

.status-badge.late {
    background: #fff3cd;
    color: #8a6d1d;
}
.portal-container {
    max-width: 1100px;
    margin: 40px auto 80px;
    padding: 0 20px;
}

.auth-box,
.portal-box,
.table-box,
.print-box {
    background: rgba(255,255,255,0.97);
    border: 1px solid #dce8dc;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.10);
    margin-bottom: 30px;
}

.auth-box {
    max-width: 520px;
    margin: 40px auto;
}

.form-title {
    text-align: center;
    color: #1b5e20;
    font-size: 30px;
    margin-bottom: 10px;
}

.form-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #1b4332;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 13px 14px;
    border: 1px solid #cfd8cf;
    border-radius: 10px;
    font-size: 15px;
    background: #f9fffa;
    outline: none;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    margin-top: 20px;
    text-align: center;
}

.btn,
.action-btn {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    margin: 4px;
}

.btn:hover,
.action-btn:hover {
    opacity: 0.95;
}

.btn-secondary {
    background: #f3f7f3;
    color: #1b5e20;
    border: 1px solid #bcd4bc;
}

.btn-danger {
    background: #c62828;
    color: #fff;
}

.message {
    max-width: 1100px;
    margin: 20px auto;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: bold;
}

.success {
    background: #d8f3dc;
    color: #1b5e20;
    border-left: 5px solid #2e7d32;
}

.error {
    background: #ffd6d6;
    color: #8b0000;
    border-left: 5px solid #c62828;
}

.info {
    background: #e8f4ff;
    color: #0b5394;
    border-left: 5px solid #0b5394;
}

.table-box {
    overflow-x: auto;
}

.table-box table {
    width: 100%;
    border-collapse: collapse;
}

.table-box th,
.table-box td {
    border-bottom: 1px solid #e6e6e6;
    padding: 12px;
    text-align: left;
}

.table-box th {
    background: #1b5e20;
    color: #fff;
}

.table-box tr:nth-child(even) {
    background: #f7fbf7;
}

.badge {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
}

.badge.pending {
    background: #fff3cd;
    color: #8a6d1d;
}

.badge.approved {
    background: #d8f3dc;
    color: #1b5e20;
}

.badge.rejected {
    background: #ffd6d6;
    color: #8b0000;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    background: #f7fbf7;
    border-radius: 10px;
    padding: 12px;
}

.detail-item strong {
    display: block;
    color: #1b5e20;
    margin-bottom: 6px;
}

.print-header {
    text-align: center;
    margin-bottom: 25px;
}

.print-header h1 {
    color: #1b5e20;
    margin-bottom: 8px;
}

.print-note {
    margin-top: 25px;
    padding: 15px;
    background: #f8fff8;
    border-left: 4px solid #2e7d32;
}

@media print {
    .navbar,
    .quick-links,
    .no-print {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .print-box {
        box-shadow: none;
        border: none;
        margin: 0;
        padding: 0;
    }
}
.official-letter {
    width: 800px;
    margin: 30px auto;
    background: #ffffff;
    padding: 50px 60px;
    color: #000;
    font-family: "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.7;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.letterhead {
    text-align: center;
}

.letterhead h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

.letterhead h1 {
    font-size: 24px;
    color: #1b5e20;
    margin-bottom: 5px;
}

.letterhead h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.letterhead p {
    font-size: 15px;
}

.letterhead hr,
.letter-footer hr {
    border: none;
    border-top: 2px solid #1b5e20;
    margin: 15px 0;
}

.letter-meta {
    display: flex;
    justify-content: space-between;
    margin: 25px 0;
}

.letter-title {
    text-align: center;
    text-decoration: underline;
    color: #1b5e20;
    margin: 25px 0;
}

.letter-footer {
    margin-top: 40px;
    text-align: center;
    font-size: 13px;
    color: #555;
}

@media print {
    body {
        background: #fff !important;
    }

    .official-letter {
        width: 100%;
        margin: 0;
        padding: 30px;
        box-shadow: none;
    }

    .no-print {
        display: none !important;
    }
}
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.dashboard-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 14px;
    border-left: 6px solid #2e7d32;
    box-shadow: 0 8px 22px rgba(0,0,0,0.10);
    transition: 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-card h4 {
    color: #1b5e20;
    margin-bottom: 10px;
    font-size: 16px;
}

.dashboard-card p {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    word-break: break-word;
}
.danger-btn {
    background: #c62828;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.danger-btn:hover {
    background: #8e0000;
}
.danger-btn {
    background: #c62828;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
}

.danger-btn:hover {
    background: #8e0000;
}
.signature-box {
    margin-top: 30px;
    margin-bottom: 5px;
}

.signature-box img {
    max-width: 180px;
    max-height: 90px;
    object-fit: contain;
}
.qr-section {
    margin-top: 30px;
    text-align: right;
}

.qr-section img {
    width: 140px;
    height: 140px;
    border: 1px solid #ccc;
    padding: 5px;
}

.qr-note {
    font-size: 12px;
    color: #555;
}
/* A4 page setup */
@page {
    size: A4;
    margin: 20mm;
}

/* A4 container */
.official-letter {
    width: 210mm;
    min-height: 297mm;
    margin: auto;
    background: #ffffff;
    padding: 25mm 20mm;
    box-sizing: border-box;
    font-family: "Times New Roman", serif;
    color: #000;
    line-height: 1.6;
}

/* Print optimization */
@media print {
    body {
        margin: 0;
        background: #fff;
    }

    .official-letter {
        width: 100%;
        min-height: auto;
        padding: 20mm;
        box-shadow: none;
    }

    .no-print {
        display: none !important;
    }
}
.qr-section img {
    width: 100px;
    height: 100px;
}
.signature-box img {
    max-width: 150px;
    max-height: 80px;
}
.official-letter p {
    margin: 8px 0;
    font-size: 15px;
}
/* Signature area */
.signature-box {
    margin-top: 30px;
}

/* QR positioned bottom-right */
.qr-section {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.official-letter {
    position: relative;
}

/* Stick QR bottom right */
.qr-section {
    position: absolute;
    bottom: 40px;
    right: 40px;
}
.official-letter {
    padding-bottom: 80px;
}