/* Glucogaze – shared styles for index + settings (same header on both) */

/* ─── Base ─── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'DM Sans', system-ui, sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--bg, #000);
    color: var(--text, #e6e9ef);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

body {
    display: flex;
    justify-content: center;
    align-items: stretch;
}

.watch-case {
    width: 100%;
    height: 100%;
    min-width: 640px;
    min-height: 480px;
    background: var(--bg, #000);
    position: relative;
    overflow: hidden;
}

.screen {
    width: 400px;
    height: 300px;
    transform: scale(1.6);
    transform-origin: 0 0;
    background: linear-gradient(135deg, var(--primary, #1a1a1a) 0%, var(--bg, #000) 100%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text, #e6e9ef);
    position: relative;
}

/* Header – same on index and settings; themes.css sets --header-gradient, --accent-primary, --accent-glow */
.header {
    flex-shrink: 0;
    position: relative;
    width: 100%;
    text-align: center;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.header-bg {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 50px;
    background: var(--header-gradient, var(--gradient, linear-gradient(90deg, #1e3c72, #2a5298, #00b09b, #96c93d)));
    filter: blur(15px);
    opacity: 0.6;
    z-index: 0;
    border-radius: 15px;
}

.settings-icon {
    width: 20px;
    height: 20px;
    z-index: 1;
    filter: drop-shadow(0 0 4px var(--accent-glow, var(--glow, rgba(126, 208, 107, 0.6))));
    color: var(--accent-primary, var(--accent, #7ed06b));
}

.settings-icon svg {
    width: 100%;
    height: 100%;
}

.title {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* ─── Index: Main Reading ─── */
.main-reading {
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.value {
    font-size: 4.5rem;
    font-weight: 500;
    line-height: 1;
    margin-right: 5px;
}

.unit-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.direction-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-primary, var(--accent, #7ed06b));
    box-shadow:
        0 0 6px var(--accent-glow, var(--glow, rgba(126, 208, 107, 0.5))),
        0 0 12px var(--accent-glow-shadow, rgba(126, 208, 107, 0.3));
}

.direction-arrow {
    color: black;
    font-size: 2rem;
    font-weight: 900;
    line-height: 0;
    margin-top: -8px;
}

.unit {
    font-size: 1.2rem;
    color: var(--text-muted, #8b92a0);
    font-weight: 300;
}

/* ─── Index: Status ─── */
.status-container {
    flex-shrink: 0;
    text-align: center;
    margin-top: -5px;
    width: 95%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status-text {
    color: var(--accent-primary, var(--status-success, #7ed06b));
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.time-ago {
    font-size: 0.85rem;
    color: var(--text-muted, #8b92a0);
    margin-top: 2px;
}

/* ─── Index: IOB / COB ─── */
.iob-cob-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.iob-cob-rectangle {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--border, #2a303c);
    width: 88px;
    height: 30px;
}

.iob-cob-label {
    background-color: var(--secondary, #1a1e26);
    color: var(--text-muted, #8b92a0);
    font-weight: 700;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    flex-shrink: 0;
    min-width: 28px;
}

.iob-rectangle .iob-cob-label {
    background-color: var(--iob-accent, #9d4edd);
    color: white;
}

.cob-rectangle .iob-cob-label {
    background-color: var(--cob-accent, #06d6a0);
    color: white;
}

.iob-cob-value {
    background-color: var(--bg, #000);
    color: var(--text-muted, #8b92a0);
    font-weight: 500;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 48px;
    padding: 0 6px;
}

.iob-rectangle {
    border-color: var(--iob-accent, #9d4edd);
    box-shadow: 0 0 8px var(--iob-glow, rgba(157, 78, 221, 0.4));
}

.cob-rectangle {
    border-color: var(--cob-accent, #06d6a0);
    box-shadow: 0 0 8px var(--cob-glow, rgba(6, 214, 160, 0.4));
}

/* ─── Index: Divider & Data Grid ─── */
.divider {
    width: 95%;
    height: 1px;
    min-height: 1px;
    background: var(--border, #2a303c);
    margin: 6px 0;
    flex-shrink: 0;
}

.data-grid {
    width: 95%;
    flex: 1;
    min-height: 0;
    display: flex;
    justify-content: space-between;
    overflow: hidden;
}

.left-col {
    flex: 1.3;
    min-height: 0;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.right-col {
    flex: 0.7;
    min-height: 0;
    padding-left: 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

.vertical-divider {
    width: 1px;
    background: var(--border, #2a303c);
    height: 100%;
}

/* Floating icon strip (V6 style) – divider on left, no target in right col */
.hide-floating-sidebar .floating-strip-wrap {
    display: none !important;
}

.floating-strip-wrap {
    border-left: 1px solid var(--border, #2a303c);
    padding-left: 10px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.floating-icon-strip {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
}
.floating-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--secondary, #1a1e26);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    border: none;
    color: var(--text-muted, #8b92a0);
    font-size: 1rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
    line-height: 0;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}
.floating-icon-btn:active {
    transform: scale(0.95);
}
.floating-icon-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}
.floating-icon-btn:not(:has(svg)) {
    font-size: 1rem;
}
.floating-icon-btn.floating-icon-accent {
    background: linear-gradient(135deg, var(--accent-secondary, #4cd964) 0%, var(--accent-primary, #96c93d) 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 8px var(--accent-glow, rgba(150, 201, 61, 0.4));
}
[data-night-mode="true"] .floating-icon-btn {
    background: var(--primary, #1a1a1a);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
[data-night-mode="true"] .floating-icon-btn.floating-icon-accent {
    background: linear-gradient(135deg, var(--accent-secondary, #4cd964) 0%, var(--accent-primary, #96c93d) 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 8px var(--accent-glow, rgba(150, 201, 61, 0.4));
}

/* ─── Index: Clock + Chart ─── */
.clock-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 2px;
}

.chart-section-divider {
    width: 100%;
    height: 1px;
    min-height: 1px;
    background: var(--border, #2a303c);
    margin: 10px 0;
    margin-top: auto;
    flex-shrink: 0;
}

.horizontal-divider {
    width: 100%;
    height: 1px;
    min-height: 1px;
    background: var(--border, #2a303c);
    margin: 8px 0;
    flex-shrink: 0;
}

/* E. Status strip – online dot + Connected + Updated */
.status-strip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}
.status-strip-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
}
.status-strip .connection-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary, var(--accent, #7ed06b));
    box-shadow: 0 0 6px var(--accent-glow, var(--glow, rgba(126, 208, 107, 0.6)));
    flex-shrink: 0;
}
.status-strip .connection-dot.offline {
    background: var(--text-muted, #888);
    box-shadow: none;
}
.status-strip-label {
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-muted, #8b92a0);
}
.status-strip-label .glucogaze-brand {
    background: var(--header-gradient, var(--gradient, linear-gradient(90deg, #1e3c72, #2a5298, #00b09b, #96c93d)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.status-strip-label .glucogaze-version {
    color: inherit;
    -webkit-text-fill-color: initial;
}

.clock-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.avg-today-block {
    text-align: right;
}

.avg-today-block.stat-block {
    margin-bottom: 0;
}

.clock-time {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text, #e6e9ef);
    letter-spacing: 0.02em;
    line-height: 1.15;
}

.clock-date {
    font-size: 0.6rem;
    color: var(--text-muted, #8b92a0);
    font-weight: 400;
    margin-top: 1px;
}

.chart-wrap {
    margin-top: 2px;
    width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.chart-left {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 1px;
}

.chart-y-label {
    font-size: 0.5rem;
    color: var(--text-muted, #8b92a0);
    font-weight: 500;
    writing-mode: vertical-rl;
    transform: rotate(-180deg);
    letter-spacing: 0.5px;
}

.chart-scale-left {
    position: relative;
    height: 36px;
    width: 14px;
    flex-shrink: 0;
}

.chart-scale-left .chart-scale {
    left: 0;
    right: auto;
}

.chart-main {
    flex: 1;
    min-width: 0;
}

.chart-area {
    position: relative;
    height: 40px;
    width: 100%;
    background: transparent;
    /* Equal spacing between dotted lines: 0%, 25%, 50%, 75%, 100% */
    background-image:
        repeating-linear-gradient(90deg, var(--border, #2a303c) 0, var(--border, #2a303c) 2px, transparent 2px, transparent 3px),
        repeating-linear-gradient(90deg, var(--border, #2a303c) 0, var(--border, #2a303c) 2px, transparent 2px, transparent 3px),
        repeating-linear-gradient(90deg, var(--border, #2a303c) 0, var(--border, #2a303c) 2px, transparent 2px, transparent 3px),
        repeating-linear-gradient(90deg, var(--border, #2a303c) 0, var(--border, #2a303c) 2px, transparent 2px, transparent 3px),
        repeating-linear-gradient(90deg, var(--border, #2a303c) 0, var(--border, #2a303c) 2px, transparent 2px, transparent 3px);
    background-size: 100% 1px;
    background-repeat: repeat-x;
    background-position: 0 0, 0 25%, 0 50%, 0 75%, 0 100%;
}

.chart-area::before {
    content: '';
    position: absolute;
    top: calc(var(--zone-top-pct, 55.56) * 1%);
    left: 0;
    width: 100%;
    height: calc(var(--zone-height-pct, 33.33) * 1%);
    background: var(--chart-zone-bg, rgba(0, 255, 0, 0.18));
    box-sizing: border-box;
}

.chart-line-layer {
    z-index: 0;
}
.chart-line-layer polyline {
    stroke: rgba(255, 255, 255, 0.45);
    stroke-width: 1;
}
[data-night-mode="true"] .chart-line-layer polyline {
    stroke: rgba(255, 255, 255, 0.35);
}

.chart-point {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.chart-scale {
    position: absolute;
    font-size: 0.5rem;
    color: var(--text-muted, #8b92a0);
    font-weight: 400;
}

.chart-scale-left .chart-scale.high { top: 0; transform: translateY(-50%); }
.chart-scale-left .chart-scale.mid-high { top: 25%; transform: translateY(-50%); }
.chart-scale-left .chart-scale.mid { top: 50%; transform: translateY(-50%); }
.chart-scale-left .chart-scale.mid-low { top: 75%; transform: translateY(-50%); }
.chart-scale-left .chart-scale.low { bottom: 0; transform: translateY(50%); }

.chart-time-axis {
    display: flex;
    justify-content: space-between;
    margin: 3px;
    font-size: 0.5rem;
    color: var(--text-muted, #8b92a0);
    font-weight: 500;
    letter-spacing: 0.5px;
    min-height: 14px;
}

/* ─── Index: Stats ─── */
.stat-block {
    margin-bottom: 6px;
}
.data-grid .stat-block:last-child {
    margin-bottom: 0;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-muted, #8b92a0);
    font-weight: 700;
    margin-bottom: 2px;
}

.stat-value-lg {
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1;
}

.stat-value-sm {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1;
}
.stat-value-sm .tir-pct {
    font-size: 0.5rem;
    color: var(--text-muted, #8b92a0);
    font-weight: 400;
    vertical-align: middle;
}

.stat-unit {
    font-size: 0.7rem;
    color: var(--text-muted, #8b92a0);
    font-weight: 300;
}

.time-stamp {
    font-size: 0.65rem;
    color: var(--text-muted, #8b92a0);
    margin-top: 2px;
}

.hba1c {
    font-size: 0.5rem;
    color: var(--text-muted, #8b92a0);
    font-weight: 400;
    margin-top: 1px;
}

/* Time in range – same style as AVG TODAY (stat-label + stat-value-sm), connection icon only */
.tir-block .tir-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1;
}
.tir-block .tir-time,
.tir-block .tir-pct {
    font-variant-numeric: tabular-nums;
}
.tir-block .tir-connection {
    margin-top: 6px;
}
.tir-block .connection-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary, var(--accent, #7ed06b));
    box-shadow: 0 0 6px var(--accent-glow, var(--glow, rgba(126, 208, 107, 0.6)));
}
.tir-block .connection-dot.offline {
    background: var(--text-muted, #888);
    box-shadow: none;
}

/* ─── Settings: Scroll & Container ─── */
.settings-scroll-outer {
    flex: 1;
    min-height: 0;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
}

.settings-container {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 2.5%;
    right: 2.5%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 0 50px 0;
    scrollbar-width: none;
    touch-action: none;
    -webkit-overflow-scrolling: touch;
}

.settings-container::-webkit-scrollbar {
    display: none;
}

/* ─── Settings: Items, Toggles, Steppers ─── */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border, #2a303c);
}

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

.setting-label {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.setting-name {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text, #e6e9ef);
}

.setting-desc {
    font-size: 0.6rem;
    color: var(--text-muted, #8b92a0);
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    background: var(--secondary, #1a1e26);
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active {
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.toggle-switch.active::after {
    transform: translateX(18px);
}

.setting-value {
    display: flex;
    align-items: center;
    gap: 6px;
}

.value-display {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent-primary, var(--accent));
    min-width: 50px;
    text-align: right;
}

.stepper {
    display: flex;
    align-items: center;
    gap: 2px;
}

.stepper-btn {
    width: 22px;
    height: 22px;
    background: var(--secondary, #1a1e26);
    border: none;
    border-radius: 5px;
    color: var(--text, #e6e9ef);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.stepper-btn:hover {
    background: var(--border, #2a303c);
}

.stepper-btn:active {
    background: var(--accent-primary);
}

.time-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--accent-primary, var(--accent, #7ed06b));
    line-height: 1;
}

.time-with-icon .time-display {
    line-height: 1;
    color: inherit;
}

.time-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    display: block;
    flex-shrink: 0;
    color: inherit;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    vertical-align: middle;
}
.time-icon circle,
.time-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.time-display {
    min-width: 54px;
}

/* ─── Settings: Section Headers, Buttons, Select ─── */
.section-header {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-primary, var(--accent, #7ed06b));
    letter-spacing: 1px;
    margin-top: 10px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.section-header:first-child {
    margin-top: 0;
}

.button-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.back-btn, .save-btn {
    background: linear-gradient(135deg, var(--secondary, #1a1e26) 0%, var(--primary, #14171d) 100%);
    border: 1px solid var(--border, #2a303c);
    color: var(--text, #e6e9ef);
    padding: 6px 18px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover {
    background: linear-gradient(135deg, var(--border, #2a303c) 0%, var(--secondary, #1a1e26) 100%);
    border-color: var(--accent-primary, var(--accent));
}

.save-btn {
    background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
    border-color: var(--accent-primary, var(--accent));
    color: var(--text, #e6e9ef);
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.save-btn:hover {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    box-shadow: 0 0 12px var(--accent-glow-shadow);
}

.select-wrapper {
    position: relative;
}

.select-display {
    background: var(--secondary, #1a1e26);
    border: 1px solid var(--border, #2a303c);
    border-radius: 6px;
    color: var(--accent-primary, var(--accent));
    font-size: 0.7rem;
    padding: 3px 6px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-width: 70px;
    text-align: center;
    box-sizing: border-box;
}

.select-display:hover {
    border-color: var(--accent-primary);
}

a.select-display.select-display-link {
    text-decoration: none;
    color: var(--accent-primary);
}

a.select-display.select-display-link:hover {
    color: var(--accent-primary);
}

.title-input {
    background: var(--secondary, #1a1e26);
    border: none;
    border-radius: 6px;
    color: var(--accent-primary, var(--text, #e6e9ef));
    font-size: 0.65rem;
    padding: 0 5px;
    height: 26px;
    min-width: 88px;
    max-width: 130px;
    width: 100%;
    text-align: center;
    touch-action: manipulation;
    -webkit-user-select: text;
    user-select: text;
    box-sizing: border-box;
    text-transform: uppercase;
}

.title-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.title-input:focus {
    outline: none;
    background: var(--secondary, #1a1e26);
}

/* In-page keyboard for title (Chromium kiosk / touch) */
.title-keyboard {
    display: none;
    margin: 8px 0 12px 0;
    padding: 6px 4px;
    background: var(--secondary, #1a1e26);
    border: 1px solid var(--accent-primary, var(--accent, #7ed06b));
    border-radius: 8px;
}

.title-keyboard.open {
    display: block;
}

.title-keyboard-row {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 4px;
}

.title-keyboard-row:last-of-type {
    margin-bottom: 0;
}

.title-key {
    min-width: 28px;
    height: 34px;
    padding: 0 6px;
    border: none;
    border-radius: 5px;
    background: var(--secondary, #1a1e26);
    color: var(--accent-primary, var(--accent, #7ed06b));
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    touch-action: manipulation;
}

.title-key:hover,
.title-key:active {
    background: var(--accent-primary, var(--accent, #7ed06b));
    color: var(--bg, #000);
}

.title-key.key-space {
    min-width: 90px;
    flex: 1;
    max-width: 120px;
}

.title-key.key-done {
    min-width: 52px;
}

/* ─── Quick Log: Preset buttons ─── */
.preset-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.preset-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text, #e6e9ef);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary, #1a1e26);
}

.preset-btn:hover {
    transform: scale(1.08);
}

.preset-btn.active {
    border-color: white;
    box-shadow: 0 0 5px rgba(255,255,255,0.5);
}

/* Theme accent – preset buttons use current theme colour */
.preset-btn-accent {
    background: linear-gradient(135deg, var(--accent-secondary, #4cd964) 0%, var(--accent-primary, #96c93d) 100%);
}

.preset-btn-green { background: linear-gradient(135deg, #4cd964 0%, #96c93d 100%); }
.preset-btn-blue { background: linear-gradient(135deg, #5ac8fa 0%, #007aff 100%); }
.preset-btn-purple { background: linear-gradient(135deg, #af52de 0%, #5856d6 100%); }
.preset-btn-orange { background: linear-gradient(135deg, #ff9500 0%, #ff5e3a 100%); }
.preset-btn-yellow { background: linear-gradient(135deg, #ffcc00 0%, #f0a500 100%); }
.preset-btn-red { background: linear-gradient(135deg, #ff3b30 0%, #c41e3a 100%); }
.preset-btn-cyan { background: linear-gradient(135deg, #00d4aa 0%, #00b4d8 100%); }

/* ─── Settings: Color indicator, Theme selector ─── */
.color-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--border, #2a303c);
}

.color-indicator.green { background: #4cd964; }
.color-indicator.yellow { background: #ffcc00; }
.color-indicator.orange { background: #ff9500; }
.color-indicator.red { background: #ff3b30; }

.theme-selector {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.theme-option {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.theme-option:hover {
    transform: scale(1.1);
}

.theme-option.active {
    border: 2px solid white;
    box-shadow: 0 0 6px rgba(255,255,255,0.5);
}

.theme-option.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.55rem;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* green/blue: half circle dark bluish-gray, half circle vibrant lime */
.theme-green { background: linear-gradient(90deg, #4a5f6e 0%, #4a5f6e 50%, #a3e635 50%, #a3e635 100%); }
.theme-blue { background: linear-gradient(135deg, #5ac8fa 0%, #007aff 100%); }
.theme-purple { background: linear-gradient(135deg, #af52de 0%, #5856d6 100%); }
.theme-orange { background: linear-gradient(135deg, #ff9500 0%, #ff5e3a 100%); }
.theme-red { background: linear-gradient(135deg, #ff3b30 0%, #c41e3a 100%); }
.theme-yellow { background: linear-gradient(135deg, #ffcc00 0%, #f0a500 100%); }
.theme-cyan { background: linear-gradient(135deg, #00d4aa 0%, #00b4d8 100%); }
.theme-lime { background: linear-gradient(135deg, #7ed957 0%, #b8e62e 100%); }
.theme-pink { background: linear-gradient(135deg, #e91e8c 0%, #ff6b9d 100%); }
