/* ==================================== */
/* 1. Gaya Dasar (Body & Card) */
/* ==================================== */
body {
    background: linear-gradient(135deg, #dbe6ff, #c0daff);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.card {
    background-color: #ffffff30;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, #007bff, #0056b3);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

h3 {
    color: #343a40;
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

p.text-muted {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 25px;
    transition: color 0.3s ease;
}

a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* ==================================== */
/* 2. Gaya Komponen Form */
/* ==================================== */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.form-control {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 1rem;
    color: #495057;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Penyesuaian untuk input group */
.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn-outline-secondary {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-color: #ced4da;
    color: #6c757d;
    background-color: #e9ecef;
    padding: 10px 12px;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.input-group .btn-outline-secondary:hover {
    background-color: #dee2e6;
    border-color: #ced4da;
    color: #495057;
}

/* ==================================== */
/* 3. Gaya Tombol */
/* ==================================== */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    padding: 12px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 6px;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.theme-toggle-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle-button {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.theme-toggle-button:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ==================================== */
/* 4. Gaya Responsif */
/* ==================================== */
@media (max-width: 767.98px) {
    body {
        padding: 20px;
        align-items: flex-start;
        min-height: auto;
    }

    .card {
        padding: 25px;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
        max-width: 100%;
        margin-top: 50px;
        margin-bottom: 50px;
    }

    .card::before {
        height: 4px;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }

    h3 {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    p.text-muted {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .form-label {
        font-size: 0.95rem;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .input-group .btn-outline-secondary {
        padding: 8px 10px;
        font-size: 0.9rem;
    }

    .btn-primary {
        padding: 10px 15px;
        font-size: 1rem;
    }

    .theme-toggle-container {
        top: 15px;
        right: 15px;
    }

    .theme-toggle-button {
        padding: 8px 12px;
        font-size: 0.85rem;
        gap: 6px;
        border-radius: 6px;
    }

    .theme-toggle-button .d-none.d-md-inline {
        display: none !important;
    }
}

@media (max-width: 575.98px) {
    .card {
        padding: 20px;
        margin-top: 30px;
        margin-bottom: 30px;
    }

    h3 {
        font-size: 1.4rem;
    }

    p.text-muted {
        font-size: 0.85rem;
    }

    .theme-toggle-container {
        top: 10px;
        right: 10px;
    }

    .theme-toggle-button {
        padding: 6px 10px;
        font-size: 0.8rem;
        border-radius: 5px;
    }
}

/* ==================================== */
/* 5. Perbaikan Khusus (Floating Labels) */
/* ==================================== */
.form-floating.input-group {
    position: relative;
    width: 100%;
}

.form-floating.input-group > .form-control {
    z-index: 1;
    position: relative;
}

.form-floating.input-group > .form-control + .input-group-text,
.form-floating.input-group > .form-control + .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 0;
}

.form-floating.input-group > .form-control:not(:placeholder-shown) + label {
    opacity: 0;
}

.form-floating.input-group > label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity .1s ease-in-out, transform .1s ease-in-out;
    color: var(--bs-gray-600);
}

.form-floating.input-group > .form-control:focus + label {
    transform: scale(.85) translateY(-0.5rem) translateX(0.15rem);
    opacity: .65;
}