/**
 * RAPIDLAUNCH ADMIN LOGIN — Branded Sign-In
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, #f5f5f7 0%, #eaeaec 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    border: 1px solid #e5e5e7;
    border-radius: 20px;
    padding: 44px 40px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 32px rgba(0,0,0,0.08);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-logo {
    width: auto;
    height: 64px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-logo img { height: 64px; width: auto; max-width: 100%; }
.login-logo svg { height: 64px; width: auto; }

.login-brand {
    text-align: center;
    margin-bottom: 8px;
}
.login-brand-name {
    font-size: 28px;
    font-weight: 800;
    color: #17617a;
    letter-spacing: -0.02em;
}

.login-title {
    color: #1d1d1f;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.login-subtitle {
    color: #86868b;
    font-size: 14px;
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.5;
}

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

.form-label {
    display: block;
    color: #1d1d1f;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 13px 16px;
    background: #f5f5f7;
    border: 1.5px solid #e5e5e7;
    border-radius: 10px;
    color: #1d1d1f;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    -webkit-appearance: none;
}

.form-input:focus {
    outline: none;
    border-color: #17617a;
    box-shadow: 0 0 0 3px rgba(23, 97, 122, 0.12);
    background: #ffffff;
}

.form-input::placeholder {
    color: #8a8a8e;
}

.form-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 50px #f5f5f7 inset;
    -webkit-text-fill-color: #1d1d1f;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #17617a 0%, #0f4658 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 2px 8px rgba(23, 97, 122, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(23, 97, 122, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(23, 97, 122, 0.2);
}

.btn-primary:focus-visible {
    outline: 2px solid #17617a;
    outline-offset: 2px;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
    animation: alertIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes alertIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
}

.login-footer a {
    color: #17617a;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-footer a:hover {
    color: #0f4658;
}

/* Loading state */
.btn-primary.loading {
    opacity: 0.7;
    pointer-events: none;
}
.btn-primary .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
.btn-primary.loading .spinner { display: inline-block; }
.btn-primary.loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 480px) {
    .login-card { padding: 32px 24px; border-radius: 16px; }
    .login-title { font-size: 20px; }
}
