/* =================================================================
   AUTO WORKSHOP – Login Page Stylesheet
   Clean, professional enterprise login design
   ================================================================= */

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: #0f172a;
    overflow: hidden;
}

/* ── WRAPPER ──────────────────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    background: url('/resources/images/login-bg-bbeaf7115199603bb620c67b94d7ee40.jpg') no-repeat center center fixed;
    background-size: cover;
}
.login-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(20, 40, 65, 0.65);
    z-index: 1;
}

/* Decorative shapes (subtle, not distracting) */
.login-decoration { display: none; }

/* ── LOGIN CARD ───────────────────────────────────────────────── */
.login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border-radius: 4px;
    padding: 2rem 1.75rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.35);
    border: 1px solid #c8d0da;
    border-top: 3px solid transparent;
    border-image: linear-gradient(135deg, #4361ee 0%, #7048e8 100%) 1;
}

/* Card header */
.card-header {
    text-align: center;
    margin-bottom: 1.4rem;
    padding: 0;
    background: transparent;
    border: none;
    color: inherit;
}

.brand-icon {
    width: 60px; height: 60px;
    background: #4361ee;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.brand-icon i {
    font-size: 1.6rem;
    color: white;
}

.brand-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a2535;
    margin-bottom: .3rem;
    letter-spacing: .2px;
}
.brand-subtitle {
    color: #7a8699;
    font-size: 11.5px;
    font-weight: 400;
}

/* ── FORM ─────────────────────────────────────────────────────── */
.login-form { margin-bottom: 1rem; }

.input-label { display: none; }

.input-group {
    position: relative;
    margin-bottom: .75rem;
}
.input-icon {
    position: absolute;
    left: .7rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    z-index: 1;
    font-size: 11.5px;
    pointer-events: none;
}
.form-input {
    width: 100%;
    height: 30px;
    padding: 0 .5rem 0 2rem;
    font-size: 12.5px;
    font-family: inherit;
    color: #1a2535;
    background: #f6f8fb;
    border: 1px solid #cdd5e0;
    border-radius: 3px;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-input:focus {
    border-color: #4361ee;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(67,97,238,.15);
}
.form-input:focus + .input-icon { color: #4361ee; }
.input-group:hover .form-input { border-color: #b8c4d0; }

.password-toggle {
    position: absolute;
    right: .4rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: .2rem;
    font-size: 11.5px;
    transition: color .12s;
}
.password-toggle:hover { color: #4361ee; }

/* Form options row */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .85rem;
    font-size: 12px;
}

/* Custom checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #4a5770;
    position: relative;
    padding-left: 20px;
    font-size: 12px;
    user-select: none;
}
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.checkmark {
    position: absolute;
    top: 1px; left: 0;
    height: 13px; width: 13px;
    background: #f6f8fb;
    border: 1px solid #cdd5e0;
    border-radius: 2px;
    transition: background .15s, border-color .15s;
}
.checkbox-container:hover input ~ .checkmark { border-color: #4361ee; }
.checkbox-container input:checked ~ .checkmark {
    background: #4361ee;
    border-color: #4361ee;
}
.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 3px; top: 0;
    width: 5px; height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.checkbox-container input:checked ~ .checkmark::after { display: block; }
.checkbox-text { user-select: none; }

/* Forgot link */
.forgot-link {
    color: #4361ee;
    text-decoration: none;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: .25rem;
    transition: color .12s;
}
.forgot-link:hover { color: #3451d1; text-decoration: underline; }
.forgot-link i { font-size: 11px; }

/* ── LOGIN BUTTON ─────────────────────────────────────────────── */
.btn-login {
    width: 100%;
    height: 30px;
    background: linear-gradient(135deg, #4361ee 0%, #7048e8 100%);
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: background .15s;
    position: relative;
    overflow: hidden;
}
.btn-login:hover { background: linear-gradient(135deg, #5c6fd8 0%, #6a3d96 100%); }
.btn-login:active { background: #0f3d6e; }
.btn-login .btn-icon { font-size: 11px; }

/* Loading state */
.btn-login.loading { pointer-events: none; opacity: .7; }
.btn-login.loading .btn-text { visibility: hidden; }
.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 14px; height: 14px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ERROR MESSAGE ────────────────────────────────────────────── */
.error-message {
    margin-top: .75rem;
    padding: .45rem .75rem;
    background: #fdecea;
    border: 1px solid rgba(192,57,43,.3);
    border-radius: 3px;
    color: #c0392b;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.error-message i { font-size: 11.5px; }

/* ── CARD FOOTER ──────────────────────────────────────────────── */
.card-footer {
    text-align: center;
    padding-top: .9rem;
    border-top: 1px solid #e2e8f0;
    background: transparent;
    border-radius: 0;
}
.footer-text  { color: #9ca3af; font-size: 11px; }
.footer-link  { color: #4361ee; text-decoration: none; font-weight: 600; font-size: 11px; }
.footer-link:hover { color: #3451d1; text-decoration: underline; }

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 480px) {
    .login-card { padding: 1.5rem 1.25rem 1.25rem; }
    .brand-title { font-size: 1.1rem; }
}

/* ── PRINT ────────────────────────────────────────────────────── */
@media print {
    .login-wrapper { background: white; }
    .login-wrapper::before { display: none; }
}
