/* ==========================================================================
   LOGIN PAGE STYLES
   Place in: assets/css/login.css
   Link in login.php: <link href="../../assets/css/login.css" rel="stylesheet">
   ========================================================================== */

/* ── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.login-page {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
    color: #333;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

/* ── Animated background dots ──────────────────────────────────────────── */
body.login-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(52, 152, 219, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(46, 204, 113, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(155, 89, 182, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ── Floating circles decoration ───────────────────────────────────────── */
body.login-page::after {
    content: '';
    position: fixed;
    top: -120px;
    right: -120px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(52, 152, 219, 0.07);
    pointer-events: none;
    z-index: 0;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Login Card Box ────────────────────────────────────────────────────── */
.login-box {
    width: 100%;
    background: #fff;
    border-radius: 16px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.18),
        0 1px 4px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* ── Header (title + subtitle) ─────────────────────────────────────────── */
.login-header {
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    padding: 38px 30px 34px;
    text-align: center;
    position: relative;
}

/* decorative arc at bottom of header */
.login-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 24px;
    background: #fff;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.login-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.login-header p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}

/* ── Form body ─────────────────────────────────────────────────────────── */
.login-box form {
    padding: 28px 30px 10px;
}

/* ── Alert messages ────────────────────────────────────────────────────── */
.login-box .alert {
    margin: 0 30px 20px;
    padding: 11px 15px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid transparent;
}

.login-box .alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.login-box .alert-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #86efac;
}

/* ── Form Group ────────────────────────────────────────────────────────── */
.login-box .form-group {
    margin-bottom: 20px;
}

.login-box .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 7px;
    letter-spacing: 0.2px;
}

/* ── Input Fields ──────────────────────────────────────────────────────── */
.login-box .form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    background: #f7f8fa;
    border: 1.5px solid #e2e6ea;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.login-box .form-control::placeholder {
    color: #adb2b8;
}

.login-box .form-control:focus {
    border-color: #3498db;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

/* ── Submit Button ─────────────────────────────────────────────────────── */
.login-box .btn-primary {
    display: block;
    width: 100%;
    padding: 13px 0;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.login-box .btn-primary:hover {
    background: linear-gradient(135deg, #2e86c1, #2471a3);
    box-shadow: 0 4px 14px rgba(52, 152, 219, 0.35);
    transform: translateY(-1px);
}

.login-box .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.25);
}

/* ── Footer (default credentials hint) ─────────────────────────────────── */
.login-footer {
    padding: 18px 30px 24px;
    text-align: center;
    border-top: 1px solid #f0f2f4;
    margin-top: 4px;
}

.login-footer p.text-muted {
    font-size: 12px;
    color: #9ca3ab;
    margin: 0;
}

/* ── Decorative bottom-left circle ─────────────────────────────────────── */
.login-container::before {
    content: '';
    position: fixed;
    bottom: -80px;
    left: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(46, 204, 113, 0.06);
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   RESPONSIVE — Tablet (≤ 600px)
   ========================================================================== */
@media (max-width: 600px) {
    .login-container {
        max-width: 100%;
        padding: 20px 16px;
    }

    .login-header {
        padding: 30px 22px 28px;
    }

    .login-header h1 {
        font-size: 22px;
    }

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

    .login-box form {
        padding: 24px 22px 8px;
    }

    .login-box .alert {
        margin: 0 22px 18px;
    }

    .login-footer {
        padding: 16px 22px 22px;
    }
}

/* ==========================================================================
   RESPONSIVE — Mobile (≤ 380px)
   ========================================================================== */
@media (max-width: 380px) {
    .login-container {
        padding: 16px 10px;
    }

    .login-header {
        padding: 26px 18px 24px;
    }

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

    .login-box form {
        padding: 20px 18px 6px;
    }

    .login-box .form-control {
        padding: 11px 14px;
        font-size: 14px;
    }

    .login-box .btn-primary {
        padding: 12px 0;
        font-size: 14px;
    }

    .login-box .alert {
        margin: 0 18px 16px;
        font-size: 12.5px;
    }

    .login-footer {
        padding: 14px 18px 20px;
    }
}