/* bout 6.5 (R6): style allauth's classic auth forms to the carried-site look.
 * allauth renders fields via Django's form rendering, so the widget <input>s
 * carry no Tailwind classes — we scope these rules to the auth card (.auth-card)
 * our layout wraps the form in. Kept minimal: inputs + submit button only. */

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="url"],
.auth-card input[type="tel"],
.auth-card select,
.auth-card textarea {
    width: 100%;
    background-color: #1f2937;      /* gray-800 */
    border: 1px solid #374151;      /* gray-700 */
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    color: #ffffff;
    font-size: 0.95rem;
}

.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
    outline: none;
    border-color: #0e7490;          /* cyan-700 */
    box-shadow: 0 0 0 1px #0e7490;
}

.auth-card button[type="submit"],
.auth-card button:not([type]) {
    background-color: #0e7490;       /* cyan-700 */
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.auth-card button[type="submit"]:hover,
.auth-card button:not([type]):hover {
    background-color: #0891b2;       /* cyan-600 */
}

.auth-card a { color: #22d3ee; }     /* cyan-400 links */
.auth-card a:hover { color: #67e8f9; }

/* 2026-07-11 Captain review round 2: spacing + conventional OAuth buttons. */

/* Breathing room between form paragraphs/labels (allauth renders as_p-style). */
.auth-card p { margin: 0 0 1rem 0; }
.auth-card label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    color: #9ca3af;               /* gray-400 */
}
.auth-card h1, .auth-card h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.auth-card form { margin-top: 0.5rem; }
.auth-card button[type="submit"], .auth-card button:not([type]) {
    width: 100%;
    padding: 0.6rem 1rem;
    margin-top: 0.5rem;
}
.auth-card hr {
    border: 0;
    border-top: 1px solid #374151;
    margin: 1.5rem 0 1rem;
}

/* Provider buttons: conventional OAuth proportions, one per row. */
.provider-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.75rem;
}
.provider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #374151;      /* gray-700 */
    border-radius: 0.375rem;
    background-color: #111827;      /* gray-900 */
    color: #e5e7eb !important;      /* gray-200; override .auth-card a cyan */
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s;
}
.provider-btn:hover {
    background-color: #1f2937;      /* gray-800 */
    border-color: #4b5563;          /* gray-600 */
    color: #ffffff !important;
}
.provider-icon { width: 18px; height: 18px; flex: none; }

/* 2026-07-11 round 3 (Captain's connections/email screens): integrate the
 * radio rows, give buttons a hierarchy, glow the provider buttons. */

/* Radio rows (email list, connections list): bordered card rows instead of a
 * floating dot over grey text. :has() — all evergreen browsers. */
.auth-card p:has(> input[type="radio"]) {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: #1f2937;          /* gray-800 */
    border: 1px solid #374151;          /* gray-700 */
    border-radius: 0.375rem;
    padding: 0.6rem 0.9rem;
    margin: 0 0 0.6rem 0;
    cursor: pointer;
    transition: border-color 0.15s;
}
.auth-card p:has(> input[type="radio"]:checked) {
    border-color: #0e7490;              /* cyan-700 */
}
.auth-card input[type="radio"] {
    accent-color: #06b6d4;              /* cyan-500 */
    width: 1rem;
    height: 1rem;
    flex: none;
    margin: 0;
}
.auth-card p:has(> input[type="radio"]) label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0;
    font-size: 0.95rem;
    color: #e5e7eb;
    cursor: pointer;
}

/* Status chips (badge element). */
.badge-el {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.badge-success { background-color: rgba(16,185,129,.15); color: #34d399; border: 1px solid rgba(16,185,129,.35); }
.badge-warning { background-color: rgba(245,158,11,.15); color: #fbbf24; border: 1px solid rgba(245,158,11,.35); }
.badge-neutral { background-color: rgba(6,182,212,.15); color: #22d3ee; border: 1px solid rgba(6,182,212,.35); }

/* Button hierarchy: primary solid, secondary ghost, danger red outline.
 * Action rows sit side-by-side instead of a stack of identical slabs. */
.btn-el {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn-primary-el { background-color: #0e7490; color: #fff; }
.btn-primary-el:hover { background-color: #0891b2; }
.btn-secondary {
    background-color: transparent;
    border-color: #374151;
    color: #d1d5db;
}
.btn-secondary:hover { border-color: #0e7490; color: #fff; }
.btn-danger {
    background-color: transparent;
    border-color: rgba(239,68,68,.4);
    color: #f87171;
}
.btn-danger:hover { background-color: rgba(239,68,68,.1); border-color: #ef4444; }

/* allauth MULTI-action forms (email screen's Make Primary / Re-send / Remove;
 * connections' Remove sits alone but next to the list): buttons inline with a
 * gap, auto width — no stack of identical slabs. Single-button forms (login,
 * signup, reset) KEEP the full-width primary slab. */
.auth-card form:has(.btn-el + .btn-el) {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}
.auth-card form:has(.btn-el + .btn-el) > p:has(> input[type="radio"]) {
    flex-basis: 100%;
}
.auth-card form:has(.btn-el + .btn-el) .btn-el {
    width: auto;
    margin-top: 0;
    flex: 1 1 auto;
}

/* Provider buttons: subtle cyan glow on hover — "merge it all elegantly". */
.provider-btn:hover {
    box-shadow: 0 0 12px rgba(34,211,238,0.25), 0 0 2px rgba(34,211,238,0.4);
}

/* Section headings inside auth pages ("Add Email Address", "Add a Third-Party
 * Account"): separated sections, not run-on text. */
.auth-card h2 {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #374151;
    font-size: 1.05rem;
}

/* Help tooltips (world keys — plain-words explanations for non-technicals).
 * Native title tooltip; the chip just needs to look pressable/hoverable. */
.help-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 9999px;
    border: 1px solid #4b5563;      /* gray-600 */
    color: #9ca3af;                 /* gray-400 */
    font-size: 0.7rem;
    font-weight: 700;
    cursor: help;
    vertical-align: middle;
    margin-left: 0.25rem;
    user-select: none;
}
.help-tip:hover { border-color: #22d3ee; color: #22d3ee; }

/* R2 (2026-07-12): mint-key modal. Plain CSS (ow-modal-* prefixes) — immune to
 * the compiled-tailwind content-scan gap. Dark scrim, centered card. */
.ow-modal-scrim {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 60;
}
.ow-modal-card {
    background-color: #111827;          /* gray-900 */
    border: 1px solid #374151;          /* gray-700 */
    border-radius: 0.5rem;
    padding: 1.75rem;
    max-width: 32rem;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.ow-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
}
.ow-modal-warn {
    font-size: 0.85rem;
    color: #fbbf24;                     /* amber-400 */
    margin: 0 0 1rem 0;
}
.ow-modal-keyrow {
    background-color: #1f2937;          /* gray-800 */
    border: 1px solid #374151;          /* gray-700 */
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 1.25rem;
}
.ow-modal-key {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #67e8f9;                     /* cyan-300 */
    font-size: 0.85rem;
    word-break: break-all;
}
.ow-modal-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
}

/* R3 (2026-07-12): shared copy-button "copied" feedback state. Subtle swap to a
 * confirming green while the label reads "copied" (~1.5s, JS-toggled). */
.copy-btn.copied {
    background-color: #059669 !important;   /* emerald-600 */
    border-color: #059669 !important;
    color: #ffffff !important;
}

/* bout OPS-3 (2026-07-12): staff-only usage stats (/account/stats). Plain CSS,
 * ow-stats-* prefix — immune to the compiled-tailwind content-scan gap. Charts
 * are server-rendered CSS-width bars, no JS libs. */
.ow-stats-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.ow-stats-tile {
    flex: 1 1 8rem;
    background-color: #111827;          /* gray-900 */
    border: 1px solid #1f2937;          /* gray-800 */
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
}
.ow-stats-tile-num {
    font-size: 1.9rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.ow-stats-tile-label {
    font-size: 0.8rem;
    color: #9ca3af;                     /* gray-400 */
    margin-top: 0.15rem;
}
.ow-stats-h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e5e7eb;                     /* gray-200 */
    margin: 2rem 0 0.75rem;
}
.ow-stats-sub {
    font-size: 0.8rem;
    font-weight: 400;
    color: #6b7280;                     /* gray-500 */
    margin-left: 0.4rem;
}
.ow-stats-empty {
    font-size: 0.85rem;
    color: #6b7280;                     /* gray-500 */
}
.ow-stats-chart {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.ow-stats-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
}
.ow-stats-row-label {
    flex: 0 0 5.5rem;
    color: #9ca3af;                     /* gray-400 */
    font-variant-numeric: tabular-nums;
}
.ow-stats-bar-track {
    flex: 1 1 auto;
    display: flex;
    height: 1.1rem;
    background-color: #1f2937;          /* gray-800 */
    border-radius: 0.25rem;
    overflow: hidden;
}
.ow-stats-bar {
    display: block;
    height: 100%;
    background-color: #0891b2;          /* cyan-600 */
    border-radius: 0.25rem 0 0 0.25rem;
    min-width: 1px;
}
.ow-stats-seg {
    display: block;
    height: 100%;
    min-width: 1px;
}
.ow-stats-row-val {
    flex: 0 0 2.5rem;
    text-align: right;
    color: #d1d5db;                     /* gray-300 */
    font-variant-numeric: tabular-nums;
}
.ow-stats-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.78rem;
    color: #9ca3af;                     /* gray-400 */
}
.ow-stats-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.ow-stats-swatch {
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 0.15rem;
}
/* Stacked-segment / swatch palette — 7 slots (top-6 types + "other"). */
.ow-stats-c0 { background-color: #22d3ee; }  /* cyan-400 */
.ow-stats-c1 { background-color: #818cf8; }  /* indigo-400 */
.ow-stats-c2 { background-color: #34d399; }  /* emerald-400 */
.ow-stats-c3 { background-color: #fbbf24; }  /* amber-400 */
.ow-stats-c4 { background-color: #f472b6; }  /* pink-400 */
.ow-stats-c5 { background-color: #a78bfa; }  /* violet-400 */
.ow-stats-c6 { background-color: #6b7280; }  /* gray-500 = "other" */
.ow-stats-table {
    display: flex;
    flex-direction: column;
    border: 1px solid #1f2937;          /* gray-800 */
    border-radius: 0.5rem;
    overflow: hidden;
}
.ow-stats-trow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    border-top: 1px solid #1f2937;      /* gray-800 */
}
.ow-stats-trow:first-child { border-top: none; }
.ow-stats-tname {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ow-stats-tmeta {
    color: #9ca3af;                     /* gray-400 */
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    flex: 0 0 auto;
}
