/**
 * Единый стиль для всех страниц приложения
 * Шрифты и дизайн как в теме JNews
 */

/* Подключаем Google Fonts - Inter (как в JNews) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Основные цвета */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-bg: #eef2ff;
    --success: #059669;
    --success-hover: #047857;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Оттенки серого */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Размеры и отступы */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    
    /* Тени */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.3;
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; }
h6 { font-size: 12px; }

/* Ссылки */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s;
}
a:hover {
    color: var(--primary-hover);
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}
.btn-secondary:hover {
    background: var(--gray-50);
}

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    background: var(--success-hover);
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 16px;
}

/* Иконки в кнопках */
.btn .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-sm .icon {
    width: 16px;
    height: 16px;
}

/* Карточки */
.card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.card-body {
    padding: 16px;
}

/* Формы */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
    font-family: inherit;
    font-size: 14px;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: white;
    color: var(--gray-700);
    transition: all 0.15s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

thead {
    background: var(--gray-50);
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody tr:hover {
    background: var(--gray-50);
}

/* Статусы */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #d1fae5;
    color: #059669;
}

.badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

.badge-warning {
    background: #fef3c7;
    color: #d97706;
}

.badge-info {
    background: #dbeafe;
    color: #2563eb;
}

.badge-primary {
    background: var(--primary-bg);
    color: var(--primary);
}

/* Уведомления */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    text-decoration: none;
}

.logo:hover {
    color: var(--primary);
}

/* Навигация */
.nav {
    display: flex;
    gap: 4px;
}

.nav a {
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    transition: all 0.15s;
}

.nav a:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.nav a.active {
    background: var(--primary);
    color: white;
}

/* Адаптивность */
@media (max-width: 768px) {
    body {
        font-size: 13px;
    }
    
    h1 { font-size: 20px; }
    h2 { font-size: 18px; }
    h3 { font-size: 16px; }
    
    .container {
        padding: 12px;
    }
    
    .header-inner {
        padding: 0 12px;
    }
    
    .btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}
