/* ==============================
   BASE LAYOUT
============================== */
.as-wrapper {
    width: 100%;
    min-height: 100vh;
}

.as-layout {
    display: flex;
    min-height: 100vh;
}

.as-sidebar {
    width: 240px;
    min-height: 100vh;
    padding: 25px;
    color: #fff;
    background: linear-gradient(180deg, #1B6024, #2e7d32);
}

.as-content {
    flex: 1;
    padding: 40px;
    background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 40%, #ecfdf5 100%);
}


/* =========================
   SIDEBAR MENU (GLOBAL)
========================= */
.as-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.as-menu-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;

    border-radius: 12px;
    border: none;

    background: transparent;
    color: #ffffff;

    text-align: left;
    text-decoration: none; /* ðŸ”¥ penting kalau pakai <a> */
    font-weight: 500;

    cursor: pointer;
    transition: all 0.2s ease;
}

/* =========================
   HOVER
========================= */
.as-menu-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}

/* =========================
   ACTIVE
========================= */
.as-menu-btn.active {
    background: #1B6024;
    color: #ffffff;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.15);
    transform: scale(1.02);
}

/* =========================
   LOGOUT (SPECIAL)
========================= */
.as-menu-btn.logout {
    color: #f87171;
}

.as-menu-btn.logout:hover {
    background: rgba(248,113,113,0.15);
    color: #fca5a5;
}


/* ==============================
   GRID
============================== */
.as-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
}

.as-col-left,
.as-col-right {
    display: flex;
    flex-direction: column;
}


/* ==============================
   CARD (GLASS)
============================== */
.as-card {
    padding: 25px;
    border-radius: 20px;

    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.5);

    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);

    box-shadow: 0 10px 40px rgba(0,0,0,0.08);

    transition: transform 0.25s ease;
}

.as-card:hover {
    transform: translateY(-4px);
}


/* ==============================
   CARD HEADER
============================== */
.as-card-header {
    align-items: center;
    gap: 18px;
}

.as-card-header .as-btn {
    margin-left: 10px;
}

.as-card-header > div {
    flex: 1;
    min-width: 0;
}

.as-card-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
}

.as-role {
    margin-top: 4px;
    font-size: 13px;
    color: #64748b;
}


/* ==============================
   CARD BODY
============================== */
.as-card-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: auto;
}


/* ==============================
   AVATAR
============================== */
.as-avatar {
    width: 64px;
    height: 64px;

    min-width: 64px;
    max-width: 64px;

    min-height: 64px;
    max-height: 64px;

    flex: none; /* STOP SEMUA FLEX INTERFERENCE */

    aspect-ratio: 1 / 1;

    border-radius: 50%;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(135deg, #1B6024, #2e7d32);
    color: #fff;

    font-weight: bold;
    font-size: 18px;

    box-shadow: 0 6px 16px rgba(59,130,246,0.3);
}


/* ==============================
   DATA ROW
============================== */
.as-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    padding: 12px 0;
    border-bottom: 1px solid rgba(148,163,184,0.2);
}

.as-row span {
    font-size: 12px;
    color: #94a3b8;
}

.as-row strong {
    font-size: 14px;
    color: #0f172a;
    text-align: right;
    max-width: 65%;
}

/* khusus alamat */
.as-row:last-child strong {
    font-size: 13px;
    line-height: 1.5;
}


/* ==============================
   TABLE
============================== */
.as-table-wrapper {
    padding: 20px;
    border-radius: 18px;

    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.5);

    backdrop-filter: blur(25px);

    overflow-x: auto;
}

.as-table {
    width: 100%;
    border-collapse: collapse;
}

.as-table-analytics th {
    background: rgba(27,96,36,0.9);
    color: #fff;
}

.as-table td {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.as-table tr:hover {
    background: rgba(27,96,36,0.08);
}

.as-table-scroll {
    max-height: 420px;
    overflow-y: auto;
}


/* ==============================
   MODAL
============================== */
.as-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.5);

    justify-content: center;
    align-items: center;

    z-index: 9999;
}

.as-modal-content {
    width: 650px;
    max-height: 90vh;
    overflow-y: auto;

    padding: 25px;

    background: #fff;
    border-radius: 14px;
}

.as-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.as-form-group {
    display: flex;
    flex-direction: column;
}

.as-form-group label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #475569;
}

.as-form-group input,
.as-form-group textarea {
    padding: 9px;
    border-radius: 8px;
    border: 1px solid #cbd5f5;
    font-size: 13px;
}

.as-form-group.as-full {
    grid-column: span 2;
}

.as-form-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap; /* penting */
}

@media (max-width: 600px) {
    .as-modal-content {
        width: 95%;
    }

    .as-form-grid {
        grid-template-columns: 1fr;
    }

    .as-form-group.as-full {
        grid-column: span 1;
    }
}

.as-modal input,
.as-modal textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
}

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 900px) {
    .as-grid {
        grid-template-columns: 1fr;
    }

    .as-sidebar {
        width: 200px;
    }

    .as-content {
        padding: 25px;
    }
}

.as-modal-content h3 {
    margin-bottom: 15px;
}

.as-modal label {
    font-size: 13px;
    margin-top: 8px;
    display: block;
}

.as-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;

    background: #1B6024;
    color: #fff;

    padding: 12px 18px;
    border-radius: 10px;

    font-size: 14px;

    opacity: 0;
    transform: translateY(20px);

    transition: all 0.3s ease;

    z-index: 99999;
}

.as-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
   MOBILE HEADER
========================= */
.as-mobile-header {
    display: none;
    align-items: center;
    padding: 12px;
    background: #1B6024;
    color: #fff;
}

.as-hamburger {
    font-size: 22px;
    background: rgba(255,255,255,0.15); /* semi transparan */
    border: none;
    color: #ffffff;
    margin-right: 10px;
    cursor: pointer;

    padding: 8px 12px;
    border-radius: 8px;

    transition: all 0.2s ease;
}

.as-hamburger:active {
    background: rgba(255,255,255,0.15) !important;
    color: #ffffff !important;
    outline: none;
    box-shadow: none;
}

.as-hamburger:focus-visible {
    outline: none;
}

.as-hamburger:hover {
    background: rgba(255,255,255,0.25) !important;
}

/* =========================
   MOBILE MODE
========================= */
@media (max-width: 768px) {

    .as-mobile-header {
        display: flex;
    }

    .as-sidebar {
        position: fixed;
        top: 0;
        left: -260px;
        width: 260px;
        height: 100%;
        background: linear-gradient(180deg, #1B6024, #2e7d32);
        transition: 0.3s;
        z-index: 999;
    }

    .as-sidebar.active {
        left: 0;
    }

    .as-content {
        width: 100%;
    }

    /* overlay */
    .as-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.3);
        display: none;
        z-index: 998;
    }

    .as-overlay.active {
        display: block;
    }
}

/* =========================
   PREMIUM TABLE (NEW)
========================= */
.as-total-table-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 6px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.as-total-table th,
.as-total-table td {
    border: 1px solid #e5e7eb;
}

.as-total-table tr:last-child td {
    border-bottom: none;
}

.as-total-table tr:hover {
    background: rgba(27,96,36,0.05);
}

/* =========================
   TABLE SCROLL DESKTOP
========================= */
.as-tab-menu {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.as-tab-menu .active {
    background: #1B6024;
    color: #fff;
}

/* =========================
   MOBILE FIX
========================= */
@media (max-width: 768px) {

    .as-form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .as-form-actions {
        justify-content: center;
        align-items: center;
    }

    .as-form-actions .as-btn {
        width: 100%;
        max-width: 100%; /* full biar konsisten */
    }

}

@media (max-width: 768px) {
    .as-tab-menu {
        flex-direction: column;
    }

    .as-tab-menu .as-btn {
        width: 100%;
    }
}

.as-form-group select,
.as-form-group input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #cbd5f5;
    font-size: 14px;
}

@media (max-width: 768px) {

    .as-card {
        padding: 18px;
        border-radius: 16px;
    }

    .as-content {
        padding: 20px;
    }

}

.as-btn-edit {
    background: transparent;
    color: #1B6024;
    border: 1px solid #1B6024;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.as-btn-edit:hover {
    background: #1B6024;
    color: #ffffff;
}

/* =========================
   BUTTON BASE
========================= */
.as-btn {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

/* =========================
   SECONDARY (TAB NON ACTIVE)
========================= */
.as-btn-secondary {
    background: transparent;
    color: #1B6024;
    border: 1px solid #1B6024;
}

/* HOVER SECONDARY */
.as-btn-secondary:hover {
    background: #1B6024;
    color: #ffffff;
}

/* =========================
   ACTIVE STATE (OVERRIDE)
========================= */
.as-tab-menu .active {
    background: #1B6024 !important;
    color: #ffffff !important;
    border: 1px solid #1B6024 !important;
}

/* =========================
   PRIMARY (TAMPILKAN)
========================= */
.as-btn-primary {
    background: #1B6024;
    color: #ffffff;
    border: 1px solid #1B6024;
}

.as-btn-primary:hover {
    background: #14501c;
}

/* =========================
   WARNING (EDIT MODE)
========================= */
.as-btn-warning {
    background: transparent;
    color: #1B6024;
    border: 1px solid #1B6024;
}

.as-btn-warning:hover {
    background: #1B6024;
    color: #ffffff;
}

/* =========================
   SUCCESS (SIMPAN)
========================= */
.as-btn-success {
    background: #2e7d32; /* sedikit lebih terang dari primary */
    color: #ffffff;
    border: 1px solid #2e7d32;
}

.as-btn-success:hover {
    background: #1B6024;
}

#asBtnEdit {
    background: transparent !important;
    color: #1B6024 !important;
    border: 1px solid #1B6024 !important;
}

#asBtnEdit:hover {
    background: #1B6024 !important;
    color: #ffffff !important;
}

#asChartAbsensi,
#asChartTahunan {
    width: 100% !important;
    height: 100% !important;
}

.as-chart-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;

    height: 300px;        /* 🔥 BATAS FIX */
    max-height: 300px;    /* 🔥 anti over */
}

#asBtnLoadChart {
    background: #1B6024;
    color: #fff;
    border: none;
}

#asBtnLoadChart:hover {
    background: #14501c;
}

/* =========================
   GRID 2 KOLOM
========================= */
.as-dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* SECTION */
.as-section {
    background: #ffffff;
    padding: 20px;
    border-radius: 16px;
}

/* CHART */
.as-chart-box {
    margin-top: 20px;
}

.as-chart-box canvas {
    width: 100% !important;
    height: 260px !important;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
    .as-dual-grid {
        grid-template-columns: 1fr;
    }
}

/* GRID KANAN */
.as-total-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* CARD */
.as-total-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* TITLE */
.as-total-card h4 {
    margin-bottom: 10px;
    color: #1B6024;
}

/* ROW */
.as-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

/* LABEL */
.as-total-row span {
    font-weight: bold;
    color: #666;
}

/* VALUE */
.as-total-row strong {
    color: #111;
}

/* MOBILE */
@media (max-width: 768px) {
    .as-total-grid {
        grid-template-columns: 1fr;
    }
}

.page-break-avoid {
    page-break-inside: avoid;
}

@media (max-width: 768px) {

    .as-total-table {
        font-size: 13px;
    }

    .as-total-table th {
        font-size: 11px;
        padding: 6px 8px;
        text-align: left;
        color: #94a3b8;
    }

    .as-total-table td {
        padding: 8px;
    }

    .as-total-table tr {
        height: auto;
    }

}

/* =========================
   PREMIUM TABLE REFINEMENT
========================= */

/* HEADER */
.as-total-table thead th {
    text-align: left;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
}

/* CELL */
.as-total-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
}

/* LAST ROW */
.as-total-table tr:last-child td {
    border-bottom: none;
}

/* JENIS */
.as-jenis {
    font-weight: 500;
    color: #0f172a;
}

/* NUMBER COLORS */
.as-hadir {
    color: #16a34a;
    font-weight: 600;
}

.as-izin {
    color: #f59e0b;
    font-weight: 600;
}

.as-alfa {
    color: #ef4444;
    font-weight: 600;
}

/* ROW HOVER */
.as-total-table tr:hover {
    background: rgba(27,96,36,0.04);
}

.as-total-table th:first-child,
.as-total-table td:first-child {
    width: 50%;
}

.as-total-table th:nth-child(2),
.as-total-table td:nth-child(2) {
    width: 16.66%;
}

.as-total-table th:nth-child(3),
.as-total-table td:nth-child(3) {
    width: 16.66%;
}

.as-total-table th:nth-child(4),
.as-total-table td:nth-child(4) {
    width: 16.66%;
}

.as-total-table td,
.as-total-table th {
    vertical-align: middle;
}

/* =========================
   BUTTON GROUP
========================= */
.as-btn-group {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

/* BASE */
.as-btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* PRIMARY */
.as-btn-primary {
    background: #1B6024;
    color: #fff;
}

/* SECONDARY */
.as-btn-secondary {
    background: #f1f5f9;
    color: #1B6024;
    border: 1px solid #e5e7eb;
}

/* HOVER */
.as-btn:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

/* ACTIVE */
.as-btn:active {
    transform: scale(0.98);
}

@media (max-width: 768px) {

    .as-btn-group {
        gap: 6px;
    }

    .as-btn {
        padding: 9px 10px;
        font-size: 12px;
        border-radius: 8px;
    }

}

/* =========================
   SECTION HEADER
========================= */
.as-section-header {
    margin-bottom: 10px;
}

.as-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}

/* DESKRIPSI */
.as-section-desc {
    font-size: 12px;
    color: #64748b;
}

.as-table-student th:nth-child(1),
.as-table-student td:nth-child(1) {
    width: 120px; /* NIS */
}

.as-table-student th:nth-child(2),
.as-table-student td:nth-child(2) {
    width: 180px; /* Nama */
}

.as-table-student th:nth-child(3),
.as-table-student td:nth-child(3) {
    width: 150px; /* WA */
}

.as-table-student th:nth-child(4),
.as-table-student td:nth-child(4) {
    width: 200px; /* Alamat */
}

.as-table-student th {
    font-size: 12px;
    color: #64748b;
    background: #f8fafc;
}

/* =========================
   STICKY FIRST COLUMN
========================= */
.as-table-student th:first-child,
.as-table-student td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;

    background: #ffffff;

    box-shadow: 2px 0 6px rgba(0,0,0,0.04);
}

/* HEADER STICKY */
.as-table-student th:first-child {
    z-index: 5;
    background: #f8fafc;
}

.as-table-student tr:hover {
    background: #f9fafb;
}

/* =========================
   STUDENT CARD
========================= */
.as-student-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px;
    margin-top: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    overflow: visible;
}

/* =========================
   HEADER
========================= */
.as-student-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.as-student-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.as-student-desc {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.as-student-count {
    background: rgba(27,96,36,0.08);
    color: #1B6024;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* =========================
   STUDENT TABLE SCROLL
========================= */
.as-student-table-scroll {

    position: relative;

    display: block;

    width: 100%;

    height: 520px;
    max-height: 520px;

    overflow-x: auto;
    overflow-y: auto;

    border: 1px solid #e5e7eb;
    border-radius: 16px;

    background: #ffffff;

    -webkit-overflow-scrolling: touch;
}

/* =========================
   STUDENT TABLE
========================= */
.as-table-student {

    width: 100%;
    min-width: 760px;

    border-collapse: collapse;
}

/* HEADER */
.as-table-student thead th {

    position: sticky;
    top: 0;

    z-index: 5;

    background: #f8fafc;

    font-size: 12px;
    color: #64748b;

    padding: 12px;
}

/* CELL */
.as-table-student td {

    padding: 12px;

    border-bottom: 1px solid #f1f5f9;

    vertical-align: top;

    white-space: normal;
    word-break: break-word;
    line-height: 1.5;
}

/* ROW HOVER */
.as-table-student tbody tr:hover {
    background: rgba(27,96,36,0.03);
}

/* COLUMN WIDTH */
.as-table-student th:nth-child(1),
.as-table-student td:nth-child(1) {
    min-width: 110px;
}

.as-table-student th:nth-child(2),
.as-table-student td:nth-child(2) {
    min-width: 180px;
}

.as-table-student th:nth-child(3),
.as-table-student td:nth-child(3) {
    min-width: 140px;
}

.as-table-student th:nth-child(4),
.as-table-student td:nth-child(4) {
    min-width: 260px;
}

/* STICKY FIRST COLUMN */
.as-table-student th:first-child,
.as-table-student td:first-child {

    position: sticky;
    left: 0;

    z-index: 3;

    background: #ffffff;

    box-shadow: 2px 0 6px rgba(0,0,0,0.04);
}

/* HEADER FIRST COLUMN */
.as-table-student th:first-child {

    z-index: 6;

    background: #f8fafc;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {

    .as-student-table-scroll {

        height: 70vh;
        max-height: 70vh;

        overflow-x: auto;
        overflow-y: auto;
    }

}

/* =========================
   MOBILE OVERFLOW FIX
========================= */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        width: 100%;
    }

}

@media (max-width: 768px) {

    .as-dashboard,
    .as-main,
    .as-content,
    .as-layout {
        flex-direction: column;
        width: 100%;
        overflow-x: hidden;
    }

}

@media (max-width: 768px) {

    .as-col-right {
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

}

.as-student-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}



/* =========================
   REKAP FILTER GRID
========================= */
.as-rekap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

/* ITEM */
.as-filter-item {
    display: flex;
    flex-direction: column;
}

/* LABEL */
.as-filter-item label {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}

/* INPUT */
.as-filter-item select,
.as-filter-item input {
    width: 100%;
}

/* ACTION */
.as-rekap-action {
    display: flex;
    justify-content: flex-start;
}

/* BUTTON */
.as-rekap-action .as-btn {
    min-width: 180px;
}

/* =========================
   REKAP RESULT WRAPPER
========================= */
.as-rekap-table-wrapper,
.as-total-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;

    margin-top: 20px;

    border-radius: 14px;

    -webkit-overflow-scrolling: touch;
}

/* TABLE INSIDE */
.as-rekap-table-wrapper table,
.as-total-table-wrapper table {
    min-width: 760px;
}

/* MOBILE */
@media (max-width: 768px) {

    .as-rekap-table-wrapper,
    .as-total-table-wrapper {

        overflow-x: auto;
        overflow-y: auto;

        max-width: 100%;

        border: 1px solid #e5e7eb;
        border-radius: 14px;
    }

}

.as-rekap-table-wrapper::-webkit-scrollbar,
.as-total-table-wrapper::-webkit-scrollbar {
    height: 6px;
}

/* =========================
   INPUT ABSENSI TABLE
========================= */

/* WRAPPER */
.as-input-table-wrapper {

    width: 100%;

    overflow-x: auto;
    overflow-y: auto;

    max-height: 72vh;

    margin-top: 18px;

    border: 1px solid #e5e7eb;
    border-radius: 18px;

    background: #ffffff;

    -webkit-overflow-scrolling: touch;
}

/* TABLE */
.as-input-table {

    width: 100%;
    min-width: 620px;

    border-collapse: collapse;
}

/* HEADER */
.as-input-table thead th {

    position: sticky;
    top: 0;

    z-index: 5;

    background: #f8fafc;

    padding: 16px 14px;

    font-size: 14px;
    font-weight: 700;

    color: #334155;

    border-bottom: 1px solid #e2e8f0;

    text-align: center;
}

/* CELL */
.as-input-table td {

    padding: 18px 14px;

    border-bottom: 1px solid #f1f5f9;

    vertical-align: middle;

    text-align: center;

    background: #ffffff;
}

/* ROW HOVER */
.as-input-table tbody tr:hover {
    background: rgba(27,96,36,0.03);
}

/* NAMA */
.as-input-table td:first-child {

    min-width: 220px;
    
    text-align: left;

    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;

    color: #1e293b;
}

/* INPUT NUMBER */
.as-input-table input[type="number"] {

    width: 56px;
    height: 56px;

    border-radius: 10px;
    border: 1px solid #dbe2ea;

    background: #ffffff;

    text-align: center;

    font-size: 24px;
    font-weight: 700;
    
    padding: 0;
    line-height: 56px;

    outline: none;

    transition: all 0.2s ease;
}

/* FOCUS */
.as-input-table input[type="number"]:focus {

    border-color: #1B6024;

    box-shadow: 0 0 0 4px rgba(27,96,36,0.08);
}

/* WARNA */
.as-input-table .as-hadir-input {
    color: #16a34a;
}

.as-input-table .as-izin-input {
    color: #f59e0b;
}

.as-input-table .as-alfa-input {
    color: #ef4444;
}

/* MOBILE */
@media (max-width: 768px) {

    .as-input-table-wrapper {

        max-height: 70vh;

        overflow-x: auto;
        overflow-y: auto;
    }

    .as-input-table {

        min-width: 680px;
    }

    .as-input-table td:first-child {

        min-width: 200px;

        font-size: 14px;
    }

    .as-input-table input[type="number"] {

        width: 56px;
        height: 56px;

        font-size: 24px;
    }

}

/* =========================
   DATA SANTRI MOBILE UI
========================= */

.as-student-stat-mobile {
    display: none;
}

@media (max-width: 768px) {

    /* profile */
    .as-avatar {
        width: 56px !important;
        height: 56px !important;
        font-size: 22px !important;
    }

    .as-card h2 {
        font-size: 28px !important;
        line-height: 1.1;
    }

    /* section spacing */
    .as-card h4 {
        font-size: 18px;
    }

    /* statistik wrapper */
    .as-card [style*="minmax("] {
        display: block !important;
    }

    /* compact row */
    .as-card [style*="border-radius:16px"] {

        border: none !important;
        background: transparent !important;
        border-bottom:
            1px solid #eef2f7 !important;

        border-radius: 0 !important;

        padding:
            14px 0 !important;

        margin: 0 !important;
    }

    /* title statistik */
    .as-card [style*="font-size:18px"] {

        font-size:
            17px !important;

        margin-bottom:
            8px !important;
    }

    /* desktop stat hidden */
    .as-student-stat-desktop {
        display: none;
    }

    /* mobile compact stat */
    .as-student-stat-mobile {

        display: block;

        color: #64748b;

        font-size: 14px;

        line-height: 1.6;
    }

    /* legend compact */
    .as-card span[style*="border-radius:999px"] {

        padding:
            3px 8px !important;

        font-size:
            12px !important;
    }
}

/* =====================================
   INPUT NILAI TABLE
===================================== */

#asNilaiResult .as-input-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
}

#asNilaiResult .as-input-table th {
    padding: 18px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
}

#asNilaiResult .as-input-table td {
    padding: 16px 20px;
    vertical-align: middle;
}

#asNilaiResult .as-input-table tr {
    height: 74px;
}

#asNilaiResult .as-input-table td:first-child {
    font-weight: 500;
    font-size: 16px;
}

#asNilaiResult .as-input-table td:nth-child(2),
#asNilaiResult .as-input-table td:nth-child(3) {
    text-align: center;
}

#asNilaiResult input[type="number"] {
    width: 80px;
    height: 38px;

    border-radius: 10px;
    border: 1px solid #d6dbe1;

    text-align: center;

    font-size: 15px;
    font-weight: 500;

    padding: 0 10px;

    background: #fff;
}

#asNilaiResult input[readonly] {
    background: #f8fafc;
    border-color: #e5e7eb;
}

#asNilaiResult input:focus {
    outline: none;
    border-color: #1e7a2e;
}
