/**
 * ITImports CRM — Морская тема для главной и входа
 * Порт, море, корабли
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
    --sea-deep: #0f172a;
    --sea-mid: #0e4c6b;
    --sea-light: #0e7490;
    --foam: #e0f2fe;
    --sand: #fef9e7;
    --brass: #b45309;
    --brass-light: #d97706;
    --white: #f8fafc;
    --navy-text: #0c4a6e;
}

/* ---- Общие ---- */
body.landing-page,
body.login-page {
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

/* Бейдж разработчика на публичных страницах (логин/лендинг) */
.dev-badge {
    position: fixed;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 40;
    font-size: 0.75rem;
    color: rgba(248, 250, 252, 0.8);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.dev-badge img {
    height: 18px;
    width: auto;
    opacity: 0.95;
}

.dev-badge a {
    color: inherit;
    text-decoration: none;
    opacity: 0.9;
}

.dev-badge a:hover {
    opacity: 1;
    text-decoration: underline;
}

.landing-page h1,
.landing-page .display-4,
.login-page .login-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
}

/* ---- Главная: фон моря и неба ---- */
.landing-page {
    background: var(--sea-deep);
    color: var(--white);
    position: relative;
}

.landing-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        linear-gradient(180deg, 
            rgba(14, 78, 107, 0.4) 0%, 
            transparent 25%,
            transparent 60%,
            rgba(14, 116, 144, 0.3) 100%),
        linear-gradient(135deg, #0f172a 0%, #0e4c6b 50%, #0c4a6e 100%);
    z-index: 0;
    pointer-events: none;
}

/* Волны внизу страницы */
.landing-waves {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}

.landing-waves svg {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
}

/* Навбар главной */
.landing-nav {
    position: relative;
    z-index: 10;
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(224, 242, 254, 0.08);
}

.landing-nav .navbar-brand {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--white) !important;
}

.landing-nav .navbar-brand i {
    color: var(--foam);
    opacity: 0.9;
}

/* Герой-блок */
.landing-hero {
    position: relative;
    z-index: 5;
    padding: 5rem 0 6rem;
    text-align: center;
}

.landing-hero .lead {
    font-size: 1.2rem;
    color: var(--foam);
    opacity: 0.95;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.landing-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: 0.02em;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.landing-hero .anchor-icon {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--foam);
    opacity: 0.8;
    font-size: 2.5rem;
}

/* Кнопки главной */
.landing-hero .btn-register {
    background: linear-gradient(135deg, var(--brass-light), var(--brass));
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.85rem 2rem;
    border-radius: 9999px;
    box-shadow: 0 4px 20px rgba(180, 83, 9, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.landing-hero .btn-register:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(180, 83, 9, 0.5);
}

.landing-hero .btn-login {
    background: transparent;
    border: 2px solid rgba(224, 242, 254, 0.6);
    color: var(--foam);
    font-weight: 600;
    padding: 0.85rem 2rem;
    border-radius: 9999px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.landing-hero .btn-login:hover {
    background: rgba(224, 242, 254, 0.12);
    border-color: var(--foam);
    color: #fff;
}

/* Декоративные элементы — компас/сетка */
.landing-hero .compass-dot {
    width: 8px;
    height: 8px;
    background: var(--brass);
    border-radius: 50%;
    margin: 0 auto 0.5rem;
    opacity: 0.8;
}

/* ---- Страница входа ---- */
.login-page {
    background: linear-gradient(160deg, #0f172a 0%, #0e4c6b 40%, #0e7490 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    position: relative;
}

.login-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(224, 242, 254, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(14, 116, 144, 0.2), transparent);
    z-index: 0;
    pointer-events: none;
}

/* Фон Владивосток / порт — фото гавани с затемнением */
.login-page--vladivostok {
    background: linear-gradient(160deg, #0f172a 0%, #0e4c6b 40%, #0e7490 100%);
}

.login-page--vladivostok::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1566576721346-d4a3b4eaeb55?w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
}

.login-page--vladivostok::before {
    background: 
        linear-gradient(180deg, rgba(15, 23, 42, 0.82) 0%, rgba(14, 78, 107, 0.72) 50%, rgba(12, 74, 110, 0.88) 100%),
        radial-gradient(ellipse 80% 60% at 50% 50%, transparent 0%, rgba(15, 23, 42, 0.5) 100%);
    z-index: 1;
}

/* Боковое описание на странице логина — без отдельной «карточки» */
.login-side-info {
    position: relative;
    z-index: 2;
    color: rgba(248, 250, 252, 0.96);
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.8);
}

.login-side-info h3 {
    color: #f9fafb;
    font-weight: 600;
}

.login-side-info p,
.login-side-info li {
    color: rgba(226, 232, 240, 0.96);
}

/* Плоский светлый фон (для reset/forgot) */
.login-page--plain {
    background: #f8f9fa;
}

.login-page--plain::before,
.login-page--plain::after {
    display: none;
}

.login-topbar {
    z-index: 10;
}

.login-register-btn {
    background: rgba(254, 249, 231, 0.25);
    color: #fef9e7;
    border: 1px solid rgba(254, 249, 231, 0.5);
}

.login-register-btn:hover {
    color: #fff;
    background: rgba(254, 249, 231, 0.35);
}

.login-ship-icon {
    font-size: 2rem;
    color: var(--sea-light);
}

.login-wrap {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 420px;
    margin-top: 4rem;
}

@media (min-width: 768px) {
    .login-wrap { margin-top: 0; }
}

.login-card {
    background: rgba(248, 250, 252, 0.97);
    backdrop-filter: blur(20px);
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(14, 78, 107, 0.05);
    overflow: hidden;
}

.login-card .card-body {
    padding: 2.5rem 2rem;
}

.login-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.75rem;
    color: var(--sea-deep);
    margin-bottom: 0.25rem;
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--sea-mid);
    margin-bottom: 1.75rem;
}

.login-card .form-control {
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.login-card .form-control:focus {
    border-color: var(--sea-light);
    box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.15);
}

.login-card .form-label {
    font-weight: 600;
    color: var(--navy-text);
}

.login-card .btn-submit {
    background: linear-gradient(135deg, var(--sea-light), var(--sea-mid));
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-card .btn-submit:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(14, 78, 107, 0.35);
}

.login-card .alert {
    border-radius: 0.75rem;
}

.login-links {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.login-links a {
    color: var(--sea-mid);
    font-weight: 500;
    text-decoration: none;
}

.login-links a:hover {
    color: var(--sea-light);
    text-decoration: underline;
}

/* Ссылка на публичную оферту — правый нижний угол экрана (на страницах входа/регистрации) */
body.login-page .offer-link {
    position: fixed;
    right: 0.75rem;
    bottom: 2.4rem;
    z-index: 30;
    text-align: right;
}

body.login-page .offer-link a {
    font-size: 0.8125rem;
    color: var(--foam);
    text-decoration: none;
    opacity: 0.85;
    transition: color 0.2s, opacity 0.2s;
}

body.login-page .offer-link a:hover {
    color: #fff;
    opacity: 1;
}

/* Верхняя полоска — как палуба */
.login-card .card-header-strip {
    height: 4px;
    background: linear-gradient(90deg, var(--sea-light), var(--brass));
    margin: 0;
}

/* Универсальная карточка для reset/forgot */
.auth-card {
    max-width: 420px;
    margin: 0 auto;
}

.auth-card .card-header-strip {
    height: 4px;
    background: linear-gradient(90deg, var(--sea-light), var(--brass));
}

/* Кнопка «Назад» на странице входа */
.login-page .back-home {
    color: var(--foam);
    text-decoration: none;
    font-weight: 500;
    opacity: 0.95;
}

.login-page .back-home:hover {
    color: #fff;
}

/* Переключатель языка на тёмном фоне */
.login-page .lang-wrap .btn {
    border-radius: 9999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
}
