/* === VIBE Dashboard - Production Planning Grid === */

/* === Self-hosted TT Interphases Pro Font === */
@font-face {
    font-family: 'TT Interphases Pro';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../miniapp/fonts/inter-400.woff2') format('woff2');
}
@font-face {
    font-family: 'TT Interphases Pro';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../miniapp/fonts/inter-500.woff2') format('woff2');
}
@font-face {
    font-family: 'TT Interphases Pro';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../miniapp/fonts/inter-600.woff2') format('woff2');
}

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: "TT Interphases Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    font-weight: var(--weight-regular);
    color: var(--text-primary);
    background: var(--bg-primary);
}

/* === Design System Variables === */
:root {
    /* Core Colors */
    --bg-primary: #F2F2F7;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: rgba(118, 118, 128, 0.12);

    /* Text Hierarchy */
    --text-primary: #000000;
    --text-secondary: #8E8E93;
    --text-tertiary: #C7C7CC;

    /* Accent Colors */
    --accent-primary: #1A0DFF;
    --accent-success: #36F141;
    --accent-warning: #F1A836;
    --accent-error: #F13641;

    /* Interactive States */
    --state-hover: rgba(0, 0, 0, 0.05);
    --state-pressed: rgba(26, 13, 255, 0.12);

    /* Borders */
    --separator-opaque: rgba(60, 60, 67, 0.29);
    --separator-subtle: rgba(60, 60, 67, 0.12);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 24px;

    /* Border Radius - flat style */
    --radius-sm: 0;
    --radius-md: 0;

    /* Typography */
    --text-xs: 11px;
    --text-sm: 13px;
    --text-base: 14px;
    --text-lg: 16px;
    --text-xl: 20px;

    /* Font Weights */
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;

    /* Line Heights */
    --leading-tight: 1.2;
    --leading-normal: 1.35;

    /* Grid dimensions */
    --sidebar-width: 200px;
    --header-height: 48px;
    --frozen-col-1: 180px;  /* Изделие */
    --frozen-col-2: 120px;  /* Комментарий */
    --frozen-col-3: 80px;   /* РД */
    --frozen-col-4: 80px;   /* Подряд */
    --frozen-col-5: 80px;   /* Отгрузка */
    --frozen-col-6: 80px;   /* НМ */
    --day-col-width: 100px;

    /* Frozen column left offsets */
    --frozen-left-1: 0px;
    --frozen-left-2: 180px;
    --frozen-left-3: 300px;
    --frozen-left-4: 380px;
    --frozen-left-5: 460px;
    --frozen-left-6: 540px;
    --frozen-total: 620px;
}

/* === Layout === */
#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.screen {
    height: 100%;
}

#screen-main {
    display: flex;
    flex-direction: column;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: var(--space-lg);
}

.auth-error-title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
}

/* === Header === */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    padding: 0 var(--space-lg);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--separator-subtle);
    flex-shrink: 0;
}

.dashboard-logo {
    height: 24px;
    width: auto;
}

.header-actions {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

/* === Dashboard Body === */
.dashboard-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* === Sidebar === */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--separator-subtle);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    transition: width 0.2s ease;
}

.sidebar-header {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--separator-subtle);
}

.sidebar-list {
    flex: 1;
    overflow-y: auto;
}

.sidebar-item {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-sm);
    cursor: pointer;
    border-bottom: 1px solid var(--separator-subtle);
    transition: background 0.1s;
    gap: var(--space-xs);
}

.sidebar-item-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.sidebar-item:hover {
    background: var(--state-hover);
}

.sidebar-item.active {
    background: var(--state-pressed);
    color: var(--accent-primary);
    font-weight: var(--weight-medium);
    border-left: 3px solid var(--accent-primary);
    padding-left: calc(var(--space-lg) - 3px);
}

/* === Grid Area === */
.grid-area {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.grid-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* === Grid Wrapper (scrollable) === */
.grid-wrapper {
    flex: 1;
    overflow: auto;
    position: relative;
}

/* === Grid Table === */
.grid-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 100%;
    table-layout: fixed;
}

/* === Grid Header === */
.grid-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #FFFFFF;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: var(--space-sm);
    text-align: center;
    border-bottom: 1px solid var(--separator-opaque);
    border-right: 1px solid var(--separator-subtle);
    white-space: nowrap;
    overflow: hidden;
}

/* === Frozen Columns === */
.col-frozen {
    position: sticky;
    z-index: 2;
    background: #EEEEF3;
    border-right: 1px solid var(--separator-subtle);
}

/* Frozen + header = highest z-index, must cover day headers on scroll */
.grid-table thead .col-frozen {
    z-index: 10;
    background: #E8E8ED !important;
}

.col-product { left: var(--frozen-left-1); width: var(--frozen-col-1); min-width: var(--frozen-col-1); max-width: var(--frozen-col-1); }
.col-comment { left: var(--frozen-left-2); width: var(--frozen-col-2); min-width: var(--frozen-col-2); max-width: var(--frozen-col-2); }
.col-rd      { left: var(--frozen-left-3); width: var(--frozen-col-3); min-width: var(--frozen-col-3); max-width: var(--frozen-col-3); }
.col-subcon  { left: var(--frozen-left-4); width: var(--frozen-col-4); min-width: var(--frozen-col-4); max-width: var(--frozen-col-4); }
.col-ship    { left: var(--frozen-left-5); width: var(--frozen-col-5); min-width: var(--frozen-col-5); max-width: var(--frozen-col-5); }
.col-montage { left: var(--frozen-left-6); width: var(--frozen-col-6); min-width: var(--frozen-col-6); max-width: var(--frozen-col-6); border-right: 2px solid var(--separator-opaque); }

.grid-table thead .col-montage {
    border-right: 2px solid var(--separator-opaque);
}

/* === Grid Body Cells === */
.grid-table tbody td {
    padding: var(--space-xs) var(--space-sm);
    border-bottom: 1px solid var(--separator-subtle);
    border-right: 1px solid var(--separator-subtle);
    font-size: var(--text-sm);
    vertical-align: top;
    height: 60px;
}

.grid-table tbody tr:hover td {
    background: #F7F7F7;
}

.grid-table tbody tr:hover td.col-frozen {
    background: #E4E4EA;
}

/* === Product Cell === */
.product-name {
    font-weight: var(--weight-medium);
    font-size: var(--text-sm);
    line-height: var(--leading-tight);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.product-status {
    font-size: 10px;
    color: var(--text-secondary);
}

/* === Inline Editable Cells (meta) === */
.meta-cell {
    font-size: 10px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    min-height: 20px;
}

.meta-cell:hover {
    background: rgba(26, 13, 255, 0.06);
}

.meta-cell-empty {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    line-height: normal;
    overflow: visible;
    white-space: normal;
    margin: 0;
}

.meta-cell-empty::after {
    content: '+';
    font-size: var(--text-lg);
    color: transparent;
}

.meta-cell-empty:hover::after {
    color: var(--text-secondary);
}

.meta-popup-date-input {
    width: 100%;
    padding: var(--space-sm);
    font-family: inherit;
    font-size: var(--text-sm);
    border: 1px solid var(--separator-opaque);
    background: white;
}

.meta-popup-date-input:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: -1px;
}

/* Inline date input for meta date cells */
.meta-date-input {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    padding: var(--space-xs) var(--space-sm);
    font-family: inherit;
    font-size: var(--text-xs);
    border: 2px solid var(--accent-primary);
    outline: none;
    background: white;
    z-index: 5;
    box-sizing: border-box;
}

.meta-date {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

/* === Day Columns === */
.col-day {
    width: var(--day-col-width);
    min-width: var(--day-col-width);
    max-width: var(--day-col-width);
    position: relative;
}

/* Day header */
.day-header {
    font-size: var(--text-xs);
    line-height: 1.3;
}

.day-header-date {
    font-weight: var(--weight-semibold);
}

.day-header-weekday {
    font-weight: var(--weight-regular);
    color: var(--text-secondary);
    font-size: 10px;
}

/* Today column highlight */
.col-today {
    background: #F5F5FF !important;
}

.grid-table thead .col-today {
    background: #EDEDFF !important;
}

/* Weekend columns */
.col-weekend {
    background: #FAFAFA;
}

.grid-table thead .col-weekend {
    background: #F0F0F0;
}

/* Deadline marker */
.col-deadline {
    border-right: 3px solid var(--accent-error) !important;
}

/* === Day Cell Content === */
.day-cell {
    cursor: pointer;
    min-height: 52px;
    position: relative;
    padding: 2px 4px;
}

.day-cell.day-cell-empty {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-height: 0;
    margin: 0;
}

.day-cell:hover {
    background: rgba(26, 13, 255, 0.06);
}

.day-cell-empty {
    color: var(--text-tertiary);
    text-align: center;
    font-size: var(--text-xs);
}

/* Shipment cell — signal orange */
.day-cell-shipment {
    background: var(--accent-warning) !important;
    color: #FFFFFF;
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.day-cell-empty::after {
    content: '+';
    font-size: var(--text-lg);
    color: transparent;
}

.day-cell-empty:hover::after {
    color: var(--text-secondary);
}

.day-cell-content {
    font-size: var(--text-sm);
    line-height: var(--leading-tight);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.day-cell-employee {
    font-size: var(--text-sm);
    color: var(--accent-primary);
    margin-top: 1px;
}

.day-cell-hours {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* === Cell Popup === */
.cell-popup {
    position: fixed;
    z-index: 100;
    background: var(--bg-secondary);
    border: 1px solid var(--separator-opaque);
    box-shadow: var(--shadow-lg);
    width: 280px;
}

.cell-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--separator-subtle);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
}

.cell-popup-close {
    background: none;
    border: none;
    font-size: var(--text-lg);
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0 4px;
}

.cell-popup-body {
    padding: var(--space-sm) var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.cell-popup-textarea {
    width: 100%;
    padding: var(--space-sm);
    font-family: inherit;
    font-size: var(--text-sm);
    border: 1px solid var(--separator-opaque);
    resize: vertical;
    min-height: 60px;
}

.cell-popup-textarea:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: -1px;
}

.cell-popup-row {
    display: flex;
    gap: var(--space-sm);
}

.cell-popup-select {
    flex: 1;
    padding: var(--space-xs) var(--space-sm);
    font-family: inherit;
    font-size: var(--text-xs);
    border: 1px solid var(--separator-opaque);
    background: white;
}

.cell-popup-input {
    width: 60px;
    padding: var(--space-xs) var(--space-sm);
    font-family: inherit;
    font-size: var(--text-xs);
    border: 1px solid var(--separator-opaque);
    text-align: center;
}

.cell-popup-checkbox-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    cursor: pointer;
}

.cell-popup-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-warning);
    cursor: pointer;
}

.cell-popup-footer {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--separator-subtle);
}

.cell-popup-footer-right {
    display: flex;
    gap: var(--space-sm);
}

/* === Buttons === */
.btn {
    padding: var(--space-xs) var(--space-md);
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    border: 1px solid var(--separator-opaque);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.1s;
}

.btn:hover { background: var(--state-hover); }
.btn:active { background: var(--state-pressed); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}
.btn-primary:hover { opacity: 0.9; }

.btn-danger {
    color: var(--accent-error);
    border-color: var(--accent-error);
    background: transparent;
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
}

/* === Loading Spinner === */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--separator-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Utilities === */
.text-secondary { color: var(--text-secondary); }
.hidden { display: none !important; }

/* === Toast === */
.toast {
    position: fixed;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-sm) var(--space-lg);
    background: var(--text-primary);
    color: var(--bg-secondary);
    font-size: var(--text-sm);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 90%;
}

.toast.visible {
    opacity: 1;
}

/* === Scrollbar styling === */
.grid-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.grid-wrapper::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.grid-wrapper::-webkit-scrollbar-thumb {
    background: var(--separator-opaque);
}

.grid-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.sidebar-list::-webkit-scrollbar {
    width: 4px;
}

.sidebar-list::-webkit-scrollbar-thumb {
    background: var(--separator-opaque);
}

/* === Login Screen === */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: var(--space-lg);
    max-width: 320px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.login-logo {
    width: 80px;
    height: auto;
}

.login-title {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    color: var(--accent-primary);
    letter-spacing: 0.05em;
    margin-bottom: var(--space-lg);
}

.login-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    text-align: center;
}

.login-input {
    width: 100%;
    padding: var(--space-md);
    font-family: inherit;
    font-size: var(--text-base);
    border: 1px solid var(--separator-opaque);
    background: var(--bg-secondary);
    color: var(--text-primary);
    outline: none;
}

.login-input:focus {
    border-color: var(--accent-primary);
}

.login-btn {
    width: 100%;
    padding: var(--space-md);
    font-size: var(--text-base);
    margin-top: var(--space-sm);
}

.login-error {
    margin-top: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--accent-error);
    text-align: center;
}

.login-admins-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.login-admin-item {
    width: 100%;
    padding: var(--space-md);
    font-family: inherit;
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    border: 1px solid var(--separator-opaque);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: background 0.1s;
}

.login-admin-item:hover {
    background: var(--state-hover);
}

.login-admin-item:active {
    background: var(--state-pressed);
    color: var(--accent-primary);
}

.login-back {
    margin-top: var(--space-md);
    align-self: flex-start;
}

/* === Header Breadcrumb === */
.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header-separator {
    color: var(--separator-opaque);
    font-size: var(--text-lg);
    font-weight: var(--weight-regular);
}

.header-project {
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--accent-primary);
    padding: var(--space-xs) var(--space-sm);
    background: var(--state-pressed);
}

/* === Sidebar Search === */
.sidebar-search {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--separator-subtle);
}

.sidebar-search input {
    width: 100%;
    padding: var(--space-xs) var(--space-sm);
    font-family: inherit;
    font-size: var(--text-xs);
    border: 1px solid var(--separator-subtle);
    background: var(--bg-primary);
    outline: none;
}

.sidebar-search input:focus {
    border-color: var(--accent-primary);
}

.sidebar-search input::placeholder {
    color: var(--text-tertiary);
}

/* === Sidebar Item Count === */
.sidebar-item-count {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    background: var(--bg-primary);
    padding: 1px 6px;
    font-weight: var(--weight-medium);
    flex-shrink: 0;
}

.sidebar-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* === Sidebar Toggle (collapse/expand) === */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: var(--text-lg);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0 var(--space-xs);
    line-height: 1;
}

.sidebar-toggle:hover {
    color: var(--text-primary);
}

.sidebar.collapsed {
    width: 0;
    padding: 0;
    overflow: hidden;
    border-right: none;
}

.sidebar-expand {
    width: 24px;
    background: var(--bg-secondary);
    border: none;
    border-right: 1px solid var(--separator-subtle);
    font-size: var(--text-lg);
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.1s;
}

.sidebar-expand:hover {
    background: var(--state-hover);
    color: var(--text-primary);
}

/* === Empty State (improved) === */
.empty-state-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.empty-state-icon {
    font-size: 28px;
    color: var(--text-tertiary);
}

.empty-state-title {
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
}

/* === Skeleton Loading === */
.grid-loading-state {
    height: 100%;
    overflow: hidden;
    padding: 0;
}

.skeleton-table {
    width: 100%;
    opacity: 0.6;
}

.skeleton-table tbody td {
    height: 52px;
}

.skeleton-line {
    height: 10px;
    margin-bottom: 6px;
    background: linear-gradient(90deg, #e0e0e5 25%, #eeeef3 50%, #e0e0e5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease infinite;
}

.skeleton-line:last-child {
    width: 50%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === Date Navigation === */
.date-nav {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--separator-subtle);
    flex-shrink: 0;
}

.date-nav-btn {
    padding: var(--space-xs) var(--space-sm);
    font-family: inherit;
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    border: 1px solid var(--separator-subtle);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: background 0.1s;
}

.date-nav-btn:hover {
    background: var(--state-hover);
}

.date-nav-today {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.date-nav-range {
    margin-left: auto;
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.date-nav-range-active {
    font-weight: var(--weight-semibold);
    color: var(--accent-primary);
}

/* === Summary Row (total hours) === */
.summary-row td {
    position: sticky;
    bottom: 0;
    z-index: 1;
    background: #E8E8ED !important;
    font-weight: var(--weight-semibold);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    height: 32px !important;
    vertical-align: middle !important;
    text-align: center;
    border-top: 2px solid var(--separator-opaque);
}

.summary-row td.col-frozen {
    background: #DDDDE3 !important;
    z-index: 10;
}

.summary-label {
    text-align: right;
    padding-right: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* === Status Dot === */
.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: var(--space-xs);
    vertical-align: middle;
    flex-shrink: 0;
}

.status-dot-active { background: var(--accent-success); }
.status-dot-waiting { background: var(--accent-warning); }
.status-dot-done { background: var(--text-tertiary); }
.status-dot-default { background: var(--text-secondary); }

/* === Tooltip === */
.grid-tooltip {
    position: fixed;
    z-index: 2000;
    background: var(--text-primary);
    color: var(--bg-secondary);
    font-size: var(--text-xs);
    padding: var(--space-xs) var(--space-sm);
    max-width: 250px;
    line-height: 1.4;
    box-shadow: var(--shadow-md);
    pointer-events: none;
    word-break: break-word;
}

/* === Confirm Dialog === */
.confirm-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-dialog {
    background: var(--bg-secondary);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 320px;
    width: 90%;
}

.confirm-dialog p {
    font-size: var(--text-sm);
    margin-bottom: var(--space-lg);
    line-height: var(--leading-normal);
}

.confirm-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
}

/* === Toast with Undo === */
.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.toast-undo {
    color: var(--accent-primary);
    cursor: pointer;
    text-decoration: underline;
    font-weight: var(--weight-medium);
    white-space: nowrap;
}
