.gcb-preferences {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 14px;
    color: #0f172a;
    min-height: 540px;
    align-items: start;
}

.gcb-pref-nav {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gcb-pref-nav__header {
    display: grid;
    gap: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e2e8f0;
}

.gcb-pref-nav__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #64748b;
}

.gcb-pref-nav__title {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.05rem;
}

.gcb-pref-nav__list {
    display: grid;
    gap: 10px;
}

.gcb-pref-nav__item {
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    background: #ffffff;
    color: inherit;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
    display: grid;
    gap: 4px;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.gcb-pref-nav__item:hover {
    transform: translateX(3px);
    border-color: #cbd5e1;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.gcb-pref-nav__item.is-active {
    border-color: var(--gcb-accent, #0ea5e9);
    box-shadow: 0 16px 40px rgba(14, 165, 233, 0.16);
}

.gcb-pref-nav__item-main {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.gcb-pref-nav__icon {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(34, 197, 94, 0.12));
    display: grid;
    place-items: center;
    font-size: 16px;
}

.gcb-pref-nav__label {
    font-size: 0.98rem;
}

.gcb-pref-nav__sub {
    color: #64748b;
    font-size: 0.9rem;
}

.gcb-pref-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
    padding: 16px 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gcb-pref-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.gcb-pref-panel__meta {
    display: grid;
    gap: 4px;
}

.gcb-pref-panel__title {
    font-weight: 800;
    font-size: 1.2rem;
}

.gcb-pref-panel__hint {
    color: #475569;
    font-size: 0.95rem;
}

.gcb-pref-panel__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gcb-preferences__status-banner {
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(14, 165, 233, 0.12));
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 12px;
    font-size: 0.95rem;
    color: #0f172a;
    display: none;
}

.gcb-preferences__status-banner.is-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(248, 113, 113, 0.12));
    border-color: rgba(248, 113, 113, 0.28);
    color: #991b1b;
}

.gcb-preferences__status-banner.is-visible {
    display: block;
}

.gcb-pref-panel__content {
    display: grid;
    gap: 12px;
}

.gcb-pref-card {
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 14px 16px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
    display: grid;
    gap: 10px;
}

.gcb-pref-card__title {
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.01em;
}

.gcb-pref-card__hint {
    color: #475569;
    font-size: 0.93rem;
}

.gcb-pref-card__titleblock {
    display: grid;
    gap: 4px;
}

.gcb-pref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.gcb-pref-chip {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
    padding: 12px 14px;
    height: 84px;
    display: grid;
    align-content: flex-end;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    text-align: left;
}

.gcb-pref-chip:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.gcb-pref-chip.is-active {
    border-color: var(--gcb-accent, #0ea5e9);
    box-shadow: 0 14px 30px rgba(14, 165, 233, 0.18);
}

.gcb-pref-inline {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
}

.gcb-preferences__label {
    font-size: 0.95rem;
    color: #334155;
    display: block;
}

.gcb-preferences__input {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    padding: 10px 12px;
    font-size: 1rem;
    outline: none;
    width: 100%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.gcb-preferences__input:focus {
    border-color: var(--gcb-accent, #0ea5e9);
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.12);
}

.gcb-preferences__input--color {
    width: 64px;
    padding: 6px;
    height: 44px;
}

.gcb-preferences__range {
    width: 100%;
    accent-color: var(--gcb-accent, #0ea5e9);
}

.gcb-preferences__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    padding: 9px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    text-decoration: none;
}

.gcb-preferences__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.gcb-preferences__button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gcb-preferences__button--primary {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(14, 165, 233, 0.24));
    border-color: var(--gcb-accent, #0ea5e9);
    color: #0f172a;
}

.gcb-toggle {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
    background: #f8fafc;
}

.gcb-toggle input {
    appearance: none;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: #e2e8f0;
    position: relative;
    cursor: pointer;
    outline: none;
}

.gcb-toggle input::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 4px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}

.gcb-toggle input:checked {
    background: var(--gcb-accent, #0ea5e9);
}

.gcb-toggle input:checked::after {
    transform: translateX(18px);
}

.gcb-toggle__copy {
    font-weight: 700;
    color: #0f172a;
}

.gcb-toggle__hint {
    grid-column: 2;
    color: #475569;
    font-size: 0.93rem;
}

.gcb-preferences__status {
    color: #475569;
    font-size: 0.92rem;
}

.gcb-pref-actions,
.gcb-preferences__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.gcb-system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.gcb-system-card {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 10px 12px;
    display: grid;
    gap: 6px;
}

.gcb-system-card__label {
    color: #475569;
    font-size: 0.9rem;
}

.gcb-system-card__value {
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
}

.gcb-preferences__loading {
    padding: 12px;
    color: #475569;
}

.goldfish-app-window[data-app-window="preferences"] {
    background: #f5f7fb;
    color: #0f172a;
    border-color: #e2e8f0;
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.25);
}

.goldfish-app-window[data-app-window="preferences"] .goldfish-app-window__titlebar {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.goldfish-app-window[data-app-window="preferences"] .goldfish-app-window__title {
    color: #0f172a;
}

.goldfish-app-window[data-app-window="preferences"] .goldfish-app-window__body {
    color: #0f172a;
}
