/* ════════════════════════════════════════════════════════════════════
 * PLATMA Bank 6.0 — Shared base styles
 * SQB brand palette + utility classes used across all 3 portals.
 * ══════════════════════════════════════════════════════════════════ */

:root {
    /* SQB primary palette (best-estimate from sqb.uz; awaiting brand book) */
    --sqb-navy:        #0E2954;
    --sqb-navy-dark:   #081B3A;
    --sqb-navy-light:  #1F4080;
    --sqb-green:       #1B7B4F;     /* green banking accent */
    --sqb-green-light: #2EA86F;
    --sqb-amber:       #C8A73F;     /* awards / heritage */

    /* Per-portal accents */
    --portal-banker:   #0E2954;     /* navy */
    --portal-owner:    #1B7B4F;     /* green */
    --portal-ops:      #2C2F38;     /* charcoal */

    /* AI signature colour (purple gradient) */
    --ai-purple:       #6E5BD8;
    --ai-purple-light: #8B7BE0;
    --ai-gradient:     linear-gradient(135deg, #6E5BD8 0%, #4338CA 100%);

    /* Status colours */
    --c-success:  #16A34A;
    --c-warning:  #D97706;
    --c-danger:   #DC2626;
    --c-info:     #0284C7;
    --c-neutral:  #6B7280;

    /* Greys */
    --bg:         #F8FAFC;
    --surface:    #FFFFFF;
    --surface-2:  #F1F5F9;
    --border:     #E2E8F0;
    --border-strong: #CBD5E1;
    --text:       #0F172A;
    --text-muted: #64748B;
    --text-subtle:#94A3B8;

    /* Typography */
    --font-sans: 'Inter', 'IBM Plex Sans', 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Layout */
    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 16px;
    --shadow:    0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--sqb-navy-light); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

/* ── Layout utilities ───────────────────────────────────────────── */

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

.row { display: flex; gap: 16px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 16px; }
.col { display: flex; flex-direction: column; gap: 12px; }

.center { display: flex; align-items: center; justify-content: center; }

.spacer-sm { height: 8px; }
.spacer { height: 16px; }
.spacer-lg { height: 32px; }

.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 28px; font-weight: 600; }
.font-bold { font-weight: 600; }
.font-medium { font-weight: 500; }

.mono { font-family: var(--font-mono); }

/* ── Header (shared) ─────────────────────────────────────────────── */

.platma-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.platma-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--sqb-navy);
}

.platma-header .brand img { height: 28px; }

.platma-header .badge-prod {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--sqb-green);
    color: white;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.platma-header .grow { flex: 1; }

.platma-header .header-actions { display: flex; gap: 12px; align-items: center; }

/* ── Locale switcher ─────────────────────────────────────────────── */

.locale-switcher {
    display: inline-flex;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.locale-switcher button {
    background: transparent;
    border: none;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.locale-switcher button.active {
    background: white;
    color: var(--sqb-navy);
    box-shadow: var(--shadow);
}

/* ── Buttons ─────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 13px;
    border: 1px solid transparent;
    transition: all 120ms ease;
    cursor: pointer;
}

.btn-primary { background: var(--sqb-navy); color: white; }
.btn-primary:hover { background: var(--sqb-navy-light); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }

.btn-success { background: var(--c-success); color: white; }
.btn-danger { background: var(--c-danger); color: white; }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 20px; font-size: 15px; }

/* ── Cards ───────────────────────────────────────────────────────── */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title { font-size: 15px; font-weight: 600; margin: 0; }

/* ── Status pills ────────────────────────────────────────────────── */

.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--surface-2);
    color: var(--text-muted);
}

.pill-success { background: #DCFCE7; color: #15803D; }
.pill-warning { background: #FEF3C7; color: #92400E; }
.pill-danger  { background: #FEE2E2; color: #991B1B; }
.pill-info    { background: #DBEAFE; color: #1E40AF; }
.pill-ai      { background: #EDE9FE; color: #5B21B6; }

/* ── Footer ──────────────────────────────────────────────────────── */

.platma-footer {
    margin-top: 40px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    line-height: 1.7;
}

.platma-footer .strong { color: var(--text); font-weight: 500; }

/* ── Skeleton ────────────────────────────────────────────────────── */

.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 0%, var(--border) 50%, var(--surface-2) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
    height: 14px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Form fields ────────────────────────────────────────────────── */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.field label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.field input, .field textarea, .field select {
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    width: 100%;
    transition: all 120ms ease;
}

.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--sqb-navy);
    box-shadow: 0 0 0 3px rgba(14, 41, 84, 0.1);
}

.field-error {
    font-size: 12px;
    color: var(--c-danger);
}

/* ── AI signature ─────────────────────────────────────────────────── */

.ai-mark {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ai-purple);
    font-weight: 500;
}

.ai-mark::before {
    content: "✨";
    font-size: 14px;
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .platma-header { padding: 0 16px; gap: 12px; }
    .container { padding: 0 16px; }
}
