/* АРИИ — Основные стили v2 */

:root {
    --primary: #1B3A5C;
    --primary-light: #2A5A8C;
    --primary-dark: #0F2440;
    --accent: #3B82F6;
    --accent-hover: #2563EB;
    --accent-light: #EBF2FF;
    --text: #1F2937;
    --text-light: #6B7280;
    --bg: #FFFFFF;
    --bg-alt: #F8F9FB;
    --bg-dark: #0C1929;
    --border: #E5E7EB;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --radius: 8px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
    --transition: 0.25s ease;
    --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }

/* ====== HEADER ====== */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.92);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo img { height: 42px; display: block; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.main-nav a {
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.main-nav a:hover,
.main-nav a.active { color: var(--primary); background: var(--bg-alt); }

.nav-btn {
    background: var(--primary) !important;
    color: #fff !important;
    padding: 8px 22px !important;
    border-radius: var(--radius) !important;
    font-weight: 600 !important;
    margin-left: 8px;
}
.nav-btn:hover { background: var(--primary-light) !important; }
.nav-btn--admin {
    background: transparent !important;
    color: var(--primary) !important;
    border: 1.5px solid var(--primary) !important;
}
.nav-btn--admin:hover { background: var(--primary) !important; color: #fff !important; }

/* Mobile menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}
.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* ====== HERO ====== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 40%, var(--primary-light) 100%);
    color: #fff;
    padding: 96px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}
.hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.85;
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ====== BUTTONS ====== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}
.btn svg { flex-shrink: 0; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-sm { padding: 6px 16px; font-size: 13px; }

.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(59,130,246,0.3); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 4px 16px rgba(59,130,246,0.35); transform: translateY(-1px); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.4); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.8); }
.btn-secondary { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #fff; border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #DC2626; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }

/* ====== SECTIONS ====== */
.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }
.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 52px;
    color: var(--primary-dark);
    letter-spacing: -0.01em;
}

/* ====== CARDS ====== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    transition: all var(--transition);
    position: relative;
}
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: transparent;
}
.card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--accent-light);
    color: var(--accent);
    margin-bottom: 20px;
}
.card h3 { font-size: 1.125rem; margin-bottom: 10px; color: var(--primary-dark); font-weight: 600; }
.card p { color: var(--text-light); font-size: 0.9375rem; line-height: 1.65; }

/* ====== DIRECTION BLOCKS ====== */
.direction-block {
    display: flex;
    gap: 24px;
    margin-bottom: 48px;
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.direction-block:hover {
    box-shadow: var(--shadow-md);
    border-color: transparent;
}
.direction-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--accent-light);
    color: var(--accent);
}
.direction-body h2 {
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
    font-weight: 600;
}
.direction-body p {
    line-height: 1.8;
    color: var(--text-light);
}

/* ====== BENEFITS ====== */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.benefit {
    padding: 28px;
    border-left: 3px solid var(--accent);
    background: var(--bg);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}
.benefit:hover { box-shadow: var(--shadow-md); transform: translateX(4px); }
.benefit strong { display: block; margin-bottom: 10px; color: var(--primary-dark); font-size: 1rem; }
.benefit p { color: var(--text-light); font-size: 0.875rem; line-height: 1.65; }

/* ====== CTA ====== */
.cta-block {
    text-align: center;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 72px 48px;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}
.cta-block::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59,130,246,0.2) 0%, transparent 70%);
    border-radius: 50%;
}
.cta-block h2 { font-size: 1.75rem; margin-bottom: 14px; position: relative; }
.cta-block p { opacity: 0.85; margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto; position: relative; }
.cta-block .btn { position: relative; }

/* ====== FORMS ====== */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}
.form-control {
    width: 100%;
    padding: 11px 14px;
    font-size: 15px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    transition: all var(--transition);
    font-family: inherit;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.1);
}
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* ====== ALERTS ====== */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}
.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.alert-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

/* ====== PAGE HEADER ====== */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 56px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.page-header h1 { font-size: 2.25rem; margin-bottom: 10px; position: relative; font-weight: 700; }
.page-header p { opacity: 0.8; font-size: 1.0625rem; position: relative; }

/* ====== AUTH PAGES ====== */
.auth-page {
    min-height: calc(100vh - 72px - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--bg-alt);
}
.auth-box {
    width: 100%;
    max-width: 420px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 44px 40px;
    box-shadow: var(--shadow-lg);
}
.auth-box h1 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 8px;
    color: var(--primary-dark);
}
.auth-box .subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 28px;
}
.auth-box .btn { width: 100%; }
.auth-links { text-align: center; margin-top: 20px; font-size: 14px; }

/* ====== TABLE ====== */
.table-wrap { overflow-x: auto; }
table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table th, .data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.data-table th {
    background: var(--bg-alt);
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.data-table tr:hover { background: var(--bg-alt); }

/* ====== BADGES ====== */
.badge {
    display: inline-flex;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
}
.badge-success { background: #ECFDF5; color: #065F46; }
.badge-warning { background: #FFFBEB; color: #92400E; }
.badge-error { background: #FEF2F2; color: #991B1B; }
.badge-info { background: #EFF6FF; color: #1E40AF; }
.badge-gray { background: var(--bg-alt); color: var(--text-light); }

/* ====== ADMIN / CABINET LAYOUT ====== */
.dashboard { display: flex; min-height: calc(100vh - 72px); }
.sidebar {
    width: 260px;
    background: var(--bg-dark);
    color: #fff;
    padding: 28px 0;
    flex-shrink: 0;
}
.sidebar-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.4;
    padding: 0 24px;
    margin-bottom: 10px;
    font-weight: 600;
}
.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}
.sidebar a:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}
.sidebar a.active {
    color: #fff;
    background: rgba(59,130,246,0.15);
    border-left-color: var(--accent);
}
.sidebar a svg { opacity: 0.7; }
.sidebar a.active svg, .sidebar a:hover svg { opacity: 1; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 20px 0; }

.dashboard-content {
    flex: 1;
    padding: 36px;
    background: var(--bg-alt);
    overflow-y: auto;
}
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}
.dashboard-header h1 { font-size: 1.5rem; color: var(--primary-dark); font-weight: 700; }

.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card .label { font-size: 13px; color: var(--text-light); margin-bottom: 10px; font-weight: 500; }
.stat-card .value { font-size: 2rem; font-weight: 700; color: var(--primary-dark); }

.content-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}
.content-card h2 {
    font-size: 1.125rem;
    margin-bottom: 18px;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}
.content-card h2 svg { color: var(--accent); }

/* ====== FOOTER ====== */
.site-footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.65);
    padding: 56px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}
.footer-brand { display: inline-block; margin-bottom: 16px; }
.footer-logo {
    height: 36px;
    max-width: 160px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}
.footer-col h4 {
    color: #fff;
    font-size: 13px;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}
.footer-col a {
    display: block;
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    padding: 5px 0;
    transition: color var(--transition);
}
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 14px; line-height: 1.7; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
    .cards-grid, .benefits-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 12px 16px; }
    .nav-btn { margin-left: 0 !important; text-align: center; }

    .hero { padding: 56px 0; }
    .hero h1 { font-size: 1.85rem; }
    .hero-subtitle { font-size: 1rem; }

    .section { padding: 56px 0; }
    .section-title { font-size: 1.5rem; margin-bottom: 36px; }

    .cards-grid, .benefits-grid { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }

    .direction-block { flex-direction: column; gap: 16px; }

    .dashboard { flex-direction: column; }
    .sidebar { width: 100%; }
    .dashboard-content { padding: 20px; }

    .auth-box { padding: 28px 20px; }

    .cta-block { padding: 48px 24px; }
}
