/* =========================================================
   CEK KEHADIRAN MAHASISWA
   FULL RESPONSIVE CSS
========================================================= */


/* =========================================================
   RESET
========================================================= */

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

html {
    width: 100%;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;

    font-family:
        "Segoe UI",
        Arial,
        Helvetica,
        sans-serif;

    color: #172033;

    overflow-x: hidden;

    background:
        radial-gradient(
            circle at 5% 5%,
            rgba(37, 99, 235, 0.30),
            transparent 28%
        ),
        radial-gradient(
            circle at 95% 15%,
            rgba(99, 102, 241, 0.20),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 95%,
            rgba(6, 182, 212, 0.28),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #dbeafe 0%,
            #f8fafc 48%,
            #cffafe 100%
        );
}


/* =========================================================
   BACKGROUND GLOW
========================================================= */

body::before {
    content: "";

    position: fixed;

    width: 420px;
    height: 420px;

    top: -180px;
    left: -150px;

    border-radius: 50%;

    background: rgba(37, 99, 235, 0.25);

    filter: blur(100px);

    pointer-events: none;

    z-index: -1;
}

body::after {
    content: "";

    position: fixed;

    width: 420px;
    height: 420px;

    right: -170px;
    bottom: -190px;

    border-radius: 50%;

    background: rgba(6, 182, 212, 0.25);

    filter: blur(100px);

    pointer-events: none;

    z-index: -1;
}


/* =========================================================
   CONTAINER
========================================================= */

.container {
    width: 100%;
    min-height: 100vh;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 45px 20px;
}


/* =========================================================
   MAIN CARD
========================================================= */

.card {
    position: relative;

    width: 100%;
    max-width: 680px;

    padding: 42px;

    border-radius: 28px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.96),
            rgba(255, 255, 255, 0.82)
        );

    border: 1px solid
        rgba(255, 255, 255, 0.95);

    box-shadow:
        0 30px 80px
        rgba(15, 23, 42, 0.15),

        0 10px 30px
        rgba(37, 99, 235, 0.08);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    overflow: hidden;

    animation: cardAppear 0.6s ease;
}


/* =========================================================
   CARD TOP LINE
========================================================= */

.card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 5px;

    background:
        linear-gradient(
            90deg,
            #2563eb,
            #06b6d4,
            #6366f1
        );
}


/* =========================================================
   CARD DECORATION
========================================================= */

.card::after {
    content: "";

    position: absolute;

    width: 220px;
    height: 220px;

    right: -100px;
    top: -100px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(59, 130, 246, 0.09),
            transparent 70%
        );

    pointer-events: none;
}


/* =========================================================
   CARD ANIMATION
========================================================= */

@keyframes cardAppear {

    from {
        opacity: 0;

        transform:
            translateY(25px)
            scale(0.98);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}


/* =========================================================
   HEADER
========================================================= */

.header {
    position: relative;

    text-align: center;

    margin-bottom: 32px;

    z-index: 2;
}


/* =========================================================
   LOGO
========================================================= */

.icon {
    width: 125px;
    height: 125px;

    margin: 0 auto 20px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #eff6ff
        );

    border: 5px solid
        rgba(255, 255, 255, 0.95);

    box-shadow:
        0 15px 35px
        rgba(37, 99, 235, 0.16),

        0 0 0 9px
        rgba(59, 130, 246, 0.055);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.icon:hover {
    transform:
        translateY(-4px)
        scale(1.03);

    box-shadow:
        0 20px 40px
        rgba(37, 99, 235, 0.20),

        0 0 0 11px
        rgba(59, 130, 246, 0.07);
}

.icon img {
    width: 105px;
    height: 105px;

    display: block;

    object-fit: contain;

    object-position: center;
}


/* =========================================================
   HEADER TITLE
========================================================= */

.header h1 {
    margin-bottom: 8px;

    color: #0f172a;

    font-size: 29px;

    font-weight: 800;

    line-height: 1.25;

    letter-spacing: -0.7px;
}

.header p {
    color: #64748b;

    font-size: 15px;

    line-height: 1.6;
}


/* =========================================================
   SEARCH FORM
========================================================= */

.search-form {
    position: relative;

    margin-top: 10px;

    z-index: 2;
}

.search-form label {
    display: block;

    margin-bottom: 9px;

    color: #334155;

    font-size: 14px;

    font-weight: 700;
}


/* =========================================================
   SEARCH BOX
========================================================= */

.search-box {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 10px;
}

.search-box input {
    flex: 1;

    width: 100%;
    min-width: 0;

    height: 54px;

    padding: 0 17px;

    border: 1px solid #cbd5e1;

    border-radius: 14px;

    outline: none;

    background:
        rgba(255, 255, 255, 0.95);

    color: #1e293b;

    font-size: 15px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.search-box input::placeholder {
    color: #94a3b8;
}

.search-box input:focus {
    border-color: #3b82f6;

    box-shadow:
        0 0 0 4px
        rgba(59, 130, 246, 0.12);
}


/* =========================================================
   SEARCH BUTTON
========================================================= */

.search-box button {
    height: 54px;

    min-width: 105px;

    padding: 0 24px;

    border: none;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );

    color: #ffffff;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 8px 20px
        rgba(37, 99, 235, 0.25);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.search-box button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 27px
        rgba(37, 99, 235, 0.32);
}

.search-box button:active {
    transform: translateY(0);
}


/* =========================================================
   ALERT
========================================================= */

.alert {
    position: relative;

    margin-top: 20px;

    padding: 15px 17px;

    border-radius: 14px;

    font-size: 14px;

    line-height: 1.5;

    z-index: 2;

    animation: fadeIn 0.3s ease;
}

.alert.error {
    color: #991b1b;

    background:
        linear-gradient(
            135deg,
            #fff1f2,
            #fef2f2
        );

    border: 1px solid #fecaca;

    box-shadow:
        0 6px 18px
        rgba(220, 38, 38, 0.06);
}


/* =========================================================
   DATA MAHASISWA
========================================================= */

.data-mahasiswa {
    position: relative;

    margin-top: 32px;

    padding-top: 27px;

    border-top: 1px solid #e2e8f0;

    z-index: 2;
}

.data-mahasiswa h2 {
    margin-bottom: 17px;

    color: #0f172a;

    font-size: 21px;

    font-weight: 800;
}


/* =========================================================
   DATA ROW
========================================================= */

.data-row {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 15px 0;

    border-bottom: 1px solid #e5e7eb;
}

.data-row:last-child {
    border-bottom: none;
}

.data-row span:first-child {
    color: #64748b;

    font-size: 14px;

    font-weight: 500;
}

.data-row strong {
    color: #1e293b;

    font-size: 14px;

    font-weight: 700;

    text-align: right;

    overflow-wrap: anywhere;
}


/* =========================================================
   STATUS
========================================================= */

.status {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 7px 14px;

    border-radius: 30px;

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 0.3px;
}

.status.hadir {
    color: #166534;

    background: #dcfce7;

    border: 1px solid #bbf7d0;

    box-shadow:
        0 4px 10px
        rgba(22, 163, 74, 0.08);
}

.status.belum {
    color: #92400e;

    background: #fef3c7;

    border: 1px solid #fde68a;
}


/* =========================================================
   SUCCESS BOX
========================================================= */

.success-box {
    margin-top: 25px;

    padding: 17px;

    border-radius: 15px;

    color: #166534;

    background:
        linear-gradient(
            135deg,
            #f0fdf4,
            #ecfdf5
        );

    border: 1px solid #bbf7d0;

    font-size: 14px;

    line-height: 1.6;

    box-shadow:
        0 7px 20px
        rgba(22, 163, 74, 0.07);

    animation: fadeIn 0.4s ease;
}

.success-box strong {
    display: block;

    margin-bottom: 3px;
}

.success-box p {
    margin-top: 4px;
}


/* =========================================================
   BUTTON HADIR
========================================================= */

.btn-hadir {
    width: 100%;

    height: 55px;

    margin-top: 25px;

    border: none;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #16a34a,
            #15803d
        );

    color: #ffffff;

    font-size: 16px;

    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 10px 25px
        rgba(22, 163, 74, 0.22);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.btn-hadir:hover {
    transform: translateY(-3px);

    box-shadow:
        0 14px 30px
        rgba(22, 163, 74, 0.30);
}

.btn-hadir:active {
    transform: translateY(0);
}


/* =========================================================
   LOGIN ADMIN - DESKTOP
========================================================= */

.admin-login-link {
    position: fixed;

    right: 24px;
    bottom: 22px;

    z-index: 9999;
}

.admin-login-link a {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 43px;

    padding: 11px 18px;

    border-radius: 12px;

    background:
        rgba(15, 23, 42, 0.90);

    color: #ffffff;

    text-decoration: none;

    font-size: 13px;

    font-weight: 700;

    box-shadow:
        0 10px 25px
        rgba(15, 23, 42, 0.20);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.admin-login-link a:hover {
    transform: translateY(-3px);

    background: #0f172a;
}


/* =========================================================
   ANIMATION
========================================================= */

@keyframes fadeIn {

    from {
        opacity: 0;

        transform:
            translateY(8px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 768px) {

    .container {
        padding: 35px 18px;
    }

    .card {
        max-width: 620px;

        padding: 34px 27px;

        border-radius: 24px;
    }

    .icon {
        width: 110px;
        height: 110px;
    }

    .icon img {
        width: 92px;
        height: 92px;
    }

    .header h1 {
        font-size: 25px;
    }

    .header p {
        font-size: 14px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    body {
        background:
            radial-gradient(
                circle at 0% 0%,
                rgba(37, 99, 235, 0.28),
                transparent 32%
            ),
            radial-gradient(
                circle at 100% 100%,
                rgba(6, 182, 212, 0.25),
                transparent 35%
            ),
            linear-gradient(
                145deg,
                #dbeafe 0%,
                #f8fafc 52%,
                #cffafe 100%
            );
    }


    /* =====================================================
       CONTAINER
    ===================================================== */

    .container {
        width: 100%;

        min-height: 100vh;

        display: flex;

        align-items: center;
        justify-content: center;

        padding:
            20px
            12px;
    }


    /* =====================================================
       CARD
    ===================================================== */

    .card {
        width: 100%;

        max-width: 430px;

        margin: 0;

        padding:
            28px
            22px
            25px;

        border-radius: 24px;

        background:
            rgba(255, 255, 255, 0.91);

        border: 1px solid
            rgba(255, 255, 255, 0.95);

        box-shadow:
            0 22px 55px
            rgba(15, 23, 42, 0.13);

        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    .card::before {
        height: 4px;
    }


    /* =====================================================
       HEADER
    ===================================================== */

    .header {
        margin-bottom: 27px;
    }


    /* =====================================================
       LOGO
    ===================================================== */

    .icon {
        width: 94px;
        height: 94px;

        margin:
            0
            auto
            17px;

        border: 4px solid
            rgba(255, 255, 255, 0.95);

        box-shadow:
            0 9px 25px
            rgba(37, 99, 235, 0.15),

            0 0 0 8px
            rgba(59, 130, 246, 0.055);
    }

    .icon img {
        width: 78px;
        height: 78px;
    }


    /* =====================================================
       TITLE
    ===================================================== */

    .header h1 {
        font-size: 23px;

        line-height: 1.25;

        letter-spacing: -0.5px;

        margin-bottom: 8px;
    }

    .header p {
        font-size: 13px;

        line-height: 1.5;
    }


    /* =====================================================
       FORM
    ===================================================== */

    .search-form {
        margin-top: 0;
    }

    .search-form label {
        margin-bottom: 7px;

        font-size: 14px;
    }


    /* =====================================================
       INPUT + CARI
       TETAP SATU BARIS
    ===================================================== */

    .search-box {
        display: flex;

        flex-direction: row;

        align-items: center;

        gap: 8px;
    }

    .search-box input {
        flex: 1;

        min-width: 0;

        height: 48px;

        padding:
            0
            14px;

        border-radius: 12px;

        font-size: 14px;
    }

    .search-box button {
        flex:
            0
            0
            76px;

        width: 76px;

        min-width: 76px;

        height: 48px;

        padding: 0;

        border-radius: 12px;

        font-size: 14px;

        box-shadow:
            0 7px 18px
            rgba(37, 99, 235, 0.22);
    }

    .search-box button:hover {
        transform: none;
    }


    /* =====================================================
       DATA MAHASISWA
    ===================================================== */

    .data-mahasiswa {
        margin-top: 24px;

        padding-top: 20px;
    }

    .data-mahasiswa h2 {
        font-size: 18px;

        margin-bottom: 8px;
    }


    /* =====================================================
       DATA ROW
    ===================================================== */

    .data-row {
        display: grid;

        grid-template-columns:
            105px
            minmax(0, 1fr);

        align-items: center;

        gap: 10px;

        padding: 12px 0;
    }

    .data-row span:first-child {
        font-size: 12px;

        color: #64748b;
    }

    .data-row strong {
        min-width: 0;

        font-size: 13px;

        text-align: right;

        overflow-wrap: anywhere;
    }


    /* =====================================================
       STATUS
    ===================================================== */

    .status {
        justify-self: end;

        padding:
            6px
            11px;

        font-size: 10px;
    }


    /* =====================================================
       BUTTON HADIR
    ===================================================== */

    .btn-hadir {
        height: 50px;

        margin-top: 20px;

        border-radius: 12px;

        font-size: 14px;
    }

    .btn-hadir:hover {
        transform: none;
    }


    /* =====================================================
       SUCCESS BOX
    ===================================================== */

    .success-box {
        margin-top: 20px;

        padding:
            13px
            14px;

        border-radius: 12px;

        font-size: 12px;
    }


    /* =====================================================
       ALERT
    ===================================================== */

    .alert {
        margin-top: 16px;

        padding:
            12px
            14px;

        border-radius: 12px;

        font-size: 12px;
    }


    /* =====================================================
       LOGIN ADMIN
       POJOK KANAN BAWAH
    ===================================================== */

    .admin-login-link {
        position: fixed;

        right: 14px;
        left: auto;

        bottom: 14px;

        width: auto;
        height: auto;

        margin: 0;
        padding: 0;

        display: block;

        z-index: 9999;
    }

    .admin-login-link a {
        width: auto;

        min-width: 0;

        min-height: 40px;

        display: inline-flex;

        align-items: center;
        justify-content: center;

        padding:
            9px
            14px;

        border-radius: 11px;

        background:
            rgba(15, 23, 42, 0.92);

        color: #ffffff;

        font-size: 11px;

        font-weight: 700;

        line-height: 1.2;

        text-decoration: none;

        box-shadow:
            0 8px 20px
            rgba(15, 23, 42, 0.22);

        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);

        transition:
            transform 0.2s ease,
            background 0.2s ease;
    }

    .admin-login-link a:hover {
        transform: translateY(-2px);

        background:
            rgba(15, 23, 42, 0.98);
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .container {
        padding:
            15px
            10px;
    }


    .card {
        padding:
            24px
            17px
            22px;

        border-radius: 21px;
    }


    /* LOGO */

    .icon {
        width: 82px;
        height: 82px;

        margin-bottom: 14px;
    }

    .icon img {
        width: 68px;
        height: 68px;
    }


    /* TITLE */

    .header {
        margin-bottom: 23px;
    }

    .header h1 {
        font-size: 20px;
    }

    .header p {
        font-size: 12px;
    }


    /* SEARCH */

    .search-form label {
        font-size: 13px;
    }

    .search-box {
        gap: 7px;
    }

    .search-box input {
        height: 46px;

        padding:
            0
            12px;

        font-size: 13px;
    }

    .search-box button {
        flex-basis: 70px;

        width: 70px;

        min-width: 70px;

        height: 46px;

        font-size: 13px;
    }


    /* DATA */

    .data-row {
        grid-template-columns:
            90px
            minmax(0, 1fr);

        gap: 7px;
    }

    .data-row strong {
        font-size: 12px;
    }


    /* ADMIN */

    .admin-login-link {
        right: 10px;

        bottom: 10px;
    }

    .admin-login-link a {
        min-height: 37px;

        padding:
            8px
            12px;

        border-radius: 10px;

        font-size: 10px;
    }
}


/* =========================================================
   VERY SMALL PHONE
========================================================= */

@media (max-width: 340px) {

    .card {
        padding:
            22px
            14px
            20px;
    }

    .header h1 {
        font-size: 19px;
    }

    .search-box input {
        font-size: 12px;
    }

    .search-box button {
        flex-basis: 66px;

        width: 66px;

        min-width: 66px;

        font-size: 12px;
    }

    .data-row {
        grid-template-columns:
            82px
            minmax(0, 1fr);
    }
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;

        scroll-behavior: auto !important;
    }
}