/*
 * SOM Design System v4.0 — Executive Cyber Command Center
 * Refactor: unified tokens, typography scale, dark-ready semantics.
 */

/* ============================================================
   UNIFIED TYPOGRAPHY — Inter + JetBrains Mono only
   ============================================================ */
:root {
    --ds-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --ds-font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', 'Monaco', monospace;

    /* Type scale — portal taban 13px (0.8125rem) */
    --ds-text-2xs:  0.65rem;   /* ~10.4px */
    --ds-text-xs:   0.68rem;   /* ~10.9px */
    --ds-text-sm:   0.75rem;   /* ~12px   */
    --ds-text-base: 0.8125rem; /* 13px portal */
    --ds-text-md:   0.875rem;  /* 14px */
    --ds-text-lg:   0.9375rem; /* 15px public */
    --ds-text-xl:   1rem;
    --ds-text-2xl:  1.125rem;
    --ds-text-3xl:  1.25rem;
    --ds-text-4xl:  1.375rem;
    --ds-text-5xl:  1.5rem;
    --ds-text-6xl:  1.75rem;
    --ds-text-7xl:  1.9rem;
    --ds-text-8xl:  2rem;

    --ds-leading-tight:  1.25;
    --ds-leading-snug:   1.375;
    --ds-leading-normal: 1.5;
    --ds-leading-relaxed: 1.625;

    --ds-tracking-tight:  -0.02em;
    --ds-tracking-normal: 0;
    --ds-tracking-wide:   0.04em;
    --ds-tracking-wider:  0.06em;
    --ds-tracking-caps:   0.08em;

    --ds-fw-normal:   400;
    --ds-fw-medium:   500;
    --ds-fw-semibold: 600;
    --ds-fw-bold:     700;
    --ds-fw-extrabold: 800;
}

body.som-embed-app,
body.som-embed-app input,
body.som-embed-app select,
body.som-embed-app textarea,
body.som-embed-app button,
body.som-embed-app .btn,
body.som-embed-app .nav-item,
body.som-embed-app .sidebar-nav-group__head,
body.som-embed-app h1,
body.som-embed-app h2,
body.som-embed-app h3,
body.som-embed-app h4,
body.som-embed-app h5,
body.som-embed-app h6,
body.som-embed-app p,
body.som-embed-app span,
body.som-embed-app a,
body.som-embed-app td,
body.som-embed-app th,
body.som-embed-app label,
body.som-embed-app .card,
body.som-embed-app .panel {
    font-family: var(--ds-font-sans) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.som-embed-app code,
body.som-embed-app pre,
body.som-embed-app kbd,
body.som-embed-app samp,
body.som-embed-app .mono,
body.som-embed-app [class*="mono"] {
    font-family: var(--ds-font-mono) !important;
}


/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --ds-navy-900:  #0f172a;
    --ds-navy-800:  #1e3a8a;
    --ds-navy-700:  #1d4ed8;
    --ds-navy-deep: #0a1628;
    --ds-slate-900: #0f172a;
    --ds-slate-800: #1e293b;
    --ds-slate-700: #334155;
    --ds-slate-500: #64748b;
    --ds-slate-400: #94a3b8;
    --ds-slate-300: #cbd5e1;
    --ds-slate-200: #e2e8f0;
    --ds-slate-100: #f1f5f9;
    --ds-slate-50:  #f8fafc;
    --ds-white:     #fdfeff;

    /* Semantic colors */
    --ds-color-primary:       #1d4ed8;
    --ds-color-primary-deep: #1e40af;
    --ds-color-primary-soft:  #dbeafe;
    --ds-color-secondary:     #475569;
    --ds-color-accent:        #06b6d4;
    --ds-color-danger:        #dc2626;
    --ds-color-danger-soft:   #fee2e2;
    --ds-color-warning:       #d97706;
    --ds-color-warning-soft:  #fed7aa;
    --ds-color-success:       #059669;
    --ds-color-success-soft:  #d1fae5;
    --ds-color-info:          #7c3aed;
    --ds-color-info-soft:     #ede9fe;

    --ds-text-primary:   #0f172a;
    --ds-text-secondary: #334155;
    --ds-text-muted:     #64748b;
    --ds-text-inverse:   #f8fafc;

    /* Surface hierarchy — light default (gece teması override eder) */
    --ds-bg:          #eef2f7;
    --ds-bg-card:     #ffffff;
    --ds-bg-glass:    rgba(255, 255, 255, 0.72);
    --ds-bg-sidebar:  #f8fafc;
    --ds-bg-topbar:   #f8fafc;
    --ds-bg-elevated: #ffffff;
    --ds-bg-input:    #ffffff;

    /* Borders */
    --ds-border:        #cbd5e1;
    --ds-border-mid:    #94a3b8;
    --ds-border-strong: #64748b;
    --ds-border-focus:  rgba(29, 78, 216, 0.45);

    /* Accent aliases */
    --ds-accent:      var(--ds-color-primary);
    --ds-accent-deep: var(--ds-color-primary-deep);
    --ds-accent-soft: var(--ds-color-primary-soft);

    /* Spacing — 4px grid */
    --ds-space-0:  0;
    --ds-space-1:  4px;
    --ds-space-2:  8px;
    --ds-space-3:  12px;
    --ds-space-4:  16px;
    --ds-space-5:  20px;
    --ds-space-6:  24px;
    --ds-space-8:  32px;
    --ds-space-10: 40px;
    --ds-space-12: 48px;

    /* Container */
    --ds-container-sm:  640px;
    --ds-container-md:  960px;
    --ds-container-lg:  1200px;
    --ds-container-xl:  1280px;

    /* Scrollbar */
    --ds-scrollbar-size: 6px;
    --ds-scrollbar-track: transparent;
    --ds-scrollbar-thumb: rgba(100, 116, 139, 0.35);
    --ds-scrollbar-thumb-hover: rgba(100, 116, 139, 0.55);

    /* Elevation shadows — 5-level system */
    --ds-e0: none;
    --ds-e1: 0 1px 3px rgba(15,23,42,0.04), 0 1px 2px rgba(15,23,42,0.03);
    --ds-e2: 0 3px 10px rgba(15,23,42,0.07), 0 1px 3px rgba(15,23,42,0.04);
    --ds-e3: 0 8px 24px rgba(15,23,42,0.09), 0 3px 8px  rgba(15,23,42,0.05);
    --ds-e4: 0 16px 48px rgba(15,23,42,0.11), 0 6px 16px rgba(15,23,42,0.06);
    --ds-e5: 0 32px 80px rgba(15,23,42,0.14), 0 12px 28px rgba(15,23,42,0.08);

    /* Radii */
    --ds-r-xs: 6px;
    --ds-r-sm: 8px;
    --ds-r-md: 12px;
    --ds-r-lg: 16px;
    --ds-r-xl: 20px;
    --ds-r-2xl: 26px;
    --ds-r-pill: 999px;

    /* Motion */
    --ds-ease:        cubic-bezier(0.4, 0, 0.2, 1);
    --ds-ease-out:    cubic-bezier(0.0, 0, 0.2, 1);
    --ds-ease-spring: cubic-bezier(0.34, 1.46, 0.64, 1);
    --ds-t-xs:   100ms var(--ds-ease);
    --ds-t-fast: 160ms var(--ds-ease);
    --ds-t-base: 220ms var(--ds-ease);
    --ds-t-slow: 320ms var(--ds-ease-out);
    --ds-t-spr:  260ms var(--ds-ease-spring);
}


/* ============================================================
   BODY / PAGE BACKGROUND — lightweight ambient
   NO background-attachment:fixed (kills scroll perf & subpixel text)
   ============================================================ */
body.som-embed-app {
    background-color: var(--ds-bg);
    background-image:
        radial-gradient(ellipse 100% 55% at 50% -8%,  rgba(30,58,138,0.055) 0%, transparent 65%),
        radial-gradient(ellipse 60% 40% at 100% 80%, rgba(6,182,212,0.025) 0%, transparent 55%);
    background-repeat: no-repeat;
}

/* Ambient light wave — pure fixed layer, no animation to keep it snappy */
body.som-embed-app::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 45% 30% at 25% 15%, rgba(30,58,138,0.05) 0%, transparent 60%),
        radial-gradient(ellipse 40% 30% at 78% 82%, rgba(6,182,212,0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}

/* Ensure main layers sit above ambient */
body.som-embed-app > .som-layout,
body.som-embed-app > .som-topbar,
body.som-embed-app > .toast-container {
    position: relative;
    z-index: 1;
}
body.som-embed-app > .som-app-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
}


/* ============================================================
   PAGE LOAD ANIMATION
   ============================================================ */
.som-content,
.som-page-content {
    animation: none;
}


/* ============================================================
   SIDEBAR  — subtle solid (blur removed for perf + text clarity)
   ============================================================ */
body.som-embed-app .som-sidebar {
    background: #ffffff;
    border-right: 1px solid #e8edf3;
    box-shadow: 4px 0 28px rgba(15, 23, 42, 0.07);
}

/* Yeni Olay button */
body.som-embed-app .btn-quick-action {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 52%, #1d4ed8 100%) !important;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.32);
    transition:
        background  var(--ds-t-base),
        box-shadow  var(--ds-t-base),
        transform   var(--ds-t-spr);
}

body.som-embed-app .btn-quick-action:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 52%, #1e40af 100%) !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.38);
    transform: translateY(-1px);
}

body.som-embed-app .btn-quick-action:active {
    transition-duration: 70ms;
    transform: none;
}

/* Accordion heads */
body.som-embed-app .sidebar-nav-group__head {
    transition: background var(--ds-t-base);
    letter-spacing: 0;
    color: #0f172a;
}

body.som-embed-app .sidebar-nav-group__head:hover {
    background: #f8fafc;
}

/* Active nav item — light blue + left bar */
body.som-embed-app .nav-item.active {
    background: #eff6ff !important;
    border: none !important;
    box-shadow: none !important;
    color: #1d4ed8 !important;
}

/* Sub-item hover */
body.som-embed-app .sidebar-nav-group__body .nav-item {
    transition: background var(--ds-t-fast);
}

body.som-embed-app .sidebar-nav-group__body .nav-item:hover {
    background: rgba(15,23,42,0.04);
}

/* Chevron spin */
body.som-embed-app .sidebar-nav-group__chev {
    transition: transform 240ms var(--ds-ease) !important;
}
body.som-embed-app .sidebar-nav-group.is-open .sidebar-nav-group__chev {
    transform: rotate(180deg) !important;
}


/* ============================================================
   ACCORDION — instant + fade (no grid-row anim, no jank)
   ============================================================ */
body.som-embed-app .sidebar-nav-group__body {
    overflow: hidden;
    transform-origin: top;
}

body.som-embed-app .sidebar-nav-group__body[hidden] {
    display: none !important;
}

body.som-embed-app .sidebar-nav-group:not(.is-open) > .sidebar-nav-group__body {
    display: none !important;
}

@keyframes ds-acc-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}

body.som-embed-app .sidebar-nav-group.is-open > .sidebar-nav-group__body {
    animation: none;
}


/* ============================================================
   TOPBAR — solid + subtle shadow on scroll
   ============================================================ */
body.som-embed-app .som-topbar {
    background: #fbfcfe;
    border-bottom: 1px solid var(--ds-border);
    box-shadow: none;
    transition: box-shadow var(--ds-t-slow);
}

body.som-embed-app .som-topbar.ds-scrolled {
    box-shadow: 0 2px 20px rgba(15,23,42,0.06);
}

/* Topbar icon buttons */
body.som-embed-app .topbar-btn,
body.som-embed-app .btn-icon,
body.som-embed-app .sidebar-toggle {
    border-radius: 10px;
    box-shadow: none !important;
    transition: background var(--ds-t-fast), transform var(--ds-t-spr), color var(--ds-t-fast);
}
body.som-embed-app .topbar-btn:hover,
body.som-embed-app .btn-icon:hover,
body.som-embed-app .sidebar-toggle:hover {
    background: rgba(15,23,42,0.055);
    box-shadow: none !important;
}
body.som-embed-app .topbar-btn:active,
body.som-embed-app .btn-icon:active,
body.som-embed-app .sidebar-toggle:active {
    transition-duration: 60ms;
    box-shadow: none !important;
}


/* ============================================================
   SUBHEADER (page breadcrumb/action bar)
   ============================================================ */
body.som-embed-app .som-subheader {
    background: #fafcff;
    border-bottom: 1px solid var(--ds-border);
}


/* ============================================================
   KPI CARDS — elevated floating islands
   ============================================================ */
body.som-embed-app .kpi-card {
    background: #ffffff;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-r-lg);
    box-shadow: var(--ds-e2);
    transition: box-shadow var(--ds-t-slow), border-color var(--ds-t-slow);
    position: relative;
    overflow: hidden;
}

body.som-embed-app .kpi-card:hover {
    transform: none;
    box-shadow: var(--ds-e5);
}

/* KPI icon — flat, no button-like glow */
body.som-embed-app .kpi-icon {
    border-radius: var(--ds-r-md);
    box-shadow: none;
}


/* ============================================================
   GENERIC CARDS — floating panels (outer shell only)
   Exclude BEM children (__*) and hyphen parts (-card-*) so
   nested header/body rows do not get a second box border.
   ============================================================ */
body.som-embed-app .card,
body.som-embed-app .som-card,
body.som-embed-app .panel,
body.som-embed-app .ioc-card,
body.som-embed-app .lab-card,
body.som-embed-app [class*="-card"]:not(.toast):not(.kpi-card):not([class*="__"]):not([class*="-card-"]) {
    background: #ffffff;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-r-lg);
    box-shadow: var(--ds-e1);
    transition: box-shadow var(--ds-t-slow), border-color var(--ds-t-slow);
}

/* Card innards — divider lines only, never a nested frame */
body.som-embed-app [class*="-card__"],
body.som-embed-app [class*="-card-"]:not([class*="-card--"]) {
    box-shadow: none;
}

body.som-embed-app [class*="-card__head"],
body.som-embed-app [class*="-card__header"],
body.som-embed-app [class*="-card__title"],
body.som-embed-app [class*="-card__body"],
body.som-embed-app [class*="-card__foot"],
body.som-embed-app [class*="-card__footer"],
body.som-embed-app [class*="-card-head"],
body.som-embed-app [class*="-card-header"],
body.som-embed-app [class*="-card-title"],
body.som-embed-app [class*="-card-body"],
body.som-embed-app [class*="-card-foot"],
body.som-embed-app [class*="-card-footer"] {
    border: none;
    border-radius: 0;
}

body.som-embed-app [class*="-card__head"],
body.som-embed-app [class*="-card__header"],
body.som-embed-app [class*="-card-head"],
body.som-embed-app [class*="-card-header"],
body.som-embed-app .som-bs-card-header {
    border-bottom: 1px solid var(--ds-border);
}

body.som-embed-app .card:hover,
body.som-embed-app .som-card:hover,
body.som-embed-app .panel:hover,
body.som-embed-app .ioc-card:hover,
body.som-embed-app .lab-card:hover {
    transform: none;
    box-shadow: var(--ds-e3);
}


/* ============================================================
   DATA / CHART SECTIONS — floating containers
   ============================================================ */
body.som-embed-app .chart-wrap,
body.som-embed-app .chart-container,
body.som-embed-app .chart-section,
body.som-embed-app .dashboard-chart,
body.som-embed-app .incident-timeline-wrap,
body.som-embed-app .timeline-section {
    background: var(--ds-bg-card);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-r-lg);
    box-shadow: var(--ds-e1);
    padding: 22px 24px;
}


/* ============================================================
   DATA TABLES
   ============================================================ */
body.som-embed-app .table-wrapper,
body.som-embed-app .data-table-wrap {
    background: var(--ds-bg-card);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-r-lg);
    box-shadow: var(--ds-e1);
    overflow: hidden;
}

body.som-embed-app .data-table {
    border-radius: 0;
}

body.som-embed-app .data-table thead th {
    background: #f1f5f9;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ds-slate-500);
    border-bottom: 1px solid var(--ds-border);
}

body.som-embed-app .data-table tbody tr {
    transition: background var(--ds-t-fast);
    border-bottom: 1px solid var(--ds-border);
}

body.som-embed-app .data-table tbody tr:last-child {
    border-bottom: none;
}

body.som-embed-app .data-table tbody tr:hover {
    background: rgba(30,58,138,0.03);
}

body.som-embed-app .data-table tbody td {
    border-bottom: none;
    font-size: 0.875rem;
    vertical-align: middle;
}


/* ============================================================
   BUTTONS — premium feel
   ============================================================ */
body.som-embed-app .btn {
    border-radius: var(--ds-r-sm);
    letter-spacing: 0.015em;
    transition:
        background    var(--ds-t-fast),
        color         var(--ds-t-fast),
        border-color  var(--ds-t-fast),
        box-shadow    var(--ds-t-base),
        filter        var(--ds-t-fast);
}

body.som-embed-app .btn:hover { box-shadow: var(--ds-e2); }
body.som-embed-app .btn:active {
    filter: brightness(0.96);
    box-shadow: var(--ds-e1);
}
body.som-embed-app .btn:focus-visible {
    outline: 2px solid rgba(30,58,138,0.42);
    outline-offset: 3px;
}

/* Primary */
body.som-embed-app .btn-primary {
    background: var(--ds-accent);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(30,58,138,0.22), 0 0 0 1px rgba(30,58,138,0.10) inset;
}
body.som-embed-app .btn-primary:hover {
    background: var(--ds-accent-deep);
    box-shadow: 0 5px 18px rgba(30,58,138,0.30);
    color: #fff;
    filter: none;
}
body.som-embed-app .btn-primary:active {
    box-shadow: 0 1px 3px rgba(30,58,138,0.18);
}

/* Secondary */
body.som-embed-app .btn-secondary {
    background: var(--ds-bg-card);
    border: 1px solid var(--ds-border-mid);
    box-shadow: var(--ds-e1);
}
body.som-embed-app .btn-secondary:hover {
    background: var(--ds-slate-50);
    border-color: rgba(30,58,138,0.22);
    box-shadow: var(--ds-e2);
}

/* Danger */
body.som-embed-app .btn-danger:hover {
    filter: brightness(0.92);
    box-shadow: 0 4px 12px rgba(239,68,68,0.25);
}


/* ============================================================
   FORM INPUTS — enterprise clean
   ============================================================ */
body.som-embed-app input:not([type=checkbox]):not([type=radio]),
body.som-embed-app textarea,
body.som-embed-app select {
    border-radius: var(--ds-r-sm);
    border: none;
    background: #f4f6fa;
    transition:
        box-shadow    var(--ds-t-fast),
        background    var(--ds-t-fast);
}

body.som-embed-app input:not([type=checkbox]):not([type=radio]):focus,
body.som-embed-app textarea:focus,
body.som-embed-app select:focus {
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
    outline: none;
}

/* Fields inside chrome shells stay borderless */
body.som-embed-app .global-search .search-input,
body.som-embed-app .global-search input,
body.som-embed-app .search-wrap input,
body.som-embed-app .wf-node-search-wrap input,
body.som-embed-app .rpt-search input,
body.som-embed-app .cc-home-prompt,
body.som-embed-app .cc-agent-composer textarea,
body.som-embed-app .cc-agent-composer input {
    border: none !important;
    box-shadow: none !important;
}

body.som-embed-app .global-search .search-input,
body.som-embed-app .global-search input,
body.som-embed-app .cc-home-prompt,
body.som-embed-app .cc-agent-composer textarea,
body.som-embed-app .cc-agent-composer input {
    background: transparent !important;
}

body.som-embed-app .search-wrap input,
body.som-embed-app .wf-node-search-wrap input,
body.som-embed-app .rpt-search input {
    background: #fff !important;
}

body.som-embed-app .search-wrap,
body.som-embed-app .wf-node-search-wrap,
body.som-embed-app .rpt-search {
    background: #fff;
}

body.som-embed-app .nt-editor-head,
body.som-embed-app .nt-editor-head input,
body.som-embed-app #noteTitle {
    background: #fff !important;
}

body.som-embed-app input::placeholder,
body.som-embed-app textarea::placeholder {
    color: var(--ds-slate-400);
    transition: opacity var(--ds-t-base);
}
body.som-embed-app input:focus::placeholder,
body.som-embed-app textarea:focus::placeholder {
    opacity: 0.45;
}


/* ============================================================
   GLOBAL SEARCH BAR
   ============================================================ */
body.som-embed-app .global-search {
    background: #f4f6fa;
    border: 1px solid var(--ds-border);
    border-radius: 10px;
    transition: border-color var(--ds-t-base), background var(--ds-t-base);
}
body.som-embed-app .global-search:focus-within {
    background: #ffffff;
    border-color: rgba(30,58,138,0.48);
    box-shadow: none;
}

/* Search results dropdown */
body.som-embed-app .global-search-results {
    background: #ffffff;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-r-lg);
    box-shadow: var(--ds-e5);
}

body.som-embed-app .cc-home-composer-card,
body.som-embed-app .cc-home-list-card {
    border: none;
}


/* ============================================================
   PAGE-LEVEL TABS (nav-links, ioc-tabs, etc.)
   ============================================================ */
body.som-embed-app .nav-links a,
body.som-embed-app .ioc-tabs:not(.ioc-tabs--header) a {
    border-radius: var(--ds-r-sm);
    transition: background var(--ds-t-fast), color var(--ds-t-fast), box-shadow var(--ds-t-fast);
}
body.som-embed-app .nav-links a:hover {
    background: var(--ds-accent-soft);
}
body.som-embed-app .nav-links a.active {
    background: var(--ds-accent-soft);
    color: var(--ds-accent);
    box-shadow: inset 0 0 0 1px rgba(30,58,138,0.18);
}

/* Header tab bar — Control Center cc-tabbar ile aynı browser sekmesi */
body.som-embed-app .ioc-header-bar {
    background: #f1f5f9;
    border-bottom: 1px solid var(--ds-border);
    border-top: none;
}
body.som-embed-app .ioc-tabs.ioc-tabs--header a {
    border-radius: 10px 10px 0 0;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
body.som-embed-app .ioc-tabs.ioc-tabs--header a.is-active {
    background: #fff;
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: 0 -2px 8px rgba(15, 23, 42, 0.04);
}


/* ============================================================
   MODALS — depth + animation
   ============================================================ */
@keyframes ds-modal-box-in {
    from { opacity: 0; transform: scale(0.93) translateY(14px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

body.som-embed-app .som-app-modal__backdrop {
    background: rgba(8,17,32,0.55);
}

body.som-embed-app .som-app-modal:not([hidden]) .som-app-modal__box {
    animation: ds-modal-box-in 240ms var(--ds-ease-out) both;
    border-radius: var(--ds-r-xl);
    background: #ffffff;
    border: 1px solid var(--ds-border);
    box-shadow: var(--ds-e5);
}


/* ============================================================
   TOAST NOTIFICATIONS — right top, glass
   ============================================================ */
@keyframes ds-toast-in  {
    from { opacity: 0; transform: translateX(28px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}
@keyframes ds-toast-out {
    from { opacity: 1; transform: none;           max-height: 120px; margin-bottom: 12px; }
    to   { opacity: 0; transform: translateX(28px); max-height: 0;     margin-bottom: 0; }
}

body.som-embed-app .toast-container {
    top: calc(var(--topbar-height) + 18px);
    bottom: auto;
    right: 24px;
}
body.som-embed-app .toast {
    animation: ds-toast-in 260ms var(--ds-ease-out) both;
    background: #ffffff;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-r-md);
    box-shadow: var(--ds-e4);
    overflow: hidden;
    min-width: 300px;
    max-width: 380px;
}
body.som-embed-app .toast.ds-leaving {
    animation: ds-toast-out 300ms var(--ds-ease) forwards;
}


/* ============================================================
   DROPDOWN / POPOVER — panel chrome on menus only (not wrappers)
   ============================================================ */
body.som-embed-app .topbar-dropdown-menu,
body.som-embed-app .som-dropdown,
body.som-embed-app [class*="-dropdown-panel"],
body.som-embed-app [class*="-dropdown-menu"],
body.som-embed-app [class*="-popover-panel"],
body.som-embed-app [class*="-popover-menu"] {
    background: #ffffff;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-r-lg);
    box-shadow: var(--ds-e5);
}

body.som-embed-app .topbar-dropdown,
body.som-embed-app [class*="__dropdown"]:not([class*="-panel"]):not([class*="-menu"]) {
    border: none;
    box-shadow: none;
    background: transparent;
}

body.som-embed-app .som-topbar-notif__panel.som-bs-card {
    background: #ffffff;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-r-lg);
    box-shadow: var(--ds-e5);
}

body.som-embed-app .som-topbar-notif__panel .som-bs-card-header,
body.som-embed-app .som-topbar-notif__panel .som-bs-card-body,
body.som-embed-app .som-topbar-notif__panel .som-bs-card-title {
    border: none;
    box-shadow: none;
    border-radius: 0;
}

body.som-embed-app .som-topbar-notif__panel .som-bs-card-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--ds-border);
}

/* Tooltip */
body.som-embed-app [title],
body.som-embed-app [data-tooltip] {
    position: relative;
}

@keyframes ds-tooltip-in {
    from { opacity: 0; transform: scale(0.9) translateY(3px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

body.som-embed-app .som-tooltip {
    animation: ds-tooltip-in 140ms var(--ds-ease-out) both;
    background: #0f172a;
    color: #f8fafc;
    border-radius: var(--ds-r-sm);
    font-size: 0.76rem;
    padding: 6px 10px;
    box-shadow: var(--ds-e3);
    pointer-events: none;
}


/* ============================================================
   SITE-HEADER (page internal sticky header)
   ============================================================ */
body.som-embed-app .site-header {
    background: #fbfcfe;
    border-bottom: 1px solid var(--ds-border);
    transition: box-shadow var(--ds-t-slow);
}
body.som-embed-app .site-header.ds-scrolled {
    box-shadow: 0 2px 20px rgba(15,23,42,0.07);
}


/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.ds-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 440ms var(--ds-ease-out), transform 440ms var(--ds-ease-out);
    will-change: opacity, transform;
}
.ds-reveal.ds-visible {
    opacity: 1;
    transform: none;
}

/* Staggered grid children */
.ds-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 380ms var(--ds-ease-out), transform 380ms var(--ds-ease-out);
}
.ds-stagger.ds-visible > *:nth-child(1) { transition-delay:   0ms; }
.ds-stagger.ds-visible > *:nth-child(2) { transition-delay:  55ms; }
.ds-stagger.ds-visible > *:nth-child(3) { transition-delay: 110ms; }
.ds-stagger.ds-visible > *:nth-child(4) { transition-delay: 165ms; }
.ds-stagger.ds-visible > *:nth-child(5) { transition-delay: 220ms; }
.ds-stagger.ds-visible > *:nth-child(6) { transition-delay: 275ms; }
.ds-stagger.ds-visible > * {
    opacity: 1;
    transform: none;
}


/* ============================================================
   BADGES
   ============================================================ */
body.som-embed-app .badge {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: var(--ds-r-xs);
}
body.som-embed-app .badge-primary {
    background: var(--ds-accent-soft);
    color: var(--ds-accent);
    border: 1px solid rgba(30,58,138,0.16);
}


/* ============================================================
   STATUS INDICATORS
   ============================================================ */
body.som-embed-app .status-indicator {
    box-shadow: 0 0 0 2px rgba(255,255,255,0.9);
}


/* ============================================================
   ICONS — smooth micro-interactions
   ============================================================ */
body.som-embed-app .nav-item i,
body.som-embed-app .nav-item svg,
body.som-embed-app .btn i,
body.som-embed-app .btn svg {
    transition: none;
}
body.som-embed-app .nav-item:hover i,
body.som-embed-app .nav-item:hover svg,
body.som-embed-app .btn:hover i,
body.som-embed-app .btn:hover svg,
body.som-embed-app .btn:active i,
body.som-embed-app .btn:active svg {
    transform: none;
}


/* ============================================================
   SCROLLBAR — fine OS-like track
   ============================================================ */
body.som-embed-app ::-webkit-scrollbar        { width: 5px; height: 5px; }
body.som-embed-app ::-webkit-scrollbar-track  { background: transparent; }
body.som-embed-app ::-webkit-scrollbar-thumb  {
    background: rgba(15,23,42,0.13);
    border-radius: 99px;
}
body.som-embed-app ::-webkit-scrollbar-thumb:hover {
    background: rgba(15,23,42,0.24);
}


/* ============================================================
   TEXT SELECTION
   ============================================================ */
body.som-embed-app ::selection {
    background: rgba(30,58,138,0.15);
    color: inherit;
}


/* ============================================================
   FOCUS RING (system-wide)
   ============================================================ */
body.som-embed-app *:focus-visible {
    outline: 2px solid rgba(30,58,138,0.42);
    outline-offset: 2px;
}


/* ============================================================
   TYPOGRAPHY POLISH
   ============================================================ */
body.som-embed-app h1,
body.som-embed-app h2,
body.som-embed-app h3 {
    letter-spacing: -0.02em;
    -webkit-font-smoothing: antialiased;
}
body.som-embed-app .section-title,
body.som-embed-app .page-title {
    letter-spacing: -0.018em;
}


/* ============================================================
   BREADCRUMB
   ============================================================ */
body.som-embed-app .breadcrumb { opacity: 1; }


/* ============================================================
   LINK hover transitions
   ============================================================ */
body.som-embed-app a:not(.nav-item):not(.btn):not(.sidebar-logo) {
    transition: color var(--ds-t-fast), opacity var(--ds-t-fast);
}


/* ============================================================
   PAGE LEAVE — link-click fade-out
   ============================================================ */
body.som-embed-app.ds-leaving .som-content,
body.som-embed-app.ds-leaving .som-page-content {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 260ms var(--ds-ease), transform 260ms var(--ds-ease);
}


/* ============================================================
   EXECUTIVE KPI ENHANCEMENTS — living panels
   ============================================================ */
body.som-embed-app .kpi-card {
    padding: 22px 24px;
    background: #ffffff;
}

/* Bottom soft gradient underline (severity/status accent) */
body.som-embed-app .kpi-card::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(30,58,138,0.28) 20%,
        rgba(6,182,212,0.32) 50%,
        rgba(30,58,138,0.28) 80%,
        transparent 100%);
    opacity: 0.65;
    transition: opacity var(--ds-t-base);
    pointer-events: none;
}

body.som-embed-app .kpi-card:hover::after {
    opacity: 1;
}

body.som-embed-app .kpi-primary   .kpi-icon { background: linear-gradient(135deg, #1e3a8a, #1d4ed8); color: #fff; box-shadow: none; }
body.som-embed-app .kpi-danger    .kpi-icon { background: linear-gradient(135deg, #b91c1c, #dc2626); color: #fff; box-shadow: none; }
body.som-embed-app .kpi-warning   .kpi-icon { background: linear-gradient(135deg, #b45309, #d97706); color: #fff; box-shadow: none; }
body.som-embed-app .kpi-success   .kpi-icon { background: linear-gradient(135deg, #047857, #059669); color: #fff; box-shadow: none; }
body.som-embed-app .kpi-info      .kpi-icon { background: linear-gradient(135deg, #0e7490, #0891b2); color: #fff; box-shadow: none; }


/* ============================================================
   INCIDENT / COMMAND CARDS — severity ribbon on left edge
   ============================================================ */
body.som-embed-app .incident-card,
body.som-embed-app .case-card,
body.som-embed-app .som-command-card {
    position: relative;
    overflow: hidden;
    padding-left: 20px;
}

body.som-embed-app .incident-card::before,
body.som-embed-app .case-card::before,
body.som-embed-app .som-command-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12%;
    bottom: 12%;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, #1e3a8a, #0ea5e9);
    box-shadow: 0 0 12px rgba(30,58,138,0.35);
}

body.som-embed-app .incident-card[data-severity="critical"]::before,
body.som-embed-app .incident-card.is-critical::before,
body.som-embed-app .case-card.is-critical::before { background: linear-gradient(180deg, #b91c1c, #dc2626); box-shadow: 0 0 12px rgba(220,38,38,0.4); }

body.som-embed-app .incident-card[data-severity="high"]::before,
body.som-embed-app .incident-card.is-high::before { background: linear-gradient(180deg, #c2410c, #ea580c); box-shadow: 0 0 12px rgba(234,88,12,0.35); }

body.som-embed-app .incident-card[data-severity="medium"]::before,
body.som-embed-app .incident-card.is-medium::before { background: linear-gradient(180deg, #b45309, #d97706); box-shadow: 0 0 12px rgba(217,119,6,0.32); }

body.som-embed-app .incident-card[data-severity="low"]::before,
body.som-embed-app .incident-card.is-low::before { background: linear-gradient(180deg, #047857, #059669); box-shadow: 0 0 12px rgba(5,150,105,0.32); }


/* ============================================================
   STATUS DOT — live pulse
   ============================================================ */
body.som-embed-app .status-live,
body.som-embed-app .status-active,
body.som-embed-app .status-indicator--live {
    position: relative;
}
body.som-embed-app .status-live::after,
body.som-embed-app .status-active::after,
body.som-embed-app .status-indicator--live::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: currentColor;
    opacity: 0.5;
    animation: ds-pulse 1.8s ease-out infinite;
    pointer-events: none;
}

@keyframes ds-pulse {
    0%   { transform: scale(1);   opacity: 0.55; }
    70%  { transform: scale(2.2); opacity: 0;    }
    100% { transform: scale(2.2); opacity: 0;    }
}


/* ============================================================
   CHART / TIMELINE panels — glass with inner ring
   ============================================================ */
body.som-embed-app .chart-wrap,
body.som-embed-app .chart-container,
body.som-embed-app .chart-section,
body.som-embed-app .dashboard-chart,
body.som-embed-app .incident-timeline-wrap,
body.som-embed-app .timeline-section,
body.som-embed-app .dashboard-card {
    background: #ffffff;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-r-lg);
    box-shadow: var(--ds-e2);
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
}

body.som-embed-app .chart-wrap::before,
body.som-embed-app .chart-container::before,
body.som-embed-app .chart-section::before,
body.som-embed-app .dashboard-chart::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
    pointer-events: none;
}


/* ============================================================
   HOVER GLOW RING — enterprise micro-detail
   ============================================================ */
body.som-embed-app .kpi-card,
body.som-embed-app .card,
body.som-embed-app .panel,
body.som-embed-app .ioc-card,
body.som-embed-app .lab-card {
    position: relative;
}

body.som-embed-app .kpi-card::before,
body.som-embed-app .card::before,
body.som-embed-app .panel::before,
body.som-embed-app .ioc-card::before,
body.som-embed-app .lab-card::before {
    /* handled per-element above where present; skip generic */
}


/* ============================================================
   SKELETON LOADER — shimmer
   ============================================================ */
.ds-skeleton {
    background: linear-gradient(90deg,
        rgba(226,232,240,0.35) 0%,
        rgba(226,232,240,0.65) 50%,
        rgba(226,232,240,0.35) 100%);
    background-size: 200% 100%;
    border-radius: 6px;
    animation: ds-shimmer 1.6s ease-in-out infinite;
}
@keyframes ds-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}


/* Ripple click-feedback removed sitewide — the oversized/undamped
   scale(0) -> scale(2.4) burst on wide, short buttons read as the
   whole button "inflating" on click. .btn keeps its plain :active
   press feedback (scale 0.98) below instead. */


/* ============================================================
   ANIMATED COUNTER STYLE (JS-target)
   ============================================================ */
body.som-embed-app [data-ds-counter],
body.som-embed-app .kpi-card .kpi-value {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}


/* ============================================================
   TREND indicators
   ============================================================ */
body.som-embed-app .kpi-trend,
body.som-embed-app .trend-up,
body.som-embed-app .trend-down {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--ds-r-xs);
}
body.som-embed-app .trend-up   { background: rgba(5,150,105,0.10);  color: #047857; }
body.som-embed-app .trend-down { background: rgba(220,38,38,0.10);  color: #b91c1c; }


/* ============================================================
   SIDEBAR active — luminous left indicator
   ============================================================ */
body.som-embed-app .nav-item.active {
    position: relative;
}
body.som-embed-app .nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: #2563eb;
    box-shadow: none;
}


/* ============================================================
   TAB (pill/segmented) — active soft fill
   ============================================================ */
body.som-embed-app .som-tab,
body.som-embed-app [role="tab"]:not(.cc-tab) {
    transition: background var(--ds-t-fast), color var(--ds-t-fast), box-shadow var(--ds-t-fast);
    border-radius: var(--ds-r-sm);
}
body.som-embed-app .som-tab.is-active,
body.som-embed-app .som-tab[aria-selected="true"],
body.som-embed-app [role="tab"][aria-selected="true"]:not(.cc-tab) {
    background: var(--ds-accent-soft);
    color: var(--ds-accent);
    box-shadow: 0 1px 3px rgba(30,58,138,0.10), inset 0 0 0 1px rgba(30,58,138,0.15);
}


/* ============================================================
   DETAIL LIST — key/value luxurious spacing
   ============================================================ */
body.som-embed-app .detail-list dt {
    color: var(--ds-slate-500);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
}
body.som-embed-app .detail-list dd {
    color: var(--ds-slate-800);
    font-size: var(--ds-text-lg);
    margin-bottom: 14px;
}


/* ============================================================
   NUMBERS in KPI — big/bold with tabular
   ============================================================ */
body.som-embed-app .kpi-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--ds-slate-900);
    line-height: 1.1;
}
body.som-embed-app .kpi-label {
    color: var(--ds-slate-500);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}


/* ============================================================
   DIVIDERS — luxury hairlines
   ============================================================ */
body.som-embed-app hr,
body.som-embed-app .som-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(15,23,42,0.09), transparent);
    margin: 24px 0;
}


/* ============================================================
   PROGRESS bars — glass fill
   ============================================================ */
body.som-embed-app progress,
body.som-embed-app .progress-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(15,23,42,0.06);
    overflow: hidden;
}
body.som-embed-app .progress-bar > .progress-fill {
    background: linear-gradient(90deg, #1e3a8a, #06b6d4);
    box-shadow: 0 0 10px rgba(30,58,138,0.3);
    height: 100%;
    border-radius: 999px;
    transition: width 500ms var(--ds-ease-out);
}


/* ============================================================
   RESPONSIVE — disable hover transforms on touch
   ============================================================ */
@media (hover: none) {
    body.som-embed-app .kpi-card:hover,
    body.som-embed-app .card:hover,
    body.som-embed-app .ioc-card:hover,
    body.som-embed-app .btn:hover {
        transform: none !important;
    }
}


/* ============================================================
   REDUCED MOTION — respect user preference
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    body.som-embed-app *,
    body.som-embed-app *::before,
    body.som-embed-app *::after {
        animation-duration: 1ms !important;
        transition-duration: 60ms !important;
    }
    body.som-embed-app::before { animation: none; }
}

/* ============================================================
   MATTE CLARITY — blur kaldır, net piksel (geçiş animasyonları korunur)
   ============================================================ */
body.som-embed-app .som-topbar,
body.som-embed-app .som-subheader,
body.som-embed-app .global-search,
body.som-embed-app .global-search-results,
body.som-embed-app .cc-tabbar,
body.som-embed-app .cc-home-vis-toggle,
body.som-embed-app .layout-top {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.som-embed-app .kpi-card,
body.som-embed-app .dashboard-card,
body.som-embed-app .dashboard-grid .dashboard-card {
    background: #ffffff;
    border-color: #cbd5e1;
}

body.som-embed-app .kpi-primary .kpi-icon { background: #dbeafe; color: #1d4ed8; box-shadow: none; }
body.som-embed-app .kpi-danger .kpi-icon { background: #fee2e2; color: #dc2626; box-shadow: none; }
body.som-embed-app .kpi-warning .kpi-icon { background: #ffedd5; color: #d97706; box-shadow: none; }
body.som-embed-app .kpi-success .kpi-icon { background: #d1fae5; color: #059669; box-shadow: none; }
body.som-embed-app .kpi-info .kpi-icon { background: #ede9fe; color: #7c3aed; box-shadow: none; }
