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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #e6f2ff, #f5fbff);
    color: #123456;
    min-height: 100vh;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
}

.top-header {
    background: #0b63ce;
    color: #ffffff;
    padding: 0.75rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    color: #0b63ce;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.4);
}

.logo-text h1 {
    font-size: 1rem;
    line-height: 1.2;
}

.logo-text p {
    font-size: 0.8rem;
    opacity: 0.9;
}

.main-nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.main-nav a {
    color: #e8f2ff;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    border: 1px solid rgba(255,255,255,0.35);
    transition: background 0.2s, color 0.2s, transform 0.1s;
}

.main-nav a:hover {
    background: #ffffff;
    color: #0b63ce;
    transform: translateY(-1px);
}

.page-wrapper {
    padding: 1.5rem 0 3rem;
}

.page-header {
    margin-bottom: 1rem;
}

.page-header h2 {
    font-size: 1.4rem;
    margin-bottom: 0.35rem;
    color: #0c458c;
}

.page-header p {
    font-size: 0.9rem;
    color: #335577;
}

.hero-section {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

.hero-text {
    background: radial-gradient(circle at top left, rgba(255,255,255,0.95), rgba(225,241,255,0.9));
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(34, 84, 150, 0.25);
}

.hero-text h2 {
    font-size: 1.7rem;
    color: #0b4a94;
    margin-bottom: 0.5rem;
}

.hero-text p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #23405c;
}

.hero-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-highlight-card {
    background: rgba(11, 99, 206, 0.06);
    border-radius: 1.25rem;
    padding: 1.25rem;
    border: 1px solid rgba(11, 99, 206, 0.18);
    box-shadow: 0 8px 24px rgba(9, 45, 90, 0.18);
}

.hero-highlight-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #0c458c;
}

.hero-highlight-card ul {
    list-style: none;
}

.hero-highlight-card li {
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    padding-left: 0.9rem;
    position: relative;
}

.hero-highlight-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #0b63ce;
}

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

.card {
    background: rgba(255,255,255,0.98);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    color: #0c458c;
}

.card p {
    font-size: 0.9rem;
    color: #32506b;
    line-height: 1.5;
}

.info-band {
    margin-top: 1.5rem;
    background: linear-gradient(120deg, rgba(11,99,206,0.08), rgba(0,193,222,0.07));
    border-radius: 1rem;
    padding: 1rem 1.25rem;
}

.info-band h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
    color: #0c458c;
}

.info-band ol {
    margin-left: 1.1rem;
}

.info-band li {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn.primary {
    background: linear-gradient(135deg, #0b63ce, #0082e0);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(11, 99, 206, 0.35);
}

.btn.outline {
    background: transparent;
    color: #0b63ce;
    border-color: #0b63ce;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.two-column-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
    gap: 1rem;
    align-items: flex-start;
}

.column {
    min-width: 0;
}

.form-grid {
    display: grid;
    gap: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group label {
    font-size: 0.85rem;
    color: #254363;
}

.form-group input,
.form-group select {
    padding: 0.45rem 0.55rem;
    border-radius: 0.6rem;
    border: 1px solid #c3d9f2;
    font-size: 0.9rem;
    background: #f9fcff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0b63ce;
    box-shadow: 0 0 0 2px rgba(11,99,206,0.2);
}

.form-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.form-actions.align-right {
    justify-content: flex-end;
}

.table-wrapper {
    margin-top: 0.5rem;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(151, 181, 214, 0.6);
    background: rgba(255,255,255,0.9);
}

.table-wrapper.scrollable {
    overflow-x: auto;
}

.data-table,
.attendance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th,
.data-table td,
.attendance-table th,
.attendance-table td {
    border-bottom: 1px solid #dde8f6;
    padding: 0.4rem 0.35rem;
    text-align: center;
    white-space: nowrap;
}

.data-table thead,
.attendance-table thead {
    background: linear-gradient(135deg, #0b63ce, #0c8ad8);
    color: #ffffff;
}

.data-table tbody tr:nth-child(even),
.attendance-table tbody tr:nth-child(even) {
    background: rgba(237, 245, 255, 0.7);
}

.data-table tbody tr:hover,
.attendance-table tbody tr:hover {
    background: rgba(207, 229, 255, 0.7);
}

.data-table .empty-row {
    text-align: center;
    font-style: italic;
}

.name-col {
    text-align: left;
    min-width: 180px;
}

.link {
    font-size: 0.8rem;
    text-decoration: none;
    padding: 0.2rem 0.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.link:hover {
    background: rgba(11,99,206,0.08);
    border-color: rgba(11,99,206,0.3);
}

.link.danger {
    color: #b5162c;
}

.status-cell {
    min-width: 40px;
    padding: 0.1rem 0.2rem;
}

.status-select {
    width: 100%;
    padding: 0.1rem;
    border-radius: 0.45rem;
    border: 1px solid #c3d9f2;
    font-size: 0.75rem;
}

/* Color codes */
.status-cell.present,
.pill.present {
    background: rgba(32, 150, 83, 0.12);
    color: #1c7a43;
}

.status-cell.absent,
.pill.absent {
    background: rgba(220, 53, 69, 0.14);
    color: #a21729;
}

.status-cell.leave,
.pill.leave {
    background: rgba(255, 159, 67, 0.15);
    color: #c46806;
}

.status-cell.holiday,
.pill.holiday {
    background: rgba(111, 66, 193, 0.18);
    color: #5b2ca0;
}

.status-cell span {
    display: inline-block;
    font-weight: 600;
}

.totals {
    font-weight: 600;
}

.present-total { color: #1c7a43; }
.absent-total  { color: #a21729; }
.leave-total   { color: #c46806; }
.holiday-total { color: #5b2ca0; }

.day-label {
    font-size: 0.7rem;
    opacity: 0.85;
}

.attendance-header {
    margin-bottom: 0.5rem;
}

.attendance-header h3 {
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    margin: 0 0.12rem;
    border: 1px solid rgba(0,0,0,0.08);
}

.filter-card {
    margin-bottom: 0.75rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    align-items: flex-end;
}

.holiday-grid {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.4rem;
}

.holiday-cell {
    background: #f5f7ff;
    border-radius: 0.8rem;
    padding: 0.25rem 0.4rem;
    border: 1px solid #c3d9f2;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.holiday-cell input {
    accent-color: #6f42c1;
}

.holiday-cell.holiday {
    background: rgba(111, 66, 193, 0.12);
    border-color: rgba(111, 66, 193, 0.55);
}

.day-number {
    font-weight: 600;
}

.day-name {
    opacity: 0.75;
}

.report-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.report-header h3 {
    font-size: 1.1rem;
    color: #0c458c;
}

.report-header p {
    font-size: 0.85rem;
}

.report-footer {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    text-align: right;
    font-style: italic;
}

.site-footer {
    padding: 0.75rem 0;
    background: #0b63ce;
    color: #e8f3ff;
    margin-top: 1.5rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
}

.footer-inner .powered {
    font-weight: 500;
}

.alert {
    margin: 0.5rem 0;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
}

.alert.success {
    background: rgba(32, 150, 83, 0.14);
    color: #205638;
    border: 1px solid rgba(32, 150, 83, 0.4);
}

.alert.error {
    background: rgba(220, 53, 69, 0.18);
    color: #8b1b2c;
    border: 1px solid rgba(220, 53, 69, 0.5);
}

@media (max-width: 860px) {
    .hero-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .two-column-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .name-col {
        min-width: 140px;
    }
}

@media print {
    body {
        background: #ffffff;
    }

    .top-header,
    .site-footer,
    .no-print,
    .main-nav,
    .filter-card {
        display: none !important;
    }

    .page-wrapper {
        padding-top: 0;
    }

    .card {
        box-shadow: none;
    }
}
