
/* MCOT Smart Sales - Auth System V9.5 */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(249, 168, 38, 0.22), transparent 32%),
        radial-gradient(circle at bottom right, rgba(28, 91, 184, 0.28), transparent 36%),
        linear-gradient(135deg, #0d3b66 0%, #1c5bb8 100%);
}
@supports (height: 100dvh) {
    .auth-page { min-height: 100dvh; }
}
.auth-card {
    width: 100%;
    max-width: 430px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 24px;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.35);
    overflow: hidden;
}
.auth-card-header {
    padding: 28px 26px 20px;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e2e8f0;
}
.auth-logo {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    box-shadow: 0 10px 22px rgba(28, 91, 184, 0.28);
    margin-bottom: 14px;
    overflow: hidden;
}
.auth-logo .app-brand-icon {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.auth-card h1 {
    font-family: 'Prompt', sans-serif;
    font-size: 24px;
    color: #0f172a;
    margin: 0;
    font-weight: 800;
}
.auth-card .subtitle {
    color: #64748b;
    font-size: 13px;
    margin-top: 4px;
}
.auth-phase-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 11px;
    font-weight: 900;
}
.auth-card-body {
    padding: 24px 26px 26px;
}
.auth-field { margin-bottom: 14px; }
.auth-field label {
    display: block;
    font-size: 13px;
    color: #334155;
    font-weight: 800;
    margin-bottom: 6px;
}
.auth-input-wrap { position: relative; }
.auth-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}
.auth-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px 14px 12px 42px;
    font-size: 15px;
    outline: none;
    transition: all .18s ease;
}
.auth-input:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
.auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 12px 0 18px;
    font-size: 13px;
    color: #475569;
}
.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    user-select: none;
}
.auth-btn {
    width: 100%;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #0d3b66 0%, #1c5bb8 100%);
    color: white;
    font-weight: 900;
    padding: 13px 16px;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(28, 91, 184, .28);
    transition: transform .15s ease, box-shadow .15s ease;
}
.auth-btn:hover { transform: translateY(-1px); box-shadow: 0 16px 28px rgba(28, 91, 184, .34); }
.auth-btn:active { transform: scale(.99); }
.auth-install-btn {
    width: 100%;
    min-height: 44px;
    margin-top: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 900;
    padding: 11px 16px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.auth-install-btn i { margin-right: 8px; }
.auth-install-btn:hover { background: #dbeafe; border-color: #93c5fd; transform: translateY(-1px); }
.auth-install-btn:active { transform: scale(.99); }
.auth-install-btn[hidden] { display: none !important; }
.auth-error {
    display: none;
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}
.auth-demo-box {
    margin-top: 16px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 12px;
    font-size: 12px;
    color: #475569;
    line-height: 1.55;
}
.auth-demo-box summary {
    cursor: pointer;
    font-weight: 800;
    color: #334155;
}
.auth-demo-box[open] summary { margin-bottom: 8px; }
.auth-demo-box code {
    background: #e2e8f0;
    padding: 1px 5px;
    border-radius: 6px;
    font-weight: 800;
    color: #0f172a;
}
.auth-footer-note {
    margin-top: 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 11px;
}
.auth-user-badge {
    margin-top: 8px;
    max-width: 210px;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(255,255,255,0.13);
    border: 1px solid rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.88);
    font-size: 10px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#sidebar:not(.expanded) .auth-user-badge { display: none; }
@media (max-width: 640px) {
    .auth-page { padding: 14px; align-items: stretch; }
    .auth-card { margin: auto 0; border-radius: 20px; }
    .auth-card-header { padding: 24px 20px 18px; }
    .auth-card-body { padding: 20px; }
}
@media (pointer: coarse) {
    .auth-input,
    .auth-btn,
    .auth-install-btn,
    .auth-check {
        min-height: 44px;
    }
    .auth-input { font-size: 16px; }
}
