/* =========================================================================
   Uncorrelated Meet — shared styles (Sprint 1 Week 1 stub)
   Canonical brand tokens per brand-assets/UNCORRELATED-BRAND-COMPACT.md
   Rule 13 typography minimums. Dark-first. Miami Blue cross-event accent.
   ========================================================================= */

:root {
    /* Brand backgrounds (Uncorrelated dark surface hierarchy) */
    --bg:           #0F0E0C;            /* canonical warm near-black */
    --surface:      #1A1814;
    --surface-2:    #24221C;
    --surface-3:    #2E2C24;

    /* Text (white on dark, three tiers) */
    --text-1:       rgba(255,255,255,0.92);
    --text-2:       rgba(255,255,255,0.55);
    --text-3:       rgba(255,255,255,0.35);

    /* Accent — Miami Blue (cross-event year-round product accent) */
    --accent:           #0CC0DF;
    --accent-lt:        #5DD5EF;
    --accent-dim:       rgba(12,192,223,0.10);
    --accent-border:    rgba(12,192,223,0.28);

    /* State / borders */
    --border:       rgba(255,255,255,0.07);
    --border-hi:    rgba(12,192,223,0.28);
    --error:        #ef4444;

    /* Typography (Rule 13) */
    --font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono:           ui-monospace, SFMono-Regular, Menlo, Monaco, 'Cascadia Mono', monospace;
    --fs-body:        16px;
    --fs-input:       16px;
    --fs-heading-sm:  17px;
    --fs-heading-lg:  28px;
    --fs-secondary:   14px;
    --fs-label:       13px;
    --lh-body:        1.5;
    --lh-heading:     1.3;
    --lh-label:       1.4;

    /* Layout primitives */
    --radius:       12px;
    --radius-sm:    8px;
    --touch:        44px;
    --touch-mobile: 48px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text-1);
    font-family: var(--font);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover { color: var(--accent-lt); }

/* Wordmark — uncorrelated. + MEET sub-mark */
.wordmark {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    font-family: var(--font);
    line-height: 1;
}
.wordmark-primary {
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.01em;
}
.wordmark-suffix {
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* Layout shells */
.shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.shell-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shell-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.shell-footer {
    padding: 16px 32px;
    border-top: 1px solid var(--border);
    color: var(--text-3);
    font-size: var(--fs-label);
    line-height: var(--lh-label);
    text-align: center;
}

/* Auth card */
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 32px;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.auth-card h1 {
    font-size: var(--fs-heading-lg);
    font-weight: 600;
    line-height: var(--lh-heading);
    color: var(--text-1);
    margin: 0 0 8px;
}

.auth-card p {
    font-size: var(--fs-secondary);
    line-height: var(--lh-body);
    color: var(--text-2);
    margin: 0 0 28px;
}

/* Primary CTA — solid Miami Blue (Rule 3.1) */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: var(--touch);
    padding: 12px 20px;
    background: var(--accent);
    color: var(--bg);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: var(--fs-body);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary:hover {
    background: transparent;
    color: var(--accent);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Secondary CTA — outlined neutral (Rule 3.2) */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--touch);
    padding: 10px 18px;
    background: transparent;
    color: var(--text-1);
    border: 1px solid rgba(255,255,255,0.30);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: var(--fs-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.50);
}

/* Dashboard placeholder card */
.dashboard-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    width: 100%;
    max-width: 640px;
}

.dashboard-card h1 {
    font-size: var(--fs-heading-lg);
    font-weight: 600;
    line-height: var(--lh-heading);
    color: var(--text-1);
    margin: 0 0 8px;
}

.dashboard-card .lead {
    font-size: var(--fs-body);
    color: var(--text-2);
    margin: 0 0 24px;
}

.profile-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface-3);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--fs-heading-sm);
    overflow: hidden;
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-meta {
    flex: 1;
    min-width: 0;
}
.profile-name {
    font-size: var(--fs-body);
    font-weight: 500;
    color: var(--text-1);
    margin: 0 0 2px;
}
.profile-email {
    font-size: var(--fs-secondary);
    color: var(--text-2);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.placeholder {
    background: var(--surface-2);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 24px;
    color: var(--text-3);
    font-size: var(--fs-secondary);
    line-height: var(--lh-body);
    text-align: center;
}

/* Error states */
.error-banner {
    background: rgba(239,68,68,0.10);
    border: 1px solid rgba(239,68,68,0.30);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: #fca5a5;
    font-size: var(--fs-secondary);
    line-height: var(--lh-body);
    margin-bottom: 20px;
    text-align: left;
}

.loading {
    color: var(--text-3);
    font-size: var(--fs-secondary);
}

/* Google "G" icon — inline SVG sized */
.btn-primary svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Mobile bumps — Rule 13 (48px touch targets, 16px+ body / 13px+ floor) */
@media (max-width: 640px) {
    .shell-header { padding: 16px 20px; }
    .shell-main { padding: 16px; }
    .shell-footer { padding: 12px 20px; }
    .auth-card { padding: 32px 24px; }
    .dashboard-card { padding: 24px; }
    .btn-primary,
    .btn-secondary { min-height: var(--touch-mobile); }
}


/* =========================================================================
   Week 2 additions
   ========================================================================= */

.dashboard-stack { display: grid; gap: 16px; width: 100%; max-width: 720px; }

.dashboard-card .card-title { font-size: var(--fs-heading-sm); font-weight: 600; color: var(--text-1); margin: 0 0 4px; line-height: var(--lh-heading); }
.dashboard-card .card-sub { font-size: var(--fs-secondary); color: var(--text-2); line-height: var(--lh-body); margin: 0 0 16px; }

.start-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.start-cta { flex: 1; min-width: 200px; }
.start-result { margin: 0 0 12px; }
.start-success { background: var(--accent-dim); border: 1px solid var(--accent-border); border-radius: var(--radius-sm); padding: 14px 16px; }
.start-success-title { font-size: var(--fs-body); color: var(--text-1); font-weight: 500; margin-bottom: 10px; }
.start-success-time { font-size: var(--fs-secondary); color: var(--text-2); font-weight: 400; }
.start-success-link { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.start-success-link input { flex: 1; min-width: 200px; background: var(--bg); border: 1px solid var(--border); color: var(--text-1); border-radius: var(--radius-sm); padding: 8px 10px; font-family: var(--mono); font-size: var(--fs-secondary); line-height: var(--lh-body); min-height: var(--touch); outline: none; }
.start-success-link input:focus { border-color: var(--accent); }

.schedule-form { display: grid; grid-template-columns: 1fr 1fr 140px; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.schedule-form .field { display: flex; flex-direction: column; gap: 4px; }
.schedule-form .field-label { font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-2); letter-spacing: 0.02em; }
.schedule-form input[type=text], .schedule-form input[type=datetime-local], .schedule-form select { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-1); font-family: var(--font); font-size: var(--fs-input); line-height: var(--lh-body); padding: 10px 12px; border-radius: var(--radius-sm); min-height: var(--touch); outline: none; }
.schedule-form input:focus, .schedule-form select:focus { border-color: var(--accent); }
.schedule-form .form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }

.meetings-list { display: flex; flex-direction: column; gap: 8px; }
.meeting-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.meeting-main { min-width: 0; flex: 1; }
.meeting-title { font-size: var(--fs-body); color: var(--text-1); font-weight: 500; line-height: var(--lh-heading); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meeting-meta { font-size: var(--fs-secondary); color: var(--text-2); margin-top: 2px; line-height: var(--lh-label); }
.meeting-role { color: var(--accent); text-transform: uppercase; font-size: var(--fs-label); letter-spacing: 0.04em; }
.meeting-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.meeting-status { font-size: var(--fs-label); line-height: var(--lh-label); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); text-transform: capitalize; }
.meeting-status.status-planned     { color: var(--accent); border-color: var(--accent-border); background: var(--accent-dim); }
.meeting-status.status-in_progress { color: #facc15; border-color: rgba(250,204,21,0.28); background: rgba(250,204,21,0.10); }
.meeting-status.status-completed   { color: var(--text-3); border-color: var(--border); }
.meeting-status.status-cancelled   { color: #fca5a5; border-color: rgba(239,68,68,0.28); background: rgba(239,68,68,0.06); }
.btn-mini { min-height: 36px; padding: 6px 12px; font-size: var(--fs-secondary); text-decoration: none; }

.join-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.join-ready { width: 100%; display: flex; justify-content: center; }
.join-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 28px; width: 100%; max-width: 480px; }
.join-card h1 { font-size: var(--fs-heading-lg); font-weight: 600; line-height: var(--lh-heading); color: var(--text-1); margin: 0 0 8px; }
.join-card .lead { font-size: var(--fs-body); color: var(--text-2); margin: 0 0 6px; }
.join-card .lead strong { color: var(--text-1); font-weight: 500; }
.join-card .card-sub { font-size: var(--fs-secondary); color: var(--text-3); margin: 0 0 24px; }
.join-card .field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.join-card input { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-1); font-family: var(--font); font-size: var(--fs-input); line-height: var(--lh-body); padding: 10px 12px; border-radius: var(--radius-sm); min-height: var(--touch); outline: none; }
.join-card input:focus { border-color: var(--accent); }
.join-frame-wrap { width: 100%; height: calc(100vh - 80px); min-height: 480px; }
.join-frame-wrap iframe { width: 100%; height: 100%; border: 0; border-radius: var(--radius-sm); }
.join-error { width: 100%; max-width: 480px; }

.meeting-context { display: flex; gap: 8px; align-items: center; }
.meeting-chip { font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-1); padding: 4px 10px; border-radius: 999px; background: var(--accent-dim); border: 1px solid var(--accent-border); }
.meeting-chip.subtle { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }

@media (max-width: 640px) {
    .schedule-form { grid-template-columns: 1fr; }
    .meeting-row { flex-direction: column; align-items: stretch; }
    .meeting-actions { justify-content: flex-end; }
    .start-success-link { flex-direction: column; align-items: stretch; }
    .start-success-link input { min-width: 0; }
}
