﻿@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    color-scheme: light;
}

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

html, body {
    height: 100%;
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    background: #f0f4f8;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button, .nav-item, .dashboard-card {
    user-select: none;
}

.auth-redirect {
    font-size: 0.9rem;
    color: #42566f;
}

/* ── HOME DASHBOARD ── */
.home-dashboard {
    max-width: 1200px;
    margin: 0 auto 0 50px; 
    animation: fadeUp 0.2s ease-out;
}

.section-label {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.3px;
    color: #4a6a8a;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.card-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 34px;
    margin-bottom: 32px;
}

.card-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px 35px;
    margin-bottom: 20px;
}

.merchant-tools-section {
    animation: fadeUp 0.25s ease-out;
}

.merchant-tools-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.merchant-badge {
    font-size: 15px;
    font-weight: 700;
    color: #1e6b3a;
    background: #ddf3e4;
    padding: 2px 10px;
    border-radius: 4px;
}

.merchant-tools-header .section-label {
    margin-bottom: 0;
}

.merchant-mid {
    font-size: 13px;
    color: #5a7a96;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
}

.no-merchant-placeholder {
    padding: 28px 20px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px dashed #c5cdd8;
    text-align: center;
}

.placeholder-title {
    font-size: 14px;
    font-weight: 600;
    color: #5a7090;
    margin-bottom: 4px;
}

.placeholder-text {
    font-size: 12px;
    color: #94a3b8;
}

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

/* ── LOGIN PAGE ── */
.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.2rem;
    background: linear-gradient(135deg, #002066 0%, #d1d6db 50%, #002066 100%);
}

.login-panel {
    width: min(460px, 96vw);
    border-radius: 1rem;
    border: 1px solid #d6e0ec;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(30, 41, 59, 0.08), 0 1px 3px rgba(30, 41, 59, 0.06);
    padding: 2rem 2.2rem;
    color: #1e293b;
}

.login-header .kicker {
    margin: 0;
}

.login-header .login-brand {
    display: block;
    height: 26px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.login-header h1 {
    margin: 0.32rem 0 0;
    font-size: 1.32rem;
    color: #585858;
    outline: none;
}

.login-header .sub {
    margin: 0.45rem 0 0;
    font-size: 0.82rem;
    color: #64748b;
}

.login-form {
    margin-top: 1rem;
    display: grid;
    gap: 0.55rem;
}

.login-form label {
    font-size: 0.75rem;
    color: #475569;
    font-weight: 600;
}

.login-form input {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
    border-radius: 0.5rem;
    padding: 0.55rem 0.65rem;
    font-size: 0.86rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.15rem;
    color: #475569;
    font-size: 0.78rem;
}

.remember-me input[type="checkbox"] {
    width: 0.9rem;
    height: 0.9rem;
    margin: 0;
}

.login-form button {
    margin-top: 0.5rem;
    border: none;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.6rem;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.login-form button:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.login-form button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

/* ── Password Field ── */
.password-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field-wrapper input {
    flex: 1;
    padding-right: 2.25rem;
}

.password-icon {
    position: absolute;
    right: 0.65rem;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s ease;
}

.password-icon:hover {
    color: #64748b;
}

.login-error {
    margin-top: 0.85rem;
    border: 1px solid #fca5a5;
    background: #fef2f2;
    color: #991b1b;
    border-radius: 0.5rem;
    padding: 0.55rem 0.7rem;
    font-size: 0.8rem;
}

.legacy-launch-btn {
    border: 1px solid #4d6483;
    background: #22344b;
    color: #ebf3ff;
    border-radius: 0.45rem;
    padding: 0.42rem 0.66rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
}

.legacy-launch-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.legacy-launch-error {
    display: block;
    margin-top: 0.45rem;
    color: #cc4f4f;
    font-size: 0.74rem;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
    background: #8a8fa0;
    border: 3px solid #f0f0f0;
    border-radius: 7px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6a6f80;
}

/* ── STRADDLE EXTERNAL LINKS ── */
.straddle-link {
    color: #7b1e3a;
    font-weight: 700;
    text-decoration: underline;
}

.straddle-link:hover {
    color: #5a1028;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .card-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .home-dashboard {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .home-dashboard {
        margin: 0 auto;
    }

    .card-grid-3,
    .card-grid-4 {
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .card-grid-3,
    .card-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ── Keyboard hint (desktop only, OS-aware) ────────────────────────── */
/* Hidden by default; shown only on devices with a fine pointer (mouse/trackpad).
   Touch-only devices (phones, tablets without mouse) never see it. */
.kbd-hint {
    display: none;
}

@media (pointer: fine) {
    .kbd-hint {
        display: block;
        margin-top: 18px;
        text-align: center;
        font-size: 11px;
        color: #c1c6cb;
        user-select: none;
    }
}

.kbd-hint .kbd-mod {
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    padding: 0 3px;
    background: transparent;
    border: none;
    color: inherit;
}

/* Default label. Overridden for Mac below. */
.kbd-hint .kbd-mod::before {
    content: "Ctrl";
}

html[data-platform="mac"] .kbd-hint .kbd-mod::before {
    content: "\2318"; /* ⌘ */
}
