/* Meet Less Dashboard — Phase 6 styles (ported from mockup) */

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

/* The hidden attribute must beat class display rules (e.g. .m3-btn-filled's
   inline-flex), or JS-toggled visibility silently fails (#183). */
[hidden] { display: none !important; }

        body {
            font-family: 'Google Sans Text', 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background-color: #f8f9fa;
            color: #202124;
            line-height: 1.5;
        }

        /* ── Header ── */
        .header {
            background: #ffffff;
            border-bottom: 1px solid #dadce0;
            padding: 16px 24px;
            position: sticky;
            top: 0;
            z-index: 100;
        }
        .header-content {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .logo-section { display: flex; align-items: center; }
        .header-title { font-size: 20px; font-weight: 500; color: #202124; }
        .user-info { display: flex; align-items: center; gap: 8px; color: #5f6368; font-size: 14px; }

        /* ── Layout ── */
        .layout { display: flex; max-width: 1400px; margin: 0 auto; }

        /* ── Left Nav ── */
        .left-nav {
            width: 220px;
            flex-shrink: 0;
            padding: 24px 0;
            border-right: 1px solid #dadce0;
            background: #ffffff;
            min-height: calc(100vh - 65px);
        }
        .nav-section-label {
            font-size: 11px;
            font-weight: 600;
            color: #9aa0a6;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            padding: 0 16px 8px;
        }
        .nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 16px;
            font-size: 14px;
            color: #5f6368;
            cursor: pointer;
            border-radius: 0 24px 24px 0;
            margin-right: 12px;
            transition: background 0.15s, color 0.15s;
        }
        .nav-item:hover { background: #f1f3f4; color: #202124; }
        .nav-item.active {
            background: #e8f0fe;
            color: #1a73e8;
            font-weight: 500;
        }
        .nav-item .material-icons-round { font-size: 20px; }
        .nav-divider { height: 1px; background: #f1f3f4; margin: 12px 16px; }

        /* ── Main Content ── */
        .main-content { flex: 1; padding: 32px 48px 48px; min-width: 0; }

        .page-header { margin-bottom: 24px; }
        .page-title { font-size: 26px; font-weight: 400; color: #202124; margin-bottom: 4px; }
        .page-subtitle { font-size: 14px; color: #5f6368; }

        /* ── M3 Upload Card ── */
        .upload-card {
            background: #ffffff;
            border: 1px solid #dadce0;
            border-radius: 12px;
            padding: 24px;
            margin-bottom: 20px;
        }

        .upload-card-title {
            font-size: 16px;
            font-weight: 500;
            color: #202124;
            margin-bottom: 4px;
        }
        .upload-card-subtitle {
            font-size: 13px;
            color: #5f6368;
            margin-bottom: 20px;
        }

        /* M3 Drop Zone */
        .m3-drop-zone {
            border: 2px dashed #c4c7c5;
            border-radius: 12px;
            background: #f8f9fa;
            padding: 22px 32px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            cursor: pointer;
            transition: border-color 0.2s, background 0.2s;
            position: relative;
        }
        .m3-drop-zone:hover,
        .m3-drop-zone.dragover {
            border-color: #1a73e8;
            background: #e8f0fe;
        }
        .m3-drop-zone input[type="file"] {
            position: absolute;
            inset: 0;
            opacity: 0;
            cursor: pointer;
            width: 100%;
            height: 100%;
        }

        .drop-zone-icon {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: #e8f0fe;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #1a73e8;
            margin-bottom: 4px;
        }
        .drop-zone-icon .material-icons-round { font-size: 28px; }

        .drop-zone-primary {
            font-size: 14px;
            font-weight: 500;
            color: #202124;
            text-align: center;
        }
        .drop-zone-primary span {
            color: #1a73e8;
            text-decoration: underline;
            text-underline-offset: 2px;
        }
        .drop-zone-secondary {
            font-size: 12px;
            color: #5f6368;
            text-align: center;
        }

        /* CSV template download */
        .template-download {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 12px;
            font-size: 13px;
        }
        .template-download .material-icons-round {
            font-size: 18px;
            color: #5f6368;
        }
        .template-download a {
            color: #1a73e8;
            text-decoration: none;
        }
        .template-download a:hover {
            text-decoration: underline;
            text-underline-offset: 2px;
        }
        .template-download-hint {
            color: #5f6368;
        }

        /* File selected state */
        .file-selected-row {
            display: none;
            align-items: center;
            gap: 12px;
            padding: 10px 16px;
            background: #f8f9fa;
            border: 1px solid #dadce0;
            border-radius: 8px;
            margin-top: 16px;
        }
        .file-selected-row.visible { display: flex; }
        .file-icon {
            color: #1a73e8;
            flex-shrink: 0;
        }
        .file-icon .material-icons-round { font-size: 24px; }
        .file-name {
            flex: 1;
            font-size: 14px;
            color: #202124;
            font-weight: 500;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .file-size {
            font-size: 12px;
            color: #5f6368;
            white-space: nowrap;
        }
        .file-remove {
            color: #5f6368;
            cursor: pointer;
            padding: 4px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            transition: background 0.15s;
        }
        .file-remove:hover { background: #f1f3f4; color: #202124; }
        .file-remove .material-icons-round { font-size: 18px; }

        /* Burden multiplier note */
        .burden-note {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            margin-top: 20px;
            padding: 12px 16px;
            background: #f8f9fa;
            border-radius: 8px;
            font-size: 13px;
            color: #5f6368;
        }
        .burden-note .material-icons-round {
            font-size: 16px;
            color: #9aa0a6;
            flex-shrink: 0;
            margin-top: 1px;
        }

        /* M3 Filled Button */
        .m3-btn-row {
            display: flex;
            justify-content: flex-end;
            margin-top: 24px;
        }
        .m3-btn-filled {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 24px;
            background: #1a73e8;
            color: #ffffff;
            border: none;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 500;
            font-family: inherit;
            cursor: pointer;
            transition: background 0.15s, box-shadow 0.15s;
            letter-spacing: 0.01em;
        }
        .m3-btn-filled:hover { background: #1765cc; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
        .m3-btn-filled:disabled {
            background: #c4c7c5;
            color: #ffffff;
            cursor: not-allowed;
            box-shadow: none;
        }
        .m3-btn-filled .material-icons-round { font-size: 18px; }

        /* CSV format helper */
        .format-hint {
            background: #f8f9fa;
            border: 1px solid #dadce0;
            border-radius: 12px;
            padding: 16px 20px;
            margin-bottom: 20px;
        }
        .format-hint-title {
            font-size: 13px;
            font-weight: 600;
            color: #202124;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .format-hint-title .material-icons-round { font-size: 16px; color: #5f6368; }
        .csv-preview {
            font-family: 'Roboto Mono', monospace;
            font-size: 13px;
            color: #202124;
            background: #ffffff;
            border: 1px solid #dadce0;
            border-radius: 6px;
            overflow: hidden;
        }
        .csv-table {
            width: auto;
            border-collapse: collapse;
        }
        .csv-table td {
            padding: 7px 20px;
            font-family: 'Roboto Mono', monospace;
            font-size: 13px;
            border-bottom: 1px solid #f1f3f4;
            white-space: nowrap;
        }
        .csv-table tr:last-child td { border-bottom: none; }
        .csv-table .col-email { text-align: left; }
        .csv-table .col-dept  { text-align: center; border-left: 1px solid #f1f3f4; }
        .csv-table .col-rate  { text-align: center; border-left: 1px solid #f1f3f4; }
        .csv-table .csv-header td {
            color: #1a73e8;
            font-weight: 500;
            background: #f8f9fa;
            border-bottom: 1px solid #dadce0;
        }
        .csv-table .csv-row td { color: #5f6368; }

        /* ── Audit Trail ── */
        .audit-card {
            display: none;
            background: #ffffff;
            border: 1px solid #dadce0;
            border-radius: 12px;
            padding: 28px 32px;
            margin-bottom: 24px;
        }
        .audit-card.visible { display: block; }

        .audit-title {
            font-size: 16px;
            font-weight: 500;
            color: #202124;
            margin-bottom: 20px;
        }

        .audit-step {
            display: flex;
            align-items: flex-start;
            gap: 16px;
            padding: 12px 0;
        }
        .audit-step + .audit-step {
            border-top: 1px solid #f1f3f4;
        }
        .audit-step-icon {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: #e6f4ea;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .audit-step-icon .material-icons-round {
            font-size: 18px;
            color: #137333;
        }
        .audit-step-body { flex: 1; }
        .audit-step-label {
            font-size: 14px;
            font-weight: 500;
            color: #202124;
        }
        .audit-step-detail {
            font-size: 13px;
            color: #5f6368;
            margin-top: 2px;
        }

        /* ── Error state ── */
        .error-banner {
            display: none;
            align-items: flex-start;
            gap: 10px;
            padding: 14px 16px;
            background: #fce8e6;
            border: 1px solid #f28b82;
            border-radius: 8px;
            margin-top: 16px;
            font-size: 13px;
            color: #c5221f;
        }
        .error-banner.visible { display: flex; }
        /* The header's sign-in banner: same component, matched to the header's
           own content width so it lines up under the sign-in buttons. */
        .sign-in-error-banner {
            max-width: 1400px;
            margin: 12px auto 0;
        }
        .error-banner .material-icons-round { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
        .error-banner-text { line-height: 1.5; }
        .error-banner-text strong { font-weight: 500; display: block; margin-bottom: 2px; }

        /* Scenario toggle (mockup only) */
        .scenario-bar {
            position: fixed;
            bottom: 24px;
            right: 24px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            z-index: 200;
        }
        .scenario-btn {
            padding: 8px 16px;
            border-radius: 20px;
            border: 1px solid #dadce0;
            background: white;
            font-size: 12px;
            font-weight: 500;
            color: #5f6368;
            cursor: pointer;
            font-family: inherit;
            transition: background 0.15s;
            box-shadow: 0 1px 4px rgba(0,0,0,0.12);
        }
        .scenario-btn:hover { background: #f1f3f4; color: #202124; }
        .scenario-label {
            font-size: 11px;
            color: #9aa0a6;
            text-align: right;
            padding-right: 4px;
        }

/* ── Connection status ── */
.connection-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #5f6368; }
.connection-status.connected .status-indicator { color: #137333; }
.connection-status.error .status-indicator { color: #c5221f; }

/* ── Meeting Spend View — Phase 7 ── */
#view-meeting-spend {
    max-width: 1000px;
}
.ms-month-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}
.ms-month-label {
    font-size: 14px;
    color: #5f6368;
    white-space: nowrap;
}
.ms-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.ms-select {
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 8px 36px 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ms-select:hover { border-color: #1a73e8; }
.ms-select:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 2px rgba(26,115,232,0.2); }
.ms-select-chevron {
    position: absolute;
    right: 10px;
    font-size: 18px;
    color: #5f6368;
    pointer-events: none;
}
.ms-baseline-chip {
    font-size: 12px;
    font-weight: 500;
    color: #5f6368;
    background: #f1f3f4;
    border-radius: 12px;
    padding: 4px 12px;
    white-space: nowrap;
}

/* KPI Cards */
.ms-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}
.ms-kpi-card {
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 12px;
    padding: 20px;
}
.ms-kpi-card--highlight {
    border-color: #34a853;
    border-left: 4px solid #34a853;
    background: #f6fef8;
}
.ms-kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}
.ms-kpi-value {
    font-size: 28px;
    font-weight: 400;
    color: #202124;
    margin-bottom: 6px;
    line-height: 1.1;
}
.ms-kpi-card--highlight .ms-kpi-value {
    color: #137333;
}
.ms-kpi-delta {
    font-size: 13px;
    font-weight: 500;
    color: #137333;
    margin-bottom: 4px;
}
.ms-kpi-baseline {
    font-size: 12px;
    color: #9aa0a6;
}

/* Group Comparison Table */
.ms-table-card {
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 48px;
}
.ms-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.ms-table colgroup .col-group   { width: 34%; }
.ms-table colgroup .col-num     { width: 16%; }
.ms-table colgroup .col-savings { width: 18%; }
.ms-table thead tr {
    background: #f8f9fa;
    border-bottom: 2px solid #dadce0;
}
.ms-table th {
    padding: 13px 16px;
    font-size: 11px;
    font-weight: 600;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: right;
    white-space: nowrap;
    line-height: 1.4;
}
.ms-table th.ms-th-group { text-align: left; }
.ms-table th.ms-th-num  { text-align: center; }
.ms-table th.ms-th-savings { text-align: center; }
.ms-th-savings { color: #137333; }
.ms-table tbody tr {
    border-bottom: 1px solid #f1f3f4;
    transition: background 0.1s;
}
.ms-table tbody tr:last-child { border-bottom: none; }
.ms-table tbody tr:hover { background: #f8f9fa; }
.ms-td-group {
    padding: 15px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ms-td-num {
    padding: 15px 16px;
    font-size: 14px;
    color: #5f6368;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.ms-td-savings {
    padding: 15px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #137333;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.ms-td-center {
    text-align: center;
}
