/* ============================================
   OmegaVac Premium Dark Theme Design System
   ============================================ */

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Design System Variables */
:root {
    /* Colors */
    --color-bg-primary: #0A1929;           /* Основной фон (deep dark blue) */
    --color-bg-surface: #1F4E79;            /* Фон поверхностей/карточек */
    --color-bg-surface-2: #183E62;          /* Темный фон для сайдбаров/инпутов */
    --color-accent-gold: #FFD700;           /* Акцентный золотой (для CTA) */
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #E6C200 100%);  /* Золотой градиент */
    --color-text-heading: #FFFFFF;          /* Цвет текста заголовков */
    --color-text-primary: #AAB8C5;          /* Цвет основного текста */
    --color-text-muted: #647D96;            /* Плейсхолдеры */
    
    /* Effects */
    --effect-gold-glow: 0px 0px 15px rgba(255, 215, 0, 0.5);  /* Золотое свечение */
    --shadow-card: 0px 10px 30px rgba(0, 0, 0, 0.4);         /* Тень карточек */
    
    /* Border Radius */
    --radius-button: 8px;                   /* Скругления кнопок/инпутов */
    --radius-card: 16px;                    /* Скругления карточек */
    
    /* Typography */
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 70px;
}

/* Base Styles */
body {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: var(--font-family-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-heading);
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.875rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.625rem; }
h5 { font-size: 1.125rem; margin-bottom: 0.5rem; }
h6 { font-size: 1rem; margin-bottom: 0.5rem; }

p {
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

/* Links */
a {
    color: var(--color-accent-gold);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #FFE066;
    text-shadow: var(--effect-gold-glow);
}

/* Buttons Base Styles */
button,
.btn {
    border-radius: var(--radius-button);
    font-family: var(--font-family-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Primary Button */
.btn-primary,
button[type="submit"] {
    background: var(--gradient-gold);
    color: #0A1929; /* Dark text on gold */
    box-shadow: var(--effect-gold-glow);
}

.btn-primary:hover,
button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0px 0px 20px rgba(255, 215, 0, 0.7);
    background: #FFE066;
}

/* Secondary Button */
.btn-secondary {
    background: transparent;
    border: 1px solid var(--color-accent-gold);
    color: var(--color-accent-gold);
}

.btn-secondary:hover {
    background: rgba(255, 215, 0, 0.1);
    box-shadow: var(--effect-gold-glow);
    transform: translateY(-2px);
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--color-text-primary);
    padding: 8px 16px;
}

.btn-ghost:hover {
    color: var(--color-text-heading);
    background: rgba(255, 255, 255, 0.05);
}

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="file"],
textarea,
select {
    background-color: var(--color-bg-surface-2);
    color: var(--color-text-heading);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-button);
    padding: 12px 16px;
    font-family: var(--font-family-primary);
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent-gold);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

input::placeholder,
textarea::placeholder {
    color: var(--color-text-muted);
}

/* Cards */
.card {
    background-color: var(--color-bg-surface);
    border-radius: var(--radius-card);
    padding: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Glass effect top border */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Status Chips */
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
}

.chip-success {
    background: rgba(46, 204, 113, 0.15);
    color: #2ECC71;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.chip-warning {
    background: rgba(255, 159, 28, 0.15);
    color: #FF9F1C;
    border: 1px solid rgba(255, 159, 28, 0.2);
}

.chip-error {
    background: rgba(231, 76, 60, 0.15);
    color: #E74C3C;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.chip-neutral {
    background: rgba(170, 184, 197, 0.15);
    color: #AAB8C5;
    border: 1px solid rgba(170, 184, 197, 0.2);
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

th {
    padding: 16px 24px;
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

td {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--color-text-heading);
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

/* Fix for dark text - ensure all text is readable */
a[href^="mailto:"],
a[href^="tel:"],
.vacancy-id,
.job-id,
.candidate-id,
.email-text,
.phone-text,
.telegram-text,
.meta-text,
.hint-text,
.help-text,
small,
.text-muted,
.text-secondary {
    color: var(--color-text-primary) !important;
    opacity: 0.95 !important;
}

/* Strong emphasis for important info */
strong,
b,
.label-text,
.info-label {
    color: var(--color-text-heading) !important;
    opacity: 1 !important;
}

tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Layout Components */
/* Sidebar */
.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--color-bg-surface-2);
    z-index: 100;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
}

.sidebar-logo img {
    height: 32px;
    width: auto;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--color-text-primary);
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    gap: 12px;
}

.nav-item:hover {
    color: var(--color-text-heading);
    background-color: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    color: var(--color-text-heading);
    background-color: rgba(255, 215, 0, 0.05);
    border-left-color: var(--color-accent-gold);
}

.nav-item.active i {
    color: var(--color-accent-gold);
    text-shadow: var(--effect-gold-glow);
}

/* Header */
.app-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background-color: var(--color-bg-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    backdrop-filter: blur(10px);
    background-color: rgba(10, 25, 41, 0.95);
}

.header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.header-search input {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 99px;
    padding-left: 40px;
}

.header-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-primary);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.action-btn:hover {
    color: var(--color-text-heading);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-text-primary);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background-color: #E74C3C;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-bg-primary);
}

/* App Main Content */
.app-main {
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
    padding: calc(var(--header-height) + 32px) 32px 32px;
    min-height: 100vh;
}

/* Utilities */
.text-gold { color: var(--color-accent-gold); }
.text-heading { color: var(--color-text-heading); }
.text-primary { color: var(--color-text-primary); }
.text-muted { color: var(--color-text-muted); }
.bg-surface { background-color: var(--color-bg-surface); }
.glow-gold { box-shadow: var(--effect-gold-glow); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg-primary); }
::-webkit-scrollbar-thumb { background: var(--color-bg-surface-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent-gold); }

/* Mobile & Responsive */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 80px; /* Collapsed sidebar */
    }
    
    .sidebar-logo span { display: none; }
    .nav-item span { display: none; }
    .nav-item { justify-content: center; padding: 12px; }
    .sidebar-header { padding: 0; justify-content: center; }
}

@media (max-width: 768px) {
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 260px; /* Full width when open */
    }
    
    .app-sidebar.open {
        transform: translateX(0);
    }
    
    .app-header {
        left: 0;
        padding: 0 16px;
    }
    
    .app-main {
        margin-left: 0;
        padding: calc(var(--header-height) + 20px) 16px 20px;
    }
    
    .sidebar-logo span { display: block; }
    .nav-item span { display: block; }
    .nav-item { justify-content: flex-start; padding: 12px 24px; }
}
