/* ============================================
   Основной stylesheet - Антон Кондиционер
   ============================================ */

/* --- Сброс и базовые стили --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary-color: #0ea5e9;
    --accent-color: #f59e0b;
    
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray: #f1f5f9;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--bg-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Хедер сайта --- */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 18px;
}

.logo-icon {
    font-size: 28px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
    background: var(--primary-light);
}

.user-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.logout-link {
    font-size: 12px;
    color: var(--danger-color) !important;
    background: transparent !important;
}

.auth-links {
    display: flex;
    gap: 10px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* --- Hero секция --- */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

/* --- Features секция --- */
.features-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 35px 30px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* --- Services preview --- */
.services-preview {
    padding: 80px 0;
}

.service-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.service-mini-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px;
    transition: all 0.3s ease;
}

.service-mini-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.service-mini-card h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.service-mini-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.price-tag {
    display: inline-block;
    background: var(--bg-light);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-weight: 600;
    color: var(--success-color);
    font-size: 14px;
}

/* --- CTA секция --- */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 70px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: clamp(24px, 4vw, 36px);
    margin-bottom: 15px;
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-small {
    padding: 50px 0;
}

/* --- Страница услуг --- */
.page-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(28px, 4vw, 40px);
    margin-bottom: 10px;
}

.page-header p {
    opacity: 0.8;
}

.services-page-section {
    padding: 60px 0;
    min-height: 50vh;
}

.full-services-grid {
    display: grid;
    gap: 25px;
}

.service-full-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    display: flex;
    gap: 25px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.service-full-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.service-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}

.service-content {
    flex: 1;
}

.service-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.service-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.service-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--success-color);
}

.refrigerant-note {
    margin-top: 40px;
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: var(--radius-md);
    padding: 25px;
}

.refrigerant-note h3 {
    margin-bottom: 15px;
    color: #92400e;
}

.refrigerant-note ul {
    list-style-position: inside;
    color: #78350f;
    margin-left: 10px;
}

.refrigerant-note li {
    margin-bottom: 8px;
}

/* --- Форма заказа --- */
.order-section {
    padding: 60px 0;
    min-height: 60vh;
}

.order-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 20px;
    margin-bottom: 25px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-checkboxes {
    display: grid;
    gap: 15px;
}

.service-checkbox-label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.service-checkbox-label:hover,
.service-checkbox-label input:checked + .checkbox-custom ~ .service-info {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.service-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid var(--text-muted);
    border-radius: 5px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}

.service-checkbox-label input:checked + .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.service-checkbox-label input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
}

.service-info {
    flex: 1;
}

.service-desc {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.service-cost {
    font-weight: 600;
    color: var(--success-color);
    white-space: nowrap;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.error-message {
    display: none;
    color: var(--danger-color);
    font-size: 13px;
    margin-top: 5px;
}

/* --- Калькулятор хладагента в форме --- */
.refrigerant-calculator {
    background: linear-gradient(to right, #eff6ff, #f0fdf4);
    border-radius: var(--radius-md);
    padding: 20px;
}

.calc-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

.calc-result {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.result-line, .result-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.result-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--success-color);
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
    padding-top: 15px;
}

.submit-section {
    text-align: center;
    padding: 20px 0;
}

.privacy-note {
    margin-top: 15px;
    font-size: 13px;
    color: var(--text-muted);
}

/* --- Auth секция (вход/регистрация) --- */
.auth-section {
    padding: 60px 0;
    background: var(--bg-light);
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.auth-container {
    max-width: 450px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer a {
    color: var(--primary-color);
}

.password-input-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.6;
}

/* --- Dashboard клиента --- */
.dashboard-section {
    padding: 40px 0;
    min-height: 60vh;
}

.user-info-card {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-bottom: 30px;
}

.info-grid {
    display: grid;
    gap: 15px;
}

.info-item {
    display: flex;
    gap: 10px;
}

.info-label {
    font-weight: 600;
    min-width: 150px;
    color: var(--text-secondary);
}

.orders-history h2 {
    margin-bottom: 20px;
}

.order-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.order-card:hover {
    box-shadow: var(--shadow-md);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.order-number {
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.order-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 14px;
}

.detail-row.total-row {
    font-weight: 700;
    color: var(--success-color);
    border-bottom: none;
}

.empty-orders {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: var(--radius-lg);
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.badge-new {
    background: #dbeafe;
    color: #1e40af;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-progress, .badge-in_progress {
    background: #d1fae5;
    color: #065f46;
}

.badge-completed {
    background: #dcfce7;
    color: #166534;
}

.badge-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* --- Контакты --- */
.contacts-section {
    padding: 60px 0;
    min-height: 60vh;
}

.contacts-grid {
    display: grid;
    gap: 30px;
}

.contact-card h2 {
    margin-bottom: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    transition: all 0.2s ease;
    text-decoration: none !important;
    color: inherit !important;
}

.contact-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.contact-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-light), #bfdbfe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.contact-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.contact-value {
    font-weight: 500;
}

.quick-contact-form {
    max-width: 400px;
    margin-top: 20px;
}

/* --- Footer --- */
.site-footer {
    background: #1e293b;
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 30px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    opacity: 0.7;
}

/* --- Кнопки --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 15px;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-gray);
}

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

.btn-white:hover {
    background: #f8fafc;
}

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

.btn-block {
    width: 100%;
    display: block;
}

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

.text-right {
    text-align: right;
}

.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* --- Alert'ы (уведомления) --- */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.view-all-link {
    float: right;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.section-header-with-link {
    overflow: hidden;
}

/* ============================================
   ПАНЕЛЬ УПРАВЛЕНИЯ - СТИЛИ
   ============================================ */

body.admin-page {
    flex-direction: row;
}

/* Sidebar */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-icon {
    font-size: 24px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li a {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--primary-color);
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 15px 20px;
}

.bottom-nav {
    margin-top: auto !important;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    opacity: 0.7;
}

/* Main admin content */
.admin-main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    background: var(--bg-light);
}

.admin-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
}

.content-wide {
    max-width: 1400px;
}

.page-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.welcome-banner h2 {
    font-size: 28px;
    margin-bottom: 5px;
}

.welcome-banner p {
    color: var(--text-secondary);
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 36px;
    opacity: 0.9;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.stat-primary .stat-value { color: var(--primary-color); }
.stat-warning .stat-value { color: var(--warning-color); }
.stat-success .stat-value { color: var(--success-color); }
.stat-danger .stat-value { color: var(--danger-color); }

/* Quick actions */
.quick-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.recent-orders-section h3 {
    margin-bottom: 20px;
}

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table thead {
    background: var(--bg-gray);
}

.admin-table th {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.admin-table tbody tr:hover {
    background: #f8fafc;
}

.orders-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.amount-cell {
    font-weight: 600;
    color: var(--success-color) !important;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
    font-size: 13px;
}

.text-sm {
    font-size: 13px;
}

/* Pagination */
.pagination-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.pagination-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.current-page {
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-select, .search-input {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Order detail page */
.order-header-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.order-date {
    color: var(--text-secondary);
    font-size: 14px;
}

.status-update-form-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.detail-section h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-shadow {
    background: white;
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.detail-table {
    width: 100%;
}

.detail-table td {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

.label-cell {
    font-weight: 600;
    color: var(--text-secondary) !important;
    width: 180px;
}

.comment-box {
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
}

.customer-comment {
    background: #f8fafc;
    border-left: 4px solid var(--info-color);
}

.calc-form-group label {
    font-size: 13px;
    color: var(--text-secondary);
}

.calc-form-group input {
    max-width: 200px;
}

.calc-result-admin {
    background: linear-gradient(to right, #eff6ff, #ecfdf5);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-top: 20px;
}

.admin-total {
    font-size: 20px;
    font-weight: 700;
    color: var(--success-color);
    border-top: 2px solid var(--border-color);
    margin-top: 10px;
    padding-top: 15px;
}

.role-select {
    padding: 6px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.role-admin {
    background: #fef3c7;
    color: #92400e;
}

.role-employee {
    background: #dbeafe;
    color: #1e40af;
}

.role-customer {
    background: #f3f4f6;
    color: #374151;
}

/* Mobile responsive */
@media (max-width: 1024px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    body.admin-page {
        flex-direction: column;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .mobile-sidebar-toggle {
        display: block !important;
    }
}

.mobile-sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 101;
    width: 44px;
    height: 44px;
    background: white;
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    font-size: 20px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        padding: 15px;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .auth-links, .user-menu {
        width: 100%;
        justify-content: center;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero {
        padding: 60px 0 40px;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .order-header-card {
        flex-direction: column;
        text-align: center;
    }
    
    .admin-content {
        padding: 15px;
    }
    
    .mt-4 { margin-top: 1rem !important; }
}

/* Utility classes */
.text-center { text-align: center; }
.mt-3 { margin-top: 1.5rem; }

/* ============================================
   Дополнительные стили для улучшенного контента
   ============================================ */

/* Hero фоновая декорация */
.hero-bg-decoration { z-index: 0 !important; position: absolute !important; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-content { position: relative; z-index: 1; }

/* SVG иконки карточек преимуществ */
.feature-icon-svg {
    width: 64px !important;
    height: 64px !important;
    display: block;
    margin-bottom: 16px;
}

/* Секция "Как мы работаем" */
.how-we-work-section, .brands-section { padding: 60px 0; background: var(--bg-light); }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.step-card {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.step-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    opacity: 0.3;
    margin-bottom: 8px;
    line-height: 1;
}

/* Сетка брендов */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.brand-item {
    text-align: center;
    padding: 24px 16px;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.brand-item:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* CTA кнопки */
.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* Блок хладагента инфо */
.refrigerant-info-section svg { max-width: 100%; height: auto; }

/* FAQ секция */
.faq-grid { max-width: 800px; margin: 40px auto 0; display: grid; gap: 20px; }

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::marker { content: ""; }

.faq-arrow { transition: transform 0.2s ease !important; }

details[open] .faq-arrow { transform: rotate(180deg) !important; }

/* Карточки гарантий */
.guarantees-section { padding: 60px 0; background: var(--bg-light); }

.guarantee-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-top: 3px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.guarantee-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    
    .steps-grid { grid-template-columns: 1fr; }
    
    .brands-grid { grid-template-columns: repeat(2, 1fr); }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn { width: 100%; max-width: 300px; }
    
    .contacts-grid { grid-template-columns: 1fr !important; }
    
    .guarantees-section .container > div {
        grid-template-columns: 1fr !important;
    }
    
    /* Улучшение видимости на маленьких экранах */
    .feature-icon-svg { width: 48px !important; height: 48px !important; }
    
    .step-number { font-size: 1.5rem; }
}

/* Стили для SVG иконок в карточках услуг */
.service-mini-card svg {
    float: left;
    margin-right: 12px;
    margin-bottom: 8px;
}

/* Плавная анимация появления элементов */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.feature-card, .step-card, .brand-item, .guarantee-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.feature-card:nth-child(1), .step-card:nth-child(1), .brand-item:nth-child(1), .guarantee-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2), .step-card:nth-child(2), .brand-item:nth-child(2), .guarantee-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3), .step-card:nth-child(3), .brand-item:nth-child(3), .guarantee-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4), .step-card:nth-child(4), .brand-item:nth-child(4), .guarantee-card:nth-child(4) { animation-delay: 0.4s; }
