/*
 * NÚCLEO DEL SISTEMA DE TEMAS
 *
 * Los archivos theme-*.css solo asignan valores.
 * Este archivo da un significado estable a cada token.
 */

:root {
    --cc-control-height: 40px;
    --cc-control-height-small: 34px;
    --cc-control-radius: 10px;
    --cc-panel-radius: 15px;
    --cc-card-radius: 11px;

    /* Compatibilidad con las hojas antiguas. */
    --page: var(--cc-page);
    --page-deep: var(--cc-page-deep);

    --surface: var(--cc-surface-0);
    --surface-solid: var(--cc-surface-0);
    --surface-soft: var(--cc-surface-1);
    --surface-blue: var(--cc-accent-soft);

    --border: var(--cc-border);
    --border-strong: var(--cc-border-strong);

    --text: var(--cc-text);
    --text-soft: var(--cc-text-secondary);
    --text-muted: var(--cc-text-muted);

    --accent: var(--cc-accent);
    --accent-dark: var(--cc-accent-hover);
    --accent-soft: var(--cc-accent-soft);

    --danger: var(--cc-danger);
    --success: var(--cc-success);
    --warning: var(--cc-warning);

    --shadow: var(--cc-shadow-2);
    --shadow-small: var(--cc-shadow-1);
}

html {
    color-scheme: light dark;
    background: var(--cc-page);
}

body {
    color: var(--cc-text);
    background:
        radial-gradient(
            circle at 10% -10%,
            var(--cc-page-glow),
            transparent 34%
        ),
        linear-gradient(
            180deg,
            var(--cc-page),
            var(--cc-page-deep)
        );

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 14px;
    line-height: 1.45;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    font: inherit;
}

::selection {
    color: var(--cc-on-accent);
    background: var(--cc-accent);
}

:focus-visible {
    outline: 2px solid var(--cc-accent) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px var(--cc-focus-ring) !important;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled,
[aria-disabled="true"] {
    color: var(--cc-text-disabled) !important;
    cursor: not-allowed !important;
    opacity: 0.66 !important;
}

.muted,
.info-empty,
.cc-admin-muted,
.selection-counter,
.location-real-path,
.file-list-cell,
.file-list-type,
.file-list-modified,
.file-list-permissions {
    color: var(--cc-text-muted) !important;
}

.soft,
.info-key,
.cc-admin-card-subtitle,
.cc-task-heading small {
    color: var(--cc-text-secondary) !important;
}

.good,
.directory-size-ready {
    color: var(--cc-success) !important;
}

.bad,
.error,
.cc-task-error,
.directory-size-stale {
    color: var(--cc-danger) !important;
}

.warning,
.directory-size-processing {
    color: var(--cc-warning) !important;
}

* {
    scrollbar-color:
        var(--cc-scrollbar-thumb)
        var(--cc-scrollbar-track);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: var(--cc-scrollbar-track);
}

*::-webkit-scrollbar-thumb {
    background: var(--cc-scrollbar-thumb);
    border: 2px solid var(--cc-scrollbar-track);
    border-radius: 999px;
}
