/* =========================================================================
   @core/ui — shared design tokens + base component styles
   The app's accent color is set by overriding --brand on :root.
   ========================================================================= */

:root {
    /* Palette */
    --brand:        #2563eb;   /* default accent; products override this */
    --brand-dark:   #1e40af;
    --bg:           #f5f7fa;
    --surface:      #ffffff;
    --border:       #e3e8ef;
    --text:         #1a2433;
    --text-muted:   #5b6b82;
    --danger:       #dc2626;
    --success:      #16a34a;

    /* Spacing scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;

    --radius: 10px;
    --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.06);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* App shell */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-5);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.app-header .brand {
    font-weight: 700;
    font-size: 18px;
    color: var(--brand);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.app-main {
    max-width: 960px;
    margin: 0 auto;
    padding: var(--space-5);
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
}
.card h2 { margin-top: 0; font-size: 16px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    border: none;
    border-radius: var(--radius);
    padding: var(--space-3) var(--space-4);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: var(--brand);
    color: #fff;
    transition: background 0.15s ease;
}
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: transparent; color: var(--brand); border: 1px solid var(--border); }
.btn.danger { background: var(--danger); }

/* Forms */
.field { margin-bottom: var(--space-4); }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: var(--space-1); color: var(--text-muted); }
.field input, .field select {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font);
}

/* Lists / tables */
.list { list-style: none; margin: 0; padding: 0; }
.list li {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.list li:last-child { border-bottom: none; }

.muted { color: var(--text-muted); }
.empty { text-align: center; color: var(--text-muted); padding: var(--space-6); }

/* Centered auth screens */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}
.auth-card { width: 100%; max-width: 360px; }
