/* ===================================
   CSS RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

:root {
    /* Minimalist Green & White Palette */
    --primary-green: #10B981;
    /* Emerald 500 */
    --primary-hover: #059669;
    /* Emerald 600 */
    --bg-color: #F3F4F6;
    /* Gray 100 */
    --card-bg: #FFFFFF;
    /* White */
    --text-primary: #111827;
    /* Gray 900 - Black-ish */
    --text-secondary: #6B7280;
    /* Gray 500 */
    --border-color: #E5E7EB;
    /* Gray 200 */

    --success-bg: #ECFDF5;
    /* Green 50 */
    --success-text: #065F46;
    /* Green 800 */
    --error-bg: #FEE2E2;
    /* Red 50 */
    --error-text: #991B1B;
    /* Red 800 */

    --radius: 8px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --transition: 0.2s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1.5;
}

/* ===================================
   CONTAINER & LAYOUT
   =================================== */
.container {
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
}

/* ===================================
   MAIN CARD
   =================================== */
.main-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border-color);
}

.card-header {
    margin-bottom: 2rem;
}

/* Minimalist Logo/Header Area */
.logo-icon {
    width: 48px;
    height: 48px;
    background-color: var(--primary-green);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
}

.logo-icon svg {
    width: 28px;
    height: 28px;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ===================================
   FORM STYLES
   =================================== */
.absensi-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    text-align: left;
}

.form-label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    outline: none;
    transition: var(--transition);
    color: var(--text-primary);
    background-color: #FAFAFA;
}

.form-input::placeholder {
    color: #9CA3AF;
}

.form-input:focus {
    border-color: var(--primary-green);
    background-color: white;
}

/* Chrome, Safari, Edge, Opera */
.form-input::-webkit-outer-spin-button,
.form-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
.form-input[type=number] {
    -moz-appearance: textfield;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.4rem;
}

/* ===================================
   BUTTON STYLES
   =================================== */
.submit-btn {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--primary-green);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

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

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===================================
   MESSAGES & LOADING
   =================================== */
.loading-state {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.message-box {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--radius);
    text-align: left;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.success-box {
    background-color: var(--success-bg);
    color: var(--success-text);
    border: 1px solid #D1FAE5;
}

.error-box {
    background-color: var(--error-bg);
    color: var(--error-text);
    border: 1px solid #FEE2E2;
}

.message-icon svg {
    width: 20px;
    height: 20px;
}

.message-content h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.message-content p {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ===================================
   UTILITIES
   =================================== */
.hidden {
    display: none !important;
}

.footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: #9CA3AF;
}