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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    color: #1a1a2e;
}

.page-wrap {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
    width: 260px;
    background: #0f1117;
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.sidebar-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #8a8fa8;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dot.green { background: #22c55e; box-shadow: 0 0 6px #22c55e88; }
.dot.blue  { background: #4F8EF7; }

.sidebar-footer {
    font-size: 12px;
    color: #3d4059;
    line-height: 1.8;
}
.sidebar-footer a { color: #4F8EF7; text-decoration: none; }
.sidebar-footer a:hover { text-decoration: underline; }

/* ── Main ── */
.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 48px 44px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 32px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
}

h1 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 32px;
}

/* ── Fields ── */
.field {
    margin-bottom: 20px;
}

.field label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.forgot {
    font-size: 12px;
    color: #4F8EF7;
    text-decoration: none;
    font-weight: 400;
}
.forgot:hover { text-decoration: underline; }

.field input[type="text"],
.field input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #fafafa;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.field input:focus {
    border-color: #4F8EF7;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79,142,247,.12);
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 42px;
}

.toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    display: flex;
    align-items: center;
    padding: 0;
}
.toggle-pass:hover { color: #4F8EF7; }

/* ── Remember ── */
.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    margin-bottom: 24px;
}
.remember input { accent-color: #4F8EF7; width: 15px; height: 15px; cursor: pointer; }

/* ── Button ── */
.btn-login {
    width: 100%;
    padding: 11px;
    background: #4F8EF7;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.btn-login:hover { background: #3b7de8; }
.btn-login:active { transform: scale(.98); }
.btn-login:disabled { background: #93b8f7; cursor: not-allowed; }

/* ── Divider ── */
.divider {
    position: relative;
    text-align: center;
    margin: 28px 0 16px;
    color: #d1d5db;
}
.divider::before, .divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 56px);
    height: 1px;
    background: #e5e7eb;
}
.divider::before { left: 0; }
.divider::after  { right: 0; }
.divider span {
    font-size: 12px;
    color: #9ca3af;
    background: #fff;
    padding: 0 10px;
    position: relative;
}

.support-line {
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}
.support-line a { color: #4F8EF7; text-decoration: none; }
.support-line a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .sidebar { display: none; }
    .login-box { padding: 32px 24px; }
}
