/* ════════════════════════════════════════════════════════════════════════════════
   Shared styles for it-aspdijital.com
   Design system: Premium Dark Glassmorphism — Linear/Vercel/Stripe level polish
   Last updated: 2026-05-20
   ════════════════════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════════════════════
   GOOGLE FONTS
   ════════════════════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ════════════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS — CSS Custom Properties
   ════════════════════════════════════════════════════════════════════════════════ */
:root {
    /* ── Background layers ── */
    --bg-root:        #0a0f1c;
    --bg-deep:        #060a14;
    --bg-elevated:    #0d1424;

    /* ── Typography ── */
    --font-body:      'Inter', system-ui, -apple-system, sans-serif;
    --font-display:   'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-mono:      'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

    /* ── Radius scale ── */
    --radius-sm:      8px;
    --radius-md:      12px;
    --radius-lg:      16px;
    --radius-xl:      24px;

    /* ── Glass background tokens (opacity over bg-root) ── */
    --glass-bg:       rgba(255, 255, 255, 0.06);
    --glass-sm:       rgba(255, 255, 255, 0.04);
    --glass-md:       rgba(255, 255, 255, 0.06);
    --glass-md-h:     rgba(255, 255, 255, 0.09);
    --glass-lg:       rgba(255, 255, 255, 0.12);

    /* ── Glass border tokens ── */
    --glass-border:   rgba(255, 255, 255, 0.12);
    --glass-border-h: rgba(255, 255, 255, 0.22);

    /* ── Glass effects ── */
    --glass-blur:     16px;
    --glass-saturate: 180%;
    --glass-shadow:   0 8px 32px rgba(0, 0, 0, 0.15);
    --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    --glass-inner:    inset 0 1px 0 rgba(255, 255, 255, 0.18);
    --glass-radius:   1.5rem;
    --glass-transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);

    /* ── Glass-code (output/code blocks) ── */
    --glass-code:     rgba(0, 0, 0, 0.50);
    --glass-code-bdr: rgba(255, 255, 255, 0.10);

    /* ── Semantic colors ── */
    --indigo:         #818cf8;
    --emerald:        #34d399;
    --cyan:           #38bdf8;
    --amber:          #fbbf24;
    --orange:         #f97316;
    --red:            #ef4444;
    --rose:           #f43f5e;
    --sky:            #0ea5e9;

    /* ── Focus ring ── */
    --focus-ring:     2px solid rgba(129, 140, 248, 0.60);
    --focus-offset:   2px;
}

/* ════════════════════════════════════════════════════════════════════════════════
   FONT FAMILY UTILITIES
   ════════════════════════════════════════════════════════════════════════════════ */
.font-display {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
}
.font-mono {
    font-family: var(--font-mono);
}
.font-body {
    font-family: var(--font-body);
}

/* ════════════════════════════════════════════════════════════════════════════════
   GLASS SURFACE PRIMITIVES
   ════════════════════════════════════════════════════════════════════════════════ */

/* ── Shared ::before edge-shine (Fresnel highlight) ── */
.liquid-glass::before,
.glass-panel::before,
.glass-sub::before,
.glass-float::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(145deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.08) 30%,
        transparent 50%,
        rgba(255, 255, 255, 0.06) 70%,
        rgba(255, 255, 255, 0.25) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 0;
}

/* ── Micro-noise overlay (preserved, moved to ::after for .liquid-glass only) ── */
.liquid-glass::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 4px 4px;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: screen;
}

/* ── Content above pseudo-elements ── */
.liquid-glass > *,
.glass-panel > *,
.glass-sub > *,
.glass-float > *,
.glass-card-light > * {
    position: relative;
    z-index: 1;
}

/* ── Liquid glass (standard card — upgraded with edge-shine) ── */
.liquid-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), var(--glass-highlight);
    isolation: isolate;
    position: relative;
    overflow: hidden;
    transition: var(--glass-transition);
}

/* ── Firefox/unsupported browser fallback for backdrop-filter ── */
@supports not (backdrop-filter: blur(16px)) {
    .liquid-glass,
    .glass-panel,
    .glass-sub,
    .glass-float,
    .glass-card-light {
        background: rgba(13, 20, 36, 0.95);
    }
    .glass-strong {
        background: rgba(6, 10, 20, 0.95);
    }
}
.liquid-glass:hover {
    --glass-bg: var(--glass-md-h);
    --glass-border: var(--glass-border-h);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.20), var(--glass-highlight);
}

/* ── Glass hover lift ── */
.liquid-glass-hover {
    cursor: default;
    transition: var(--glass-transition);
}
.liquid-glass-hover:hover {
    --glass-bg: rgba(255, 255, 255, 0.09);
    --glass-border: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), var(--glass-highlight);
}

/* ── Stronger glass (modals, overlays) ── */
.liquid-glass-strong {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ── .glass-panel (preferred for new code — primary section cards) ── */
.glass-panel {
    background: var(--glass-md);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), var(--glass-inner);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: var(--radius-xl);
}
.glass-panel:hover {
    background: var(--glass-md-h);
    border-color: var(--glass-border-h);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.20), var(--glass-inner);
}

/* ── .glass-sub (sub-panels, metric cards) ── */
.glass-sub {
    background: var(--glass-sm);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: var(--radius-xl);
}
.glass-sub:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

/* ── .glass-float (elevated overlays: toasts, popovers) ── */
.glass-float {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: var(--radius-lg);
}

/* ── .glass-code (output blocks, code display) ── */
.glass-code {
    background: var(--glass-code);
    border: 1px solid var(--glass-code-bdr);
    border-radius: var(--radius-lg);
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    color: rgba(255, 255, 255, 0.85);
    overflow-x: auto;
}

/* ── .glass-strong (strong backdrop for nav / sticky) ── */
.glass-strong {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ── .glass-card-light (existing alias) ── */
.glass-card-light {
    background: var(--glass-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}
.glass-card-light:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

/* ════════════════════════════════════════════════════════════════════════════════
   GLASS GLOW CLASSES
   ════════════════════════════════════════════════════════════════════════════════ */
.glass-glow {
    text-shadow:
        0 0 20px rgba(52, 211, 153, 0.15),
        0 0 40px rgba(52, 211, 153, 0.08),
        0 0 80px rgba(52, 211, 153, 0.04);
}
.glass-glow-indigo {
    text-shadow:
        0 0 20px rgba(129, 140, 248, 0.15),
        0 0 40px rgba(129, 140, 248, 0.08),
        0 0 80px rgba(129, 140, 248, 0.04);
}
.glass-glow-emerald {
    text-shadow:
        0 0 20px rgba(52, 211, 153, 0.20),
        0 0 40px rgba(52, 211, 153, 0.10),
        0 0 80px rgba(52, 211, 153, 0.05);
}
.glass-glow-cyan {
    text-shadow:
        0 0 20px rgba(56, 189, 248, 0.15),
        0 0 40px rgba(56, 189, 248, 0.08),
        0 0 80px rgba(56, 189, 248, 0.04);
}
.glass-glow-amber {
    text-shadow:
        0 0 20px rgba(251, 191, 36, 0.15),
        0 0 40px rgba(251, 191, 36, 0.08),
        0 0 80px rgba(251, 191, 36, 0.04);
}
.glass-glow-orange {
    text-shadow:
        0 0 20px rgba(249, 115, 22, 0.15),
        0 0 40px rgba(249, 115, 22, 0.08),
        0 0 80px rgba(249, 115, 22, 0.04);
}
.glass-glow-red {
    text-shadow:
        0 0 20px rgba(239, 68, 68, 0.15),
        0 0 40px rgba(239, 68, 68, 0.08),
        0 0 80px rgba(239, 68, 68, 0.04);
}

/* ════════════════════════════════════════════════════════════════════════════════
   BUTTON HIERARCHY
   ════════════════════════════════════════════════════════════════════════════════ */

/* Tier 1 — Primary (main CTA / tool actions) */
.glass-btn-primary {
    background: var(--glass-md);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), var(--glass-inner);
    padding: 10px 24px;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.23, 1.0, 0.32, 1);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
}
.glass-btn-primary:hover {
    background: rgba(255, 255, 255, 0.10);
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16), var(--glass-inner);
}
.glass-btn-primary:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.13);
}
.glass-btn-primary:disabled {
    opacity: 0.40;
    cursor: not-allowed;
    transform: none !important;
    pointer-events: none;
}

/* Tier 2 — Secondary (copy, export, download) */
.glass-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 10px 24px;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
}
.glass-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.40);
    transform: translateY(-1px);
}
.glass-btn-secondary:disabled {
    opacity: 0.40;
    cursor: not-allowed;
    pointer-events: none;
}

/* Tier 3 — Ghost (tertiary / clear / subtle actions) */
.glass-btn-ghost {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.50);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}
.glass-btn-ghost:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.06);
}
.glass-btn-ghost:disabled {
    opacity: 0.30;
    cursor: not-allowed;
    pointer-events: none;
}

/* Tier 4 — Danger (destructive: remove, delete) */
.glass-btn-danger {
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.30);
    color: #ef4444;
    padding: 10px 24px;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
}
.glass-btn-danger:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.50);
    transform: translateY(-1px);
}
.glass-btn-danger:disabled {
    opacity: 0.40;
    cursor: not-allowed;
    pointer-events: none;
}

/* ════════════════════════════════════════════════════════════════════════════════
   INPUTS & CONTROLS
   ════════════════════════════════════════════════════════════════════════════════ */

/* ── .glass-input (text, number, etc.) ── */
.glass-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -moz-appearance: textfield;
}
.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.30);
}
.glass-input:hover:not(:focus):not(:disabled) {
    border-color: rgba(255, 255, 255, 0.30);
}
.glass-input:focus {
    border-color: rgba(129, 140, 248, 0.60);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}
.glass-input:disabled {
    opacity: 0.40;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.03);
}
.glass-input[type="number"]::-webkit-inner-spin-button,
.glass-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ── .glass-select ── */
.glass-select {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: #fff;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-width: 160px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
.glass-select option {
    background: #1a1f2e;
    color: #fff;
}
.glass-select:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.30);
}
.glass-select:focus {
    border-color: rgba(129, 140, 248, 0.60);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}
.glass-select:disabled {
    opacity: 0.40;
    cursor: not-allowed;
}

/* ── .glass-textarea ── */
.glass-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: #fff;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 140px;
    line-height: 1.6;
}
.glass-textarea::placeholder {
    color: rgba(255, 255, 255, 0.30);
}
.glass-textarea:focus {
    border-color: rgba(129, 140, 248, 0.60);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}
.glass-textarea:disabled {
    opacity: 0.40;
    cursor: not-allowed;
}

/* ── .glass-output (output/code display block) ── */
.glass-output {
    background: rgba(0, 0, 0, 0.50);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius-lg);
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    white-space: pre-wrap;
    word-break: break-all;
    overflow-x: auto;
    line-height: 1.6;
}

/* ── Range slider ── */
input[type="range"] {
    accent-color: #34d399;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    cursor: pointer;
    transition: background 0.2s ease;
}
input[type="range"]:hover {
    background: rgba(255, 255, 255, 0.18);
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--emerald);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.50);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 16px rgba(52, 211, 153, 0.70);
}
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--emerald);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.50);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 16px rgba(52, 211, 153, 0.70);
}
input[type="range"]:focus-visible::-webkit-slider-thumb {
    outline: 2px solid rgba(129, 140, 248, 0.60);
    outline-offset: 2px;
}
input[type="range"]:focus-visible::-moz-range-thumb {
    outline: 2px solid rgba(129, 140, 248, 0.60);
    outline-offset: 2px;
}
input[type="range"]:disabled {
    opacity: 0.40;
    cursor: not-allowed;
}

/* ── Checkbox ── */
input[type="checkbox"] {
    accent-color: var(--emerald);
    width: 16px;
    height: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: accent-color 0.2s ease;
}

/* ── Input label standard ── */
.input-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.60);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
    display: block;
}

/* ── Helper text under inputs ── */
.helper-text {
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 0.25rem;
}

/* ════════════════════════════════════════════════════════════════════════════════
   TABLES
   ════════════════════════════════════════════════════════════════════════════════ */

.glass-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: 0.875rem;
}
.glass-table thead th {
    background: rgba(255, 255, 255, 0.04);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.50);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    font-weight: 500;
}
.glass-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s ease;
}
.glass-table tbody tr:last-child {
    border-bottom: none;
}
.glass-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}
.glass-table tbody td {
    padding: 10px 16px;
    vertical-align: middle;
}

/* ════════════════════════════════════════════════════════════════════════════════
   BADGE SYSTEM
   ════════════════════════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.badge-emerald {
    background: rgba(52, 211, 153, 0.12);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.2);
}
.badge-indigo {
    background: rgba(129, 140, 248, 0.12);
    color: #818cf8;
    border: 1px solid rgba(129, 140, 248, 0.2);
}
.badge-cyan {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
}
.badge-amber {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}
.badge-rose {
    background: rgba(244, 63, 94, 0.12);
    color: #f43f5e;
    border: 1px solid rgba(244, 63, 94, 0.2);
}
.badge-orange {
    background: rgba(249, 115, 22, 0.12);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.2);
}
.badge-red {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ════════════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ════════════════════════════════════════════════════════════════════════════════ */

/* ── Line clamp ── */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Prose (blog content) ── */
.prose h3 {
    font-size: 1.25rem;
    margin: 1.5em 0 0.6em;
    font-weight: 600;
}
.prose ul {
    margin: 1em 0;
}
.prose li {
    margin-bottom: 0.35em;
}

/* ── Subtle divider line ── */
.divider-subtle {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.10), transparent);
    margin: 1.5rem 0;
}

/* ── Data table row styling ── */
.table-row-subtle {
    transition: background 0.15s ease;
}
.table-row-subtle:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}
.table-row-subtle:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ── Smooth number transition ── */
.number-transition {
    transition: color 0.3s ease;
}

/* ── Tabular numbers (prevents jitter when digit count changes) ── */
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* ── Screen-reader only ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ════════════════════════════════════════════════════════════════════════════════
   FILTER MODE / SENSOR TYPE CLASSES
   ════════════════════════════════════════════════════════════════════════════════ */
.filter-mode-active {
    background: var(--glass-md);
    border: 1px solid var(--glass-border);
    color: #fff;
}
.filter-mode-inactive {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.50);
}
.sensor-type-active {
    background: var(--glass-md);
    border: 1px solid var(--glass-border);
    color: #fff;
}
.sensor-type-inactive {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.50);
}

/* ════════════════════════════════════════════════════════════════════════════════
   CHART / VALUE UTILITIES
   ════════════════════════════════════════════════════════════════════════════════ */

/* ── ASCII chart right-edge fade affordance ── */
.chart-fade-right {
    position: relative;
}
.chart-fade-right::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(90deg, transparent, rgba(10, 15, 28, 0.8));
    pointer-events: none;
}

/* ── Recent values tag ── */
.value-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: value-tag-in 0.3s ease both;
}
@keyframes value-tag-in {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

/* ════════════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════════════════════════ */

/* ── Page load: staggered card reveal ── */
@keyframes reveal-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.reveal-up {
    animation: reveal-up 0.6s cubic-bezier(0.23, 1.0, 0.32, 1) forwards;
    opacity: 0;
}
.reveal-up-d1 { animation-delay: 0.05s; }
.reveal-up-d2 { animation-delay: 0.10s; }
.reveal-up-d3 { animation-delay: 0.15s; }
.reveal-up-d4 { animation-delay: 0.20s; }
.reveal-up-d5 { animation-delay: 0.25s; }
.reveal-up-d6 { animation-delay: 0.30s; }

/* ── Number flash (stat card value changes) ── */
@keyframes stat-flash {
    0%   { opacity: 0.35; }
    100% { opacity: 1; }
}
.stat-flash {
    animation: stat-flash 0.4s ease;
}

/* ── Toast notifications ── */
@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(8px) scale(0.96); }
}
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    animation: toast-in 0.3s cubic-bezier(0.23, 1.0, 0.32, 1) forwards;
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    background: var(--glass-md);
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), var(--glass-inner);
    color: #fff;
    font-family: var(--font-body);
}
.toast.toast-exit {
    animation: toast-out 0.25s cubic-bezier(0.23, 1.0, 0.32, 1) forwards;
}

/* ── OEE hero value pulse glow ── */
@keyframes oee-pulse {
    0%, 100% {
        text-shadow:
            0 0 20px var(--glow-color, rgba(52, 211, 153, 0.15)),
            0 0 40px var(--glow-color, rgba(52, 211, 153, 0.08));
    }
    50% {
        text-shadow:
            0 0 28px var(--glow-color, rgba(52, 211, 153, 0.20)),
            0 0 56px var(--glow-color, rgba(52, 211, 153, 0.10));
    }
}
.oee-pulse {
    animation: oee-pulse 3s ease-in-out infinite;
}

/* ── Loss bar fill sweep ── */
@keyframes bar-sweep {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.bar-sweep {
    animation: bar-sweep 0.5s ease;
}

/* ── Spinner ── */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--emerald);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

/* ── Ambient orb floating animation ── */
@keyframes float-orb {
    0%, 100% { transform: translate(0, 0); }
    33%      { transform: translate(30px, -20px); }
    66%      { transform: translate(-20px, 30px); }
}

/* ── Badge pulse (for trend changes) ── */
@keyframes badge-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}
.badge-pulse {
    animation: badge-pulse 0.4s ease;
}

/* ════════════════════════════════════════════════════════════════════════════════
   AMBIENT BACKGROUND GRADIENT
   ════════════════════════════════════════════════════════════════════════════════ */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.07;
}
.ambient-orb-1 {
    width: 600px;
    height: 600px;
    background: var(--indigo);
    top: -200px;
    left: -100px;
    animation: float-orb 20s ease-in-out infinite;
}
.ambient-orb-2 {
    width: 500px;
    height: 500px;
    background: var(--emerald);
    bottom: -150px;
    right: -100px;
    animation: float-orb 25s ease-in-out infinite reverse;
}

/* ════════════════════════════════════════════════════════════════════════════════
   FOCUS, DISABLED, AND INTERACTION STATES
   ════════════════════════════════════════════════════════════════════════════════ */

/* ── Global focus-visible ring ── */
*:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-offset);
    border-radius: 4px;
}
*:focus:not(:focus-visible) {
    outline: none;
}

/* ── Glass inputs use their own focus style, not the global outline ── */
input.glass-input:focus-visible,
select.glass-select:focus-visible,
textarea.glass-textarea:focus-visible {
    outline: none;
}

/* ── Input / select / textarea base focus states (non-glass) ── */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Disabled base ── */
input:disabled,
select:disabled,
textarea:disabled,
button:disabled,
button[disabled] {
    opacity: 0.40;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Button interactive hover lift ── */
button:not(:disabled):hover,
label:not(:disabled):hover {
    filter: brightness(1.08);
}

/* ── Input placeholder styling ── */
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* ════════════════════════════════════════════════════════════════════════════════
   SCROLLBAR STYLING
   ════════════════════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.20);
}

/* ════════════════════════════════════════════════════════════════════════════════
   REDUCED MOTION — Accessibility
   ════════════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .liquid-glass,
    .glass-panel,
    .glass-sub,
    .glass-float,
    .glass-card-light,
    .glass-btn-primary,
    .glass-btn-secondary,
    .glass-sub:hover,
    .glass-panel:hover,
    .liquid-glass:hover,
    .liquid-glass-hover:hover {
        transition: none !important;
        animation: none !important;
    }

    .reveal-up {
        animation: none;
        opacity: 1;
    }
    .stat-flash {
        animation: none;
    }
    .toast {
        animation: none;
        opacity: 1;
    }
    .toast.toast-exit {
        animation: none;
        opacity: 1;
    }
    .oee-pulse {
        animation: none;
    }
    .spinner {
        animation: none;
    }
    .badge-pulse {
        animation: none;
    }
    .value-tag {
        animation: none;
    }
    .ambient-orb-1,
    .ambient-orb-2 {
        animation: none;
    }
    .bar-sweep {
        animation: none;
    }
}
