/* ============================================================
   HotelBooking — базовые стили
   ============================================================ */

:root {
    /* Цвета */
    --color-primary: #1e6bff;
    --color-primary-dark: #1550cc;
    --color-primary-light: #e8f0ff;
    --color-accent: #ff6b35;
    --color-dark: #1a1d24;
    --color-text: #2b2f38;
    --color-muted: #6b7280;
    --color-light: #f5f7fb;
    --color-border: #e5e9f2;
    --color-white: #ffffff;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;

    /* Размеры */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;

    --shadow-sm: 0 1px 3px rgba(26, 29, 36, .06);
    --shadow-md: 0 4px 16px rgba(26, 29, 36, .08);
    --shadow-lg: 0 12px 40px rgba(26, 29, 36, .12);

    --container: 1200px;
    --header-h: 72px;

    --transition: .2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--color-dark); }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

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

/* ============================================================
   ГЛОБАЛЬНЫЙ ЛОАДЕР
   ============================================================ */
.global-loader {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}
.global-loader.visible { display: flex; }

.loader-spinner {
    width: 48px; height: 48px;
    border: 4px solid var(--color-primary-light);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-h);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-dark);
}

.logo-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--color-primary), #4d8bff);
    color: var(--color-white);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}

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

.main-nav {
    display: flex;
    gap: 28px;
    margin-left: 40px;
    margin-right: auto;
}

.nav-link {
    font-weight: 500;
    color: var(--color-muted);
    position: relative;
    padding: 6px 0;
    transition: color var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--color-dark); }
.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 12px; }
.guest-actions { display: flex; gap: 10px; }

.icon-btn {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text);
    transition: background var(--transition);
}
.icon-btn:hover { background: var(--color-light); }

.user-dropdown { position: relative; }
.user-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    padding: 8px;
    display: none;
    animation: dropIn .15s ease;
}
.dropdown-menu.open { display: block; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.dropdown-header {
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 6px;
}
.dropdown-header strong { display: block; font-size: .9rem; }
.dropdown-header small { color: var(--color-muted); font-size: .8rem; }

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    color: var(--color-text);
    transition: background var(--transition);
}
.dropdown-menu a:hover { background: var(--color-light); }
.dropdown-menu a i { width: 16px; color: var(--color-muted); }
.dropdown-menu hr { border: none; border-top: 1px solid var(--color-border); margin: 6px 0; }

/* ============================================================
   APP CONTAINER
   ============================================================ */
.app-container {
    flex: 1;
    min-height: calc(100vh - var(--header-h) - 300px);
    animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--color-dark);
    color: #c5cad3;
    margin-top: 80px;
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 48px;
    padding-bottom: 48px;
}

.site-footer .logo { color: var(--color-white); margin-bottom: 16px; }
.site-footer h4 { color: var(--color-white); font-size: .95rem; margin-bottom: 16px; }
.site-footer a { color: #c5cad3; display: block; padding: 5px 0; font-size: .9rem; transition: color var(--transition); }
.site-footer a:hover { color: var(--color-white); }
.footer-desc { font-size: .9rem; max-width: 320px; }

.site-footer p { font-size: .9rem; margin-bottom: 8px; }
.site-footer p i { width: 18px; color: var(--color-primary); margin-right: 6px; }

.socials { display: flex; gap: 12px; margin-top: 12px; }
.socials a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    display: flex; align-items: center; justify-content: center;
    padding: 0;
}
.socials a:hover { background: var(--color-primary); color: var(--color-white); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 20px 0;
    text-align: center;
    font-size: .85rem;
    color: #8b92a0;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
    position: fixed;
    bottom: 24px; right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}
.toast {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .9rem;
    transform: translateX(120%);
    transition: transform .3s cubic-bezier(.2,.9,.3,1.2);
    min-width: 260px;
    max-width: 380px;
    border-left: 4px solid var(--color-primary);
}
.toast.show { transform: translateX(0); }
.toast-success { border-color: var(--color-success); }
.toast-success i { color: var(--color-success); }
.toast-error { border-color: var(--color-danger); }
.toast-error i { color: var(--color-danger); }
.toast-info i { color: var(--color-primary); }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 900px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .main-nav { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .footer-grid { grid-template-columns: 1fr; }
    .header-actions .guest-actions .btn-ghost { display: none; }
}
/* ============================================================
   FIX: user-actions должен быть flex-контейнером
   ============================================================ */
.user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { flex-shrink: 0; }
.user-avatar { flex-shrink: 0; }
.user-dropdown { flex-shrink: 0; }