/* Dashboard - Admin analytics (Wall Street Command Center) */

/* ===========================================================================
   WALL STREET COMMAND CENTER
   Bloomberg-terminal inspired dark admin analytics dashboard
   =========================================================================== */

/* ---- Dashboard Container ---- */
.ws-dashboard {
    background: #0a0e17;
    min-height: 100vh;
    color: #e2e8f0;
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.8125rem;
}

/* ---- Color Tokens ---- */
.ws-green { color: #00ff88 !important; }
.ws-red { color: #ff3366 !important; }
.ws-cyan { color: #00d4ff !important; }
.ws-purple { color: #a855f7 !important; }
.ws-blue { color: #c2714a !important; }
.ws-amber { color: #f59e0b !important; }
.ws-text-xs { font-size: 0.6875rem; }

/* ---- Header Bar ---- */
.ws-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(180deg, #111827 0%, #0d1117 100%);
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
    position: sticky;
    top: 0;
    z-index: 50;
}

.ws-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ws-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #00d4ff;
    text-transform: uppercase;
}

.ws-timestamp {
    font-size: 0.6875rem;
    color: #64748b;
    letter-spacing: 0.02em;
}

.ws-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ws-header-tabs {
    display: flex;
    gap: 0.25rem;
}

.ws-tab {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4375rem 0.875rem;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ws-tab:hover {
    color: #e2e8f0;
    background: rgba(255,255,255,0.04);
}

.ws-tab.active {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.2);
}

.ws-refresh-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.ws-refresh-btn:hover {
    color: #00d4ff;
    border-color: rgba(0,212,255,0.3);
    background: rgba(0,212,255,0.06);
}

.ws-back-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #00d4ff;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ws-back-btn:hover { text-decoration: underline; }

/* ---- Live Ticker Strip ---- */
.ws-ticker {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.5rem 1.25rem;
    background: #0d1117;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    overflow-x: auto;
    scrollbar-width: none;
}

.ws-ticker::-webkit-scrollbar { display: none; }

.ws-ticker-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.ws-ticker-label {
    font-size: 0.625rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ws-ticker-value {
    font-size: 0.9375rem;
    font-weight: 800;
    color: #e2e8f0;
}

.ws-ticker-delta {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #64748b;
}

.ws-ticker-delta.up { color: #00ff88; }
.ws-ticker-delta.down { color: #ff3366; }

.ws-ticker-sub {
    font-size: 0.6875rem;
    color: #475569;
}

.ws-ticker-sep {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
}

/* ---- Main Grid ---- */
.ws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1px;
    padding: 1px;
    background: rgba(255,255,255,0.03);
}

/* ---- Cards ---- */
.ws-card {
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.04);
    padding: 1rem 1.25rem;
    position: relative;
    overflow: hidden;
}

.ws-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,0.12), transparent);
}

.ws-card-highlight {
    border-color: rgba(0,212,255,0.12);
    background: linear-gradient(180deg, rgba(0,212,255,0.03) 0%, #0d1117 100%);
}

.ws-card-wide {
    grid-column: 1 / -1;
}

.ws-card-full {
    grid-column: 1 / -1;
}

.ws-card-tall {
    max-height: 480px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.ws-card-ok {
    border-left: 3px solid #00ff88;
}

.ws-card-warn {
    border-left: 3px solid #f59e0b;
}

.ws-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* ---- Metric Rows ---- */
.ws-metric-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.ws-big-num {
    font-size: 1.75rem;
    font-weight: 800;
    color: #f1f5f9;
    line-height: 1;
}

.ws-delta {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ws-delta.up { color: #00ff88; }
.ws-delta.down { color: #ff3366; }
.ws-delta-sub { font-size: 0.6875rem; color: #475569; }

/* ---- Sparklines ---- */
.ws-sparkline {
    width: 100%;
    height: auto;
    display: block;
}

.ws-spark-dot {
    animation: ws-pulse 2s ease-in-out infinite;
}

@keyframes ws-pulse {
    0%, 100% { r: 2.5; opacity: 1; }
    50% { r: 4; opacity: 0.7; }
}

/* ---- Bar Charts ---- */
.ws-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    padding-top: 4px;
}

.ws-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.ws-bar {
    width: 100%;
    min-height: 2px;
    border-radius: 2px 2px 0 0;
    transition: height 0.3s ease;
    opacity: 0.85;
}

.ws-bar-col:hover .ws-bar {
    opacity: 1;
}

.ws-bar-label {
    font-size: 0.5625rem;
    color: #475569;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ws-empty-chart {
    color: #334155;
    font-size: 0.75rem;
    text-align: center;
    padding: 1rem;
}

/* ---- Today's Snapshot ---- */
.ws-today-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    text-align: center;
}

.ws-today-item { padding: 0.5rem 0; }

.ws-today-val {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: #f1f5f9;
}

.ws-today-label {
    font-size: 0.625rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.125rem;
}

/* ---- Conversion Funnel ---- */
.ws-funnel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ws-funnel-step {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ws-funnel-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ws-funnel-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ws-funnel-val {
    font-size: 0.8125rem;
    font-weight: 800;
    color: #e2e8f0;
}

.ws-funnel-track {
    height: 6px;
    background: rgba(255,255,255,0.04);
    border-radius: 3px;
    overflow: hidden;
}

.ws-funnel-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.ws-funnel-rate {
    text-align: right;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.04);
}

/* ---- Cost Breakdown ---- */
.ws-cost-grid {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.ws-cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
}

.ws-cost-label {
    font-size: 0.75rem;
    color: #94a3b8;
}

.ws-cost-val {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #e2e8f0;
}

.ws-cost-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.8125rem;
    font-weight: 800;
    color: #e2e8f0;
}

/* ---- Customer Distribution ---- */
.ws-dist-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ws-dist-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ws-dist-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ws-dist-plan {
    flex: 1;
    font-size: 0.75rem;
    color: #94a3b8;
}

.ws-dist-count {
    font-size: 0.875rem;
    font-weight: 800;
    color: #e2e8f0;
}

.ws-dist-sep {
    height: 1px;
    background: rgba(255,255,255,0.04);
    margin: 0.25rem 0;
}

/* ---- Hourly Heatmap ---- */
.ws-heatmap {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2px;
}

.ws-heat-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5625rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    border-radius: 3px;
    cursor: default;
    transition: transform 0.1s;
}

.ws-heat-cell:hover {
    transform: scale(1.15);
    z-index: 2;
}

/* ---- Active Users Grid ---- */
.ws-active-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    text-align: center;
}

.ws-active-item {
    padding: 0.625rem 0.375rem;
    background: rgba(255,255,255,0.02);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.04);
}

.ws-active-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #00d4ff;
}

.ws-active-label {
    font-size: 0.5625rem;
    color: #475569;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-top: 0.125rem;
}

/* ---- System Health Grid ---- */
.ws-sys-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.ws-sys-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.625rem;
    background: rgba(255,255,255,0.02);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.03);
}

.ws-sys-label {
    font-size: 0.6875rem;
    color: #64748b;
    font-weight: 600;
}

.ws-sys-val {
    font-size: 0.8125rem;
    font-weight: 800;
    color: #e2e8f0;
}

/* ---- Status Banner (System page) ---- */
.ws-status-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
}

.ws-status-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ws-card-ok .ws-status-title { color: #00ff88; }
.ws-card-warn .ws-status-title { color: #f59e0b; }

.ws-status-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* ---- Recovery Actions Grid ---- */
.ws-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}

.ws-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ws-action-btn:hover {
    background: rgba(0,212,255,0.06);
    color: #00d4ff;
    border-color: rgba(0,212,255,0.2);
}

/* ---- Tables ---- */
.ws-table-wrap {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.06) transparent;
}

.ws-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.ws-table thead th {
    text-align: left;
    padding: 0.625rem 0.875rem;
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    white-space: nowrap;
}

.ws-table tbody td {
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
    color: #cbd5e1;
}

.ws-table tbody tr:last-child td {
    border-bottom: none;
}

.ws-clickable {
    cursor: pointer;
    transition: background 0.12s;
}

.ws-clickable:hover {
    background: rgba(0,212,255,0.04) !important;
}

.ws-td-name {
    font-weight: 700;
    color: #f1f5f9;
}

.ws-td-mono {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #64748b;
}

.ws-td-time {
    font-size: 0.75rem;
    color: #475569;
    white-space: nowrap;
}

.ws-td-actions {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

.ws-rank {
    font-weight: 800;
    color: #475569;
    width: 2rem;
    text-align: center;
}

/* ---- Badges & Status ---- */
.ws-plan-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ws-plan-free { background: rgba(100,116,139,0.2); color: #94a3b8; }
.ws-plan-starter { background: rgba(194,113,74,0.15); color: #c2714a; }
.ws-plan-pro { background: rgba(168,85,247,0.15); color: #c084fc; }
.ws-plan-premium { background: rgba(245,158,11,0.15); color: #fbbf24; }

.ws-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 0.375rem;
    vertical-align: middle;
}

.ws-status-dot.active { background: #00ff88; box-shadow: 0 0 4px rgba(0,255,136,0.4); }
.ws-status-dot.inactive { background: #475569; }

/* ---- Activity Feed ---- */
.ws-feed {
    display: flex;
    flex-direction: column;
}

.ws-feed-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.ws-feed-item:last-child { border-bottom: none; }

.ws-feed-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(194,113,74,0.1);
    color: #c2714a;
}

.ws-feed-icon.lead { background: rgba(0,212,255,0.1); color: #00d4ff; }
.ws-feed-icon.booking { background: rgba(168,85,247,0.1); color: #a855f7; }
.ws-feed-icon.message { background: rgba(245,158,11,0.1); color: #f59e0b; }
.ws-feed-icon.signup { background: rgba(0,255,136,0.1); color: #00ff88; }
.ws-feed-icon.system { background: rgba(100,116,139,0.1); color: #94a3b8; }

.ws-feed-body { flex: 1; min-width: 0; }

.ws-feed-text {
    font-size: 0.75rem;
    color: #cbd5e1;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-feed-meta {
    font-size: 0.6875rem;
    color: #475569;
    margin-top: 0.125rem;
}

.ws-feed-status {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.5625rem;
    letter-spacing: 0.04em;
}

.ws-feed-time {
    font-size: 0.6875rem;
    color: #334155;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ---- Filters & Search ---- */
.ws-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    padding: 0.875rem 1.25rem;
    background: #0d1117;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.ws-search {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    padding: 0.5rem 0.875rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 0.8125rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.ws-search:focus {
    border-color: rgba(0,212,255,0.4);
    box-shadow: 0 0 0 2px rgba(0,212,255,0.08);
}

.ws-search::placeholder {
    color: #334155;
}

.ws-pill-group {
    display: flex;
    gap: 0.25rem;
}

.ws-pill {
    padding: 0.3125rem 0.75rem;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.06);
    background: transparent;
    font-size: 0.6875rem;
    font-weight: 700;
    font-family: inherit;
    color: #64748b;
    cursor: pointer;
    transition: all 0.12s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ws-pill:hover {
    color: #94a3b8;
    background: rgba(255,255,255,0.03);
}

.ws-pill.active {
    background: rgba(0,212,255,0.1);
    color: #00d4ff;
    border-color: rgba(0,212,255,0.25);
}

/* ---- Actions Bar ---- */
.ws-actions-bar {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: #0d1117;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* ---- Buttons ---- */
.ws-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0,212,255,0.12);
    border: 1px solid rgba(0,212,255,0.25);
    border-radius: 6px;
    color: #00d4ff;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ws-btn-primary:hover {
    background: rgba(0,212,255,0.18);
    border-color: rgba(0,212,255,0.4);
}

.ws-btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255,51,102,0.1);
    border: 1px solid rgba(255,51,102,0.2);
    border-radius: 6px;
    color: #ff3366;
    font-size: 0.6875rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.12s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.5rem;
}

.ws-btn-danger:hover {
    background: rgba(255,51,102,0.18);
}

.ws-btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: #94a3b8;
    font-size: 0.625rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.12s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ws-btn-sm:hover {
    color: #00d4ff;
    border-color: rgba(0,212,255,0.25);
}

.ws-btn-sm-danger {
    color: #ff3366;
    border-color: rgba(255,51,102,0.15);
}

.ws-btn-sm-danger:hover {
    color: #ff3366;
    border-color: rgba(255,51,102,0.35);
    background: rgba(255,51,102,0.08);
}

/* ---- Select ---- */
.ws-select {
    padding: 0.25rem 0.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: #e2e8f0;
    font-size: 0.6875rem;
    font-family: inherit;
    max-width: 180px;
}

/* ---- Link ---- */
.ws-link {
    color: #00d4ff;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

.ws-link:hover { text-decoration: underline; }

/* ---- Usage Meters ---- */
.ws-meters {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ws-meter { padding: 0.25rem 0; }

.ws-meter-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 0.375rem;
}

.ws-meter-track {
    height: 6px;
    background: rgba(255,255,255,0.04);
    border-radius: 3px;
    overflow: hidden;
}

.ws-meter-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.ws-meter-pct {
    font-size: 0.6875rem;
    font-weight: 800;
    color: #475569;
    margin-top: 0.25rem;
    text-align: right;
}

/* ---- Detail Rows ---- */
.ws-detail-rows {
    display: flex;
    flex-direction: column;
}

.ws-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.75rem;
}

.ws-detail-row:last-child { border-bottom: none; }
.ws-detail-row span:first-child { color: #64748b; }
.ws-detail-row span:last-child { color: #e2e8f0; font-weight: 600; }

/* ---- Empty / Error ---- */
.ws-empty {
    text-align: center;
    padding: 2rem;
    color: #334155;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ws-error {
    text-align: center;
    padding: 3rem 2rem;
    color: #ff3366;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ---- Loading Spinner ---- */
.ws-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 1rem;
}

.ws-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0,212,255,0.1);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: ws-spin 0.8s linear infinite;
}

@keyframes ws-spin {
    to { transform: rotate(360deg); }
}

.ws-loading-text {
    font-size: 0.6875rem;
    font-weight: 800;
    color: #334155;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ---- Mobile Responsive ---- */
@media (max-width: 768px) {
    .ws-grid {
        grid-template-columns: 1fr;
    }

    .ws-card-wide {
        grid-column: 1;
    }

    .ws-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .ws-header-tabs {
        flex-wrap: wrap;
    }

    .ws-ticker {
        padding: 0.5rem 0.75rem;
    }

    .ws-today-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ws-heatmap {
        grid-template-columns: repeat(8, 1fr);
    }

    .ws-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .ws-search {
        max-width: 100%;
    }

    .ws-actions-grid {
        grid-template-columns: 1fr;
    }

    .ws-sys-grid {
        grid-template-columns: 1fr;
    }

    .ws-table {
        font-size: 0.75rem;
    }

    .ws-table thead th,
    .ws-table tbody td {
        padding: 0.4375rem 0.5rem;
    }
}

/* ===================================================================
   MOBILE OVERFLOW FIXES â€” prevent horizontal scroll on phone screens
   Scoped to max-width: 768px so desktop is untouched.
   =================================================================== */
@media (max-width: 768px) {
    /* â”€â”€ Global safety net â”€â”€
       IMPORTANT: Do NOT put overflow-x:hidden on html or body —
       Safari iOS propagates that to block ALL nested horizontal scroll.
       Scope overflow clipping to .app-layout and .main-content only. */
    .app-layout {
        overflow-x: clip;
        max-width: 100vw;
    }
    .main-content {
        overflow-x: clip;
        max-width: 100vw;
        overflow-wrap: break-word;
        /* Match the fixed header height exactly */
        padding-top: calc(56px + var(--safe-area-top) + 0.5rem) !important;
    }

    /* â”€â”€ Mobile header fix â”€â”€
       Ensure consistent height & make content clear it properly */
    .mobile-header {
        height: calc(56px + var(--safe-area-top));
        padding-top: var(--safe-area-top);
        display: flex;
        align-items: center;
        box-sizing: border-box;
    }

    /* â”€â”€ Settings page fixes â”€â”€ */

    /* Business info / SMS form grids â€” stack single column on mobile */
    #settings-business .card,
    #settings-ai .card,
    .card {
        overflow: hidden;
    }
    /* Force inline grid "auto-fit, minmax(220px, 1fr)" to single column */
    .card div[style*="grid-template-columns"][style*="auto-fit"],
    .card div[style*="grid-template-columns"][style*="1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Plan cards â€” stack vertically */
    .card div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Working hours rows â€” wrap on small screens */
    .card div[style*="display: flex"][style*="gap: 0.75rem"] input[type="time"] {
        max-width: 110px;
    }

    /* â”€â”€ Bookings / Calendar page fixes â”€â”€ */

    /* View tabs container â€” stack vertically */
    .mb-4 > .flex.justify-between > .btn-group {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    .mb-4 > .flex.justify-between {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* btn-group buttons â€” smaller text on mobile */
    .btn-group .btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.625rem;
        white-space: nowrap;
    }

    /* Page headers with buttons â€” wrap when needed */
    .flex.justify-between.items-start,
    .flex.justify-between.items-center {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    /* Booking list item details â€” prevent min-width overflow */
    .card div[style*=”min-width: 180px”],
    .card div[style*=”min-width: 100px”],
    .card div[style*=”min-width: 80px”],
    .booking-list-item div[style*=”min-width”] {
        min-width: 0 !important;
    }

    /* Booking list item â€” compact on mobile (layout classes in calendar-fix.css) */
    .booking-list-item {
        padding: 0.75rem;
    }

    /* Booking detail row â€” stack on narrow screens */
    .card div[style*=”display: flex”][style*=”flex-wrap: wrap”] {
        gap: 0.5rem;
    }

    /* Date header in booking list â€” compact on mobile */
    .booking-list-item + div div[style*=”min-width: 80px”],
    div[style*=”border-bottom: 2px”] div[style*=”min-width: 80px”] {
        min-width: 60px !important;
    }

    /* Calendar day dots in month view â€” keep compact */
    .calendar-day-cell {
        padding: 0.25rem;
    }

    /* Settings jump-to pills â€” horizontally scrollable on mobile */
    .animate-in > div[style*="flex-wrap: wrap"][style*="margin-bottom: 2rem"] {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        padding-bottom: 0.5rem;
    }
    .animate-in > div[style*="flex-wrap: wrap"][style*="margin-bottom: 2rem"]::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
}

