body {
    font-family: 'Noto Sans', sans-serif;
    background-color: #2f3136; /* Dark gray background */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #dcddde; /* Light gray text for contrast */
    overflow: auto; /* Allows scrolling if content overflows */
    padding: 20px;
    box-sizing: border-box; /* Include padding in element's total width/height */
}

.auth-container {
    padding: 0;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-area {
    margin-bottom: 25px;
    text-align: center;
}

.app-logo {
    max-width: 120px;
    height: auto;
    display: block;
}

.auth-box {
    background-color: #36393f; /* Discord-like dark box background */
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); /* Adjusted shadow for better depth */
    text-align: center;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* --- HEADINGS & SUBTITLES --- */
.auth-title {
    color: #ffffff;
    margin-bottom: 8px;
    font-size: 24px;
    font-weight: 600;
}

.auth-subtitle {
    color: #a3a6aa;
    margin-bottom: 20px;
    font-size: 16px;
}

/* --- FORM ELEMENTS --- */
.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #8e9297;
    font-size: 12px;
    text-transform: uppercase;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: calc(100% - 20px); /* Account for padding */
    padding: 10px;
    border: 1px solid #2f3136; /* Darker border */
    border-radius: 4px;
    font-size: 16px;
    background-color: #202225; /* Dark input background */
    color: #dcddde; /* Light text for input */
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    border-color: #00aff4; /* Blue border on focus */
    outline: none;
    box-shadow: 0 0 0 1px #00aff4;
}

.error-message {
    color: #f04747; /* Red for errors */
    font-size: 12px;
    margin-top: 4px;
    display: block;
    text-align: left;
}

/* --- MESSAGE BOXES (Success/Error/Info) --- */
.message-box {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    display: block;
}

.message-box.success {
    background-color: rgba(67, 181, 129, 0.2);
    border: 1px solid #43b581;
    color: #43b581;
}

.message-box.error {
    background-color: rgba(240, 71, 71, 0.2);
    border: 1px solid #f04747;
    color: #f04747;
}

.message-box.info {
    background-color: rgba(114, 137, 218, 0.2);
    border: 1px solid #7289da;
    color: #7289da;
}

/* --- LINKS & BUTTONS --- */
.forgot-password {
    color: #00aff4;
    text-decoration: none;
    font-size: 14px;
    display: block;
    margin-bottom: 20px;
    transition: text-decoration 0.2s ease;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-button {
    background-color: #5865f2; /* Discord blue button */
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 3px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    width: 100%; /* Full width */
    display: flex; /* For centering text and spinner */
    justify-content: center;
    align-items: center;
    gap: 8px; /* Space between icon/text and spinner */

    /* --- FIX BUTTON SIZE OFFSET (ADDED/MODIFIED) --- */
    min-height: 44px; /* Ensure consistent height */
    box-sizing: border-box;
    white-space: nowrap; /* Prevent text wrapping if icons are present */
    position: relative; /* Essential for absolute positioning of spinner */
}

/* Ensures spinner is correctly centered regardless of text width */
.auth-button span.spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 18px; /* Fixed size for spinner */
    height: 18px; /* Fixed size for spinner */
}

/* Icons inside auth-button (if you decide to add them back using a reliable method) */
.auth-button img {
    width: 24px;
    height: 24px;
    /* filter: brightness(0) invert(1); /* Uncomment if your icons are black and need to be white */
    margin-right: 8px; /* Space between icon and text */
}


.auth-footer {
    margin-top: 20px;
    color: #a3a6aa;
    font-size: 14px;
}

.register-link {
    color: #00aff4;
    text-decoration: none;
    font-weight: 600;
    transition: text-decoration 0.2s ease;
}

.register-link:hover {
    text-decoration: underline;
}

.resend-code {
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #a3a6aa;
}

/* --- DIVIDER --- */
.divider {
    margin: 20px 0;
    color: #8e9297;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    text-align: center;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #4f545c;
    margin: 0 10px;
}

/* --- SOCIAL AUTH BUTTONS --- */
.social-auth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 3px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    margin-bottom: 15px;
}

.social-auth-button img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.google-button {
    background-color: #4285f4;
    color: white;
}

.google-button:hover {
    background-color: #357ae8;
}

/* --- SPINNER --- */
.spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- INPUT ERROR STATE --- */
input.error-input {
    border-color: #f04747 !important;
    box-shadow: 0 0 0 1px #f04747 !important;
}

/* --- DATA TABLE STYLES (MPLS Admin Dashboard) --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    color: #dcddde;
    background-color: #202225;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    border: 1px solid #36393f;
    padding: 12px 10px;
    text-align: left;
    font-size: 0.9em;
}

.data-table th {
    background-color: #2f3136;
    font-weight: 600;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table tbody tr:nth-child(even) {
    background-color: #2c2f33;
}

.data-table tbody tr:hover {
    background-color: #3e4249;
}

/* --- PRESENCE STATUS COLORS --- */
.status-tepat-waktu {
    background-color: rgba(67, 181, 129, 0.2) !important; /* Green */
    border-left: 5px solid #43b581; /* Green border */
}
.status-terlambat {
    background-color: rgba(250, 166, 26, 0.2) !important; /* Yellow */
    border-left: 5px solid #faa61a; /* Yellow border */
}
.status-luar-waktu {
    background-color: rgba(240, 71, 71, 0.2) !important; /* Red */
    border-left: 5px solid #f04747; /* Red border */
}
.group-header {
    background-color: #4f545c !important;
    color: white !important;
    text-align: center !important;
    font-weight: bold !important;
    padding: 8px !important;
}


/* --- RESPONSIVE STYLES (MEDIA QUERIES) --- */
@media (max-width: 768px) {
    .auth-container {
        max-width: 90%;
        margin: 20px auto;
    }

    .auth-box {
        padding: 25px;
    }

    .app-logo {
        max-width: 90px;
    }

    .auth-title {
        font-size: 20px;
    }

    .auth-subtitle {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    input[type="text"],
    input[type="password"],
    input[type="email"] {
        padding: 8px;
        font-size: 15px;
    }

    .forgot-password {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .auth-button {
        padding: 10px 20px;
        font-size: 15px;
        min-height: 40px; /* Adjusted min-height for mobile */
    }
    .auth-button span.spinner { /* Adjusted spinner position for mobile */
        width: 16px;
        height: 16px;
    }
    .auth-button img { /* Responsive icons */
        width: 20px;
        height: 20px;
    }

    .auth-footer {
        font-size: 13px;
        margin-top: 15px;
    }

    .spinner {
        width: 16px;
        height: 16px;
    }

    .social-auth-button {
        padding: 10px 12px;
        font-size: 15px;
    }
    .social-auth-button img {
        width: 18px;
        height: 18px;
        margin-right: 8px;
    }

    /* Responsive table styles for mobile (make rows stack vertically) */
    .data-table thead {
        display: none;
    }
    .data-table, .data-table tbody, .data-table tr, .data-table td {
        display: block;
        width: 100%;
    }
    .data-table tr {
        margin-bottom: 10px;
        border: 1px solid #36393f;
        border-radius: 8px;
        background-color: #202225;
        overflow: hidden;
    }
    .data-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border: none;
        border-bottom: 1px dashed #3e4249;
    }
    .data-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: calc(50% - 20px);
        text-align: left;
        font-weight: 600;
        color: #8e9297;
        text-transform: uppercase;
        font-size: 0.8em;
    }
    .data-table td:last-child {
        border-bottom: 0;
    }
    .data-table .group-header td {
        text-align: center !important;
        padding-left: 10px !important;
        font-size: 1em !important;
        border-bottom: 0 !important;
    }
}

/* --- SMALL SCREEN SPECIFIC STYLES --- */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    .auth-container {
        margin: 10px auto;
    }
    .auth-box {
        padding: 20px;
    }
    .logo-area {
        margin-bottom: 15px;
    }
    .auth-title {
        font-size: 18px;
    }
    .auth-subtitle {
        font-size: 13px;
    }
}