@import url("typography.css");
@import url("theme-dark.css");

/* Общие переменные цветов, размеров, теней и переходов CRM. */
:root {
    /* Основная палитра. */
    --color-grey-light: #e1e4e9;
    --color-standart-shadow: rgba(0, 0, 0, 0.04);
    --color-background-card: #ffffff;
    --color-blue-light: #9cc3f7;

    --color-primary: #007bff;
    --color-primary-text: var(--color-primary);
    --color-primary-hover: #ffffff;

    --color-cancel: #f3f4f6;
    --color-cancel-hover: #cccdd2;

    --color-close: #222222;
    --color-close-hover: red;

    --color-background: #f5f6f8;
    --color-surface: #ffffff;

    --color-text: #222222;
    --color-text-white: #ffffff;
    --color-text-secondary: #666666;
    --color-text-muted: #999999;

    --color-border: #dddddd;
    --color-border-dark: #666666;

    --color-border-button: transparent;
    --color-border-button-hover: #007bff;

    --color-danger: #e53935;
    --color-confirm: #28a745;
    --color-confirm-hover: #218639;
    --color-warning: #f59e0b;

    /* Скругления. */
    --radius-sm: 7px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Тени. */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.12);

    /* Переходы. */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;

}

/* Цвета уведомлений и подробных статусов сделок. */
:root {
    --toast-surface: #ffffff;
    --toast-border: #e5e7eb;
    --toast-icon-background: #e2f8fe;
    --toast-icon-color: #2626dc;
    --toast-title-color: #111827;
    --toast-message-color: #6b7280;
    --toast-close-color: #9ca3af;
    --toast-close-hover: #374151;
    --deal-new-background: #eff6ff;
    --deal-new-color: #2563eb;
    --deal-new-border-color: #bfdbfe;
    --deal-confirmed-background: #ecfdf5;
    --deal-confirmed-color: #059669;
    --deal-confirmed-border-color: #a7f3d0;
    --deal-assembling-background: #fff7ed;
    --deal-assembling-color: #ea580c;
    --deal-assembling-border-color: #fed7aa;
    --deal-ready-background: #f5f3ff;
    --deal-ready-color: #7c3aed;
    --deal-ready-border-color: #ddd6fe;
    --deal-delivering-background: #f0fdfa;
    --deal-delivering-color: #0f766e;
    --deal-delivering-border-color: #99f6e4;
    --deal-completed-background: #f0fdf4;
    --deal-completed-color: #16a34a;
    --deal-completed-border-color: #bbf7d0;
    --deal-deleted-background: #fef2f2;
    --deal-deleted-color: #dc2626;
    --deal-deleted-border-color: #fecaca;
    --notification-counter-background: #e53935;
    --notification-counter-text: #ffffff;
    --notification-action-text: #ffffff;
    --notification-border: #e5e7eb;
    --notification-header-border: #eeeeee;
    --notification-item-border: #f0f0f0;
    --notification-hover: #f7f7f7;
    --notification-unread: #f4f7ff;
    --notification-unread-hover: #edf2ff;
    --notification-message-color: #555;
    --notification-muted-color: #999;
    --notification-action-background: #0B4085;
    --notification-action-hover: #08346d;
    --notification-surface: #fff;
}

:root {
    --color-navigation-text: #555;
    --admin-active-nav-text: var(--color-primary);
    --color-navigation-hover: #0B4085;
    --color-navigation-border: #e5e5e5;
    --color-link-muted: #555;
    --color-link-hover: #0B4085;
}

/* Нейтральные цвета старых вариантов страниц. */
:root {
    --color-text-medium: #555;
    --color-text-subtle: #777;
    --color-surface-soft: #f5f5f5;
    --color-surface-hover: #e5e5e5;
    --color-border-muted: #ccc;
    --color-border-soft: #eee;
    --color-border-subtle: #e5e7eb;
    --color-border-row: #f1f5f9;
}

/* Дополнительные нейтральные роли. */
:root {
    --color-text-strong: #111827;
    --color-text-deep: #1f2937;
    --color-text-heading: #333;
    --color-text-soft: #6b7280;
    --color-text-subdued: #888;
    --color-text-slate: #334155;
    --color-text-slate-muted: #64748b;
    --color-surface-secondary: #f3f4f6;
    --color-surface-muted: #f9fafb;
    --color-price-background: #f4f6f8;
    --color-border-neutral: #e5e5e5;
    --color-border-strong: #d1d5db;
}

:root {
    --color-text-graphite: #374151;
    --color-border-hover: #9ca3af;
    --color-border-focus: #6b7280;
}

/* Отдельные роли состояний для настройки контраста темы. */
:root {
    --order-status-new-background: #dbeafe;
    --order-status-new-color: #1e40af;
    --order-status-processing-background: #fff3cd;
    --order-status-processing-color: #856404;
    --order-status-completed-background: #d4edda;
    --order-status-completed-color: #155724;
    --deal-status-default-color: #4b5563;
    --notification-button-hover: rgba(0, 0, 0, 0.05);
    --toast-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    --color-button-hover-text: #000000;
}

/* Палитра Telegram действует только внутри .telegram. */
.telegram {
    --tg-bg: #e9eef4;

    --tg-surface: #ffffff;
    --tg-surface-secondary: #f7f9fb;
    --tg-surface-hover: #eef4f9;

    --tg-active-bg: #e1edf8;

    --tg-accent: #2f80c9;
    --tg-accent-hover: #2672b7;
    --tg-accent-text: var(--tg-accent);
    --tg-accent-text-hover: var(--tg-accent-hover);

    --tg-text: #25313c;
    --tg-text-secondary: #607080;
    --tg-text-muted: #94a0ac;

    --tg-border: #dce3e9;
    --tg-border-light: #e9eef2;

    --tg-message-bg: #ffffff;

    --tg-reply-bg: #edf4fa;
    --tg-reply-accent: #2f80c9;

    --tg-scrollbar: #bdc8d2;
    --tg-scrollbar-hover: #9eabb7;

    --tg-shadow:
        0 1px 3px rgba(30, 50, 70, 0.07);
}

/* Палитра завершённых задач действует только внутри .fish_shop_completed_block. */
.fish_shop_completed_block {
    --fish-ink: #1e412f;
    --fish-muted: #577462;
    --fish-line: #cfe3d6;
    --fish-line-soft: #d9eade;
    --fish-soft: #f5faf6;
    --fish-accent: #287549;
    --fish-green: #18734d;
}

/* Цветовые роли сделок. */
:root {
    --deals-table-hover-shadow-color: rgba(0, 123, 255, 0.12);
    --deals-create-overlay: rgba(0, 0, 0, 0.5);
    --deals-create-shadow-color: rgba(0, 0, 0, .2);
    --deals-close-hover: #e00000;
    --deals-field-focus-ring: rgba(0, 123, 255, .08);
    --deals-new-status-surface: #f7f7f7;
    --deals-product-list-surface: #fafafa;
    --deals-update-surface: #eef2ff;
    --deals-update-text: #4f46e5;
    --deals-update-hover-surface: #e0e7ff;
    --deals-danger-surface: #fee2e2;
    --deals-danger-text: #dc2626;
    --deals-danger-surface-strong: #fecaca;
    --deals-submit-hover: #0069d9;
    --deals-product-shadow-color: rgba(0, 0, 0, 0.2);
    --deals-field-border: #aaa;
    --deals-remove-hover-surface: #fff1f1;
    --deals-remove-hover-border: #ff5c5c;
    --deals-info-border: #dbeafe;
    --deals-service-accent-border: #60a5fa;
    --deals-info-pale-surface: #f8fbff;
    --deals-service-heading: #1e40af;
    --deals-info-link: #2563eb;
    --deals-details-overlay: rgba(15, 23, 42, 0.55);
    --deals-details-shadow-color: rgba(0, 0, 0, 0.18);
    --deals-control-hover-surface: #e5e7eb;
    --deals-weight-border: #bbf7d0;
    --deals-weight-surface: #f0fdf4;
    --deals-weight-text: #166534;
    --deals-weight-input-border: #86efac;
    --deals-weight-focus-border: #22c55e;
    --deals-weight-focus-ring: rgba(34, 197, 94, 0.14);
    --deals-positive-action: #16a34a;
    --deals-positive-action-hover: #15803d;
    --deals-weight-value-surface: #dcfce7;
    --deals-scrollbar-thumb: #d1d5db;
    --deals-secondary-action-border: #d9dee7;
    --deals-secondary-action-hover: #f5f7fa;
    --deals-secondary-action-hover-border: #c7ced9;
    --deals-secondary-action-pressed: #eef1f5;
    --deals-secondary-action-focus: #7c8cff;
    --deals-secondary-action-focus-ring: rgba(124, 140, 255, 0.15);
    --deals-positive-focus-ring: rgba(34, 197, 94, 0.2);
    --deals-action-primary: #2563eb;
    --deals-action-primary-hover: #1d4ed8;
    --deals-primary-focus-ring: rgba(37, 99, 235, 0.2);
    --deals-product-divider: #dbe3ee;
    --deals-product-focus-ring: rgba(37, 99, 235, 0.12);
    --deals-update-button-surface: #eff6ff;
    --deals-info-link-strong: #1d4ed8;
    --deals-info-surface: #dbeafe;
    --deals-delete-button-surface: #fff1f2;
    --deals-product-overlay: rgba(15, 23, 42, 0.58);
    --deals-product-modal-border: #e2e8f0;
    --deals-product-modal-shadow-color: rgba(15, 23, 42, 0.25);
    --deals-select-surface: #f8fafc;
    --deals-select-focus-ring: rgba(37, 99, 235, 0.1);
    --deals-price-text: #0f172a;
    --deals-payment-overlay: rgba(15, 23, 42, 0.62);
    --deals-payment-modal-shadow-color: rgba(15, 23, 42, 0.3);
}

/* Цветовые роли карты. */
:root {
    --map-counter-surface: #f0f0f0;
    --map-search-border: #d9dce3;
    --map-list-border: #e2e2e2;
    --map-list-active-border: #9cc3f7;
    --map-list-active-shadow-color: rgba(0, 0, 0, 0.06);
    --map-list-hover-surface: #f8f9fb;
    --map-toggle-track: #ccc;
    --map-details-surface: #fafafa;
    --map-control-hover-surface: #eeeeee;
    --map-marker-surface: #333;
    --map-marker-border: #fff;
    --map-popup-placeholder: #f2f2f2;
    --map-confirm-action: #2f7d32;
    --map-confirm-action-hover: #256628;
    --map-overlay: rgba(0, 0, 0, 0.55);
    --map-modal-shadow-color: rgba(0, 0, 0, 0.25);
    --map-choice-border: #d9d9d9;
    --map-choice-border-hover: #cfcfcf;
    --map-choice-active: #2f6fed;
    --map-choice-shadow-color: rgba(47, 111, 237, 0.22);
    --map-field-border: #d5d5d5;
    --map-field-focus: #777777;
    --map-hint-text: #777777;
    --map-preview-border: #e0e0e0;
    --map-upload-hover: #2458c6;
    --map-error-surface: #ffe8e8;
    --map-error-text: #b42318;
    --map-secondary-border: #d0d0d0;
    --map-danger-action: #dc3545;
    --map-danger-text: #dc3545;
    --map-danger-shadow-color: rgba(220, 53, 69, 0.2);
    --map-secondary-border-hover: #999999;
    --map-choice-shadow-strong: rgba(47, 111, 237, 0.25);
    --map-choice-active-hover: #2862d5;
}

/* Цветовые роли общих компонентов и адаптивной раскладки. */
:root {
    --modal-overlay: rgba(0, 0, 0, 0.45);
    --modal-shadow-color: rgba(0, 0, 0, 0.2);
    --field-neutral-border: #d9d9d9;
    --field-neutral-text: #555555;
    --field-neutral-border-hover: #cfcfcf;
    --danger-button-surface: #dc3545;
    --danger-button-hover: #c82333;
    --danger-button-focus-ring: rgba(220, 53, 69, 0.25);
    --form-field-border: #d9dce3;
    --form-focus-shadow-color: rgba(0, 123, 255, 0.5);
    --form-field-border-muted: #aaa;
    --form-field-focus-border: #0056b3;
    --form-focus-ring: rgba(0, 123, 255, 0.25);
    --modal-overlay-strong: rgba(0, 0, 0, 0.5);
    --table-heading-surface: #f8fafc;
    --notification-shadow-color: rgba(0, 0, 0, 0.12);
    --header-shadow-color: rgba(0, 0, 0, 0.12);
    --header-mobile-shadow-color: rgba(0, 0, 0, 0.08);
    --header-mobile-text: #444;
    --header-mobile-hover-surface: #f5f7fa;
    --header-mobile-active-surface: #f0f5fb;
    --header-mobile-section-surface: #f8f9fa;
    --responsive-panel-shadow-color: rgba(0, 0, 0, .18);
    --status-info-accent: #3b82f6;
    --status-success-accent: #22c55e;
    --toolbar-translucent-surface: rgba(255, 255, 255, 0.92);
    --toolbar-shadow-color: rgba(0, 0, 0, 0.08);
}

/* Палитра меток статуса сделки. */
:root {
    --deal-status-new-background: #e0f2fe;
    --deal-status-new-color: #0369a1;
    --deal-status-confirmed-background: #dcfce7;
    --deal-status-confirmed-color: #166534;
    --deal-status-assembling-background: #fef3c7;
    --deal-status-assembling-color: #92400e;
    --deal-status-ready-background: #dbeafe;
    --deal-status-ready-color: #1d4ed8;
    --deal-status-delivering-background: #ede9fe;
    --deal-status-delivering-color: #6d28d9;
    --deal-status-completed-background: #dcfce7;
    --deal-status-completed-color: #166534;
    --deal-status-deleted-background: #fee2e2;
    --deal-status-deleted-color: #b91c1c;
}

/* Цветовые роли прайсов, пользователей и рыбного магазина. */
:root {
    --price-field-border: #d9dee7;
    --price-placeholder-text: #9ca3af;
    --price-field-hover-border: #b8c0cc;
    --price-field-focus-border: #64748b;
    --price-field-focus-ring: rgba(100, 116, 139, 0.12);
    --price-table-border: #e4e7ec;
    --price-table-shadow: rgba(16, 24, 40, 0.04);
    --price-table-shadow-soft: rgba(16, 24, 40, 0.03);
    --price-muted-text: #667085;
    --price-heading-text: #344054;
    --price-row-border: #eef0f3;
    --price-empty-text: #98a2b3;
    --price-filter-text: #475467;
    --price-filter-surface: #eef2f6;
    --price-export-surface: #111827;
    --price-export-hover-surface: #344054;
    --price-table-heading-surface: #f8fafc;
    --users-list-surface: #f7f9fc;
    --users-validation-text: red;
    --users-field-border-hover: #999;
    --users-field-focus-ring: rgba(0, 123, 255, .1);
    --users-role-admin-surface: #e8f1ff;
    --users-role-admin-text: #0066cc;
    --users-role-manager-surface: #e9f8ef;
    --users-role-manager-text: #198754;
    --users-role-warning-surface: #fff3e0;
    --users-role-warning-text: #d97706;
    --users-role-other-surface: #f0e9ff;
    --users-role-other-text: #7048b6;
    --users-role-default-surface: #f1f1f1;
    --users-danger-border: #dc3545;
    --users-danger-action: #dc3545;
    --users-danger-text: #dc3545;
    --fish-page-surface: rgb(248, 249, 250);
    --fish-field-focus-ring: rgba(107, 114, 128, 0.12);
    --fish-confirm-action: rgb(22, 163, 74);
    --fish-confirm-action-hover: rgb(21, 128, 61);
    --fish-success-surface: rgb(220, 252, 231);
    --fish-success-text: rgb(22, 101, 52);
    --fish-invalid-border: rgb(220, 38, 38);
    --fish-invalid-focus-ring: rgba(220, 38, 38, 0.1);
    --fish-panel-shadow-color: rgba(25, 73, 48, 0.043);
    --fish-scrollbar-track: rgb(245, 250, 246);
    --fish-scrollbar-thumb: rgb(173, 202, 182);
    --fish-card-divider: rgb(227, 238, 230);
    --fish-card-badge-surface: rgb(234, 245, 237);
    --fish-card-badge-text: rgb(55, 103, 73);
    --fish-completed-card-surface: rgb(252, 254, 252);
    --fish-completed-card-hover: rgb(243, 249, 245);
    --fish-completed-muted-text: rgb(76, 112, 89);
    --fish-completed-row-surface: rgb(247, 251, 248);
    --fish-completed-action-surface: rgb(231, 242, 233);
    --fish-completed-state-surface: rgb(236, 246, 239);
    --fish-completed-state-text: rgb(59, 103, 74);
    --fish-completed-shadow-color: rgba(25, 73, 48, 0.04);
}

/* Цветовые роли остальных разделов CRM. */
:root {
    --admin-hover-mix-ink: black;
    --admin-modal-overlay: rgba(0, 0, 0, 0.55);
    --admin-modal-shadow-color: rgba(0, 0, 0, 0.2);
    --admin-success-surface: #e8f6ee;
    --admin-success-text: #197347;
    --admin-success-border: #bce5cc;
    --admin-warning-surface: #fff5df;
    --admin-warning-text: #966200;
    --admin-warning-border: #f0d899;
    --admin-error-surface: #fce8e8;
    --admin-error-text: #b42318;
    --admin-error-border: #f3b6b6;
    --admin-critical-accent: #8c1d18;
    --admin-error-accent: #dc3545;
    --admin-warning-accent: #e5a100;
    --contractors-field-border: #d9dce3;
    --contractors-muted-text: #9ca3af;
    --contractors-field-focus-border: #0056b3;
    --contractors-field-focus-shadow: rgba(0, 123, 255, 0.25);
    --contractors-error-text: #dc2626;
    --contractors-success-text: #059669;
    --contractors-toggle-track: #d1d5db;
    --contractor-orders-neutral-surface: #f2f2f2;
    --contractor-orders-success-surface: #e7f7ed;
    --contractor-orders-success-text: #21864a;
    --contractor-orders-warning-surface: #fff4df;
    --contractor-orders-warning-text: #b77900;
    --contractor-orders-row-border: #d5d5d5;
    --contractor-orders-row-shadow-color: rgba(0, 0, 0, 0.06);
    --contractor-orders-card-surface: #fafafa;
    --contractor-orders-card-muted-surface: #f3f3f3;
    --contractor-orders-field-border: #dcdfe4;
    --contractor-orders-field-focus-border: #8d96a3;
    --warehouse-toggle-track: #d1d5db;
    --warehouse-toggle-shadow-color: rgba(0, 0, 0, 0.2);
    --warehouse-muted-text: #94a3b8;
    --warehouse-strong-text: #1e293b;
    --warehouse-field-border: #e2e8f0;
    --warehouse-error-text: red;
    --warehouse-select-border: #aaa;
    --warehouse-modal-overlay: rgba(0, 0, 0, 0.5);
    --tg-control-foreground: #ffffff;
    --tg-empty-surface: #edf1f5;
    --tg-empty-text: #526070;
    --tg-tab-hover-surface: rgba(255, 255, 255, 0.6);
    --tg-control-surface: #ffffff;
    --tg-tab-active-text: #287dcc;
    --tg-tab-shadow-color: rgba(0, 0, 0, 0.10);
    --auth-card-shadow-color: rgba(34, 60, 80, 0.3);
    --auth-field-focus-ring: rgba(0, 123, 255, 0.1);
    --auth-error-text: red;
    --fish-fillet-section-surface: #f8f9fa;
    --fish-tab-hover-surface: rgba(255, 255, 255, 0.6);
    --fish-tab-shadow-soft-color: rgba(0, 0, 0, 0.05);
    --fish-tab-shadow-color: rgba(0, 0, 0, 0.08);
    --up-button-surface: #111827;
    --up-button-hover-surface: #111827bd;
    --up-button-text: #ffffff;
}
