@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    --h2o-ink: #092033;
    --h2o-muted: #647a8f;
    --h2o-soft: #eef7fb;
    --h2o-panel: rgba(255, 255, 255, 0.84);
    --h2o-panel-strong: #ffffff;
    --h2o-border: rgba(24, 88, 112, 0.13);
    --h2o-primary: #0f7b8c;
    --h2o-primary-strong: #075d70;
    --h2o-blue: #2563eb;
    --h2o-aqua: #2dd4bf;
    --h2o-sun: #f59e0b;
    --h2o-danger: #e5484d;
    --h2o-shadow: 0 22px 55px rgba(7, 39, 60, 0.12);
    --h2o-shadow-soft: 0 12px 28px rgba(7, 39, 60, 0.08);
    --h2o-radius-lg: 28px;
    --h2o-radius-md: 18px;
}

html {
    scroll-behavior: smooth;
}

::selection {
    color: #ffffff;
    background: var(--h2o-primary);
}

body.admin-shell,
body.client-shell {
    min-height: 100vh;
    color: var(--h2o-ink);
    font-family: 'Manrope', sans-serif;
    background:
        radial-gradient(circle at 8% 6%, rgba(45, 212, 191, 0.18), transparent 30%),
        radial-gradient(circle at 92% 3%, rgba(37, 99, 235, 0.15), transparent 28%),
        linear-gradient(135deg, #f7fcff 0%, #eef7fb 46%, #f8fbf2 100%);
}

body.admin-shell::before,
body.client-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(9, 32, 51, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(9, 32, 51, 0.035) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 78%);
}

body.admin-shell::after,
body.client-shell::after {
    content: "";
    position: fixed;
    right: -170px;
    bottom: -170px;
    width: 420px;
    height: 420px;
    z-index: -1;
    pointer-events: none;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(15, 123, 140, 0.2), transparent 66%);
    filter: blur(3px);
}

body.admin-shell h1,
body.admin-shell h2,
body.admin-shell h3,
body.admin-shell h4,
body.admin-shell h5,
body.client-shell h1,
body.client-shell h2,
body.client-shell h3,
body.client-shell h4,
body.client-shell h5,
.page-title,
.navbar-brand {
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
}

body.admin-shell a,
body.client-shell a {
    text-underline-offset: 3px;
}

body.admin-shell .content-area > *,
body.client-shell .main-content > *,
body.admin-shell .catalog-shell,
body.client-shell .client-dash {
    animation: h2o-rise 0.42s ease both;
}

@keyframes h2o-rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.admin-shell .sidebar {
    left: -280px;
    width: 280px;
    padding: 1rem;
    background:
        radial-gradient(circle at 20% 0%, rgba(45, 212, 191, 0.36), transparent 34%),
        linear-gradient(160deg, #082b3c 0%, #0b5061 54%, #102a47 100%);
    box-shadow: 18px 0 46px rgba(7, 39, 60, 0.2);
    transition: width 0.28s ease, left 0.28s ease, padding 0.28s ease, box-shadow 0.28s ease;
}

body.admin-shell .sidebar.active {
    left: 0;
}

body.admin-shell .sidebar .logo {
    margin-bottom: 1.1rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.1);
    text-align: left;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: padding 0.28s ease, border-radius 0.28s ease;
}

body.admin-shell .sidebar .logo img {
    padding: 0.22rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
}

body.admin-shell .sidebar .logo h5 {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

body.admin-shell .sidebar .logo small {
    color: rgba(255, 255, 255, 0.66);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.admin-shell .sidebar .nav {
    gap: 0.28rem;
}

body.admin-shell .sidebar .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 46px;
    margin: 0.1rem 0;
    padding: 0.72rem 0.82rem;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.76);
    font-weight: 700;
    overflow: hidden;
    transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease, padding 0.28s ease;
}

body.admin-shell .sidebar .nav-link i {
    display: inline-flex;
    width: 31px;
    height: 31px;
    align-items: center;
    justify-content: center;
    margin-right: 0.65rem !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

body.admin-shell .sidebar .nav-link:hover,
body.admin-shell .sidebar .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(4px);
}

body.admin-shell .sidebar .nav-link.active::before {
    content: "";
    position: absolute;
    inset: 10px auto 10px 0;
    width: 4px;
    border-radius: 999px;
    background: var(--h2o-aqua);
}

body.admin-shell .main-content {
    background: transparent;
    transition: margin-left 0.28s ease;
}

body.admin-shell .top-header {
    position: sticky;
    top: 0;
    z-index: 120;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid rgba(24, 88, 112, 0.12);
    background: rgba(248, 253, 255, 0.78);
    box-shadow: 0 10px 30px rgba(7, 39, 60, 0.07);
    backdrop-filter: blur(18px);
}

body.admin-shell .top-header .btn,
body.client-shell .navbar .btn,
body.client-shell .navbar .nav-link {
    min-height: 42px;
    border-radius: 999px;
}

body.admin-shell .top-header .btn,
body.client-shell .navbar .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.admin-shell .mobile-menu-btn {
    display: inline-flex !important;
}

body.admin-shell .mobile-menu-btn i {
    transition: transform 0.22s ease;
}

body.admin-shell.sidebar-collapsed .mobile-menu-btn i {
    transform: rotate(90deg);
}

body.admin-shell .content-area {
    max-width: 1520px;
    margin: 0 auto;
}

body.admin-shell .page-title {
    color: var(--h2o-ink);
    font-weight: 800;
    letter-spacing: -0.03em;
}

body.admin-shell .breadcrumb {
    margin-bottom: 0;
}

body.admin-shell .breadcrumb a,
body.client-shell .breadcrumb a {
    color: var(--h2o-primary);
    font-weight: 700;
    text-decoration: none;
}

body.admin-shell .stats-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--h2o-border);
    border-left: 0;
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.2), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 252, 255, 0.9) 100%);
    box-shadow: var(--h2o-shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

body.admin-shell .stats-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(180deg, var(--h2o-aqua), var(--h2o-blue));
}

body.admin-shell .stats-card:hover {
    border-color: rgba(15, 123, 140, 0.22);
    transform: translateY(-3px);
    box-shadow: var(--h2o-shadow);
}

body.admin-shell .stats-card h3,
body.client-shell .stats-number,
body.client-shell .stat-value,
body.client-shell .metric-value {
    color: var(--h2o-primary-strong);
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
    font-weight: 800;
    letter-spacing: -0.04em;
}

body.admin-shell .card,
body.client-shell .card,
body.admin-shell .catalog-card,
body.client-shell .dash-panel,
body.client-shell .client-section-card {
    border: 1px solid var(--h2o-border) !important;
    border-radius: var(--h2o-radius-lg) !important;
    background: var(--h2o-panel);
    box-shadow: var(--h2o-shadow-soft);
    backdrop-filter: blur(14px);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

body.admin-shell .card:hover,
body.admin-shell .catalog-card:hover,
body.client-shell .dash-panel:hover,
body.client-shell .client-section-card:hover {
    border-color: rgba(15, 123, 140, 0.2) !important;
    box-shadow: var(--h2o-shadow);
}

body.admin-shell .card-header,
body.client-shell .card-header {
    border-color: rgba(24, 88, 112, 0.1) !important;
    border-radius: var(--h2o-radius-lg) var(--h2o-radius-lg) 0 0 !important;
    background: rgba(255, 255, 255, 0.54) !important;
}

body.admin-shell .table,
body.client-shell .table {
    overflow: hidden;
    border-radius: 18px;
    box-shadow: none;
}

body.admin-shell .table thead th,
body.client-shell .table thead th {
    border-bottom: 0;
    background: #eaf6f8;
    color: #315369;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.admin-shell .table tbody tr,
body.client-shell .table tbody tr {
    transition: background 0.18s ease, transform 0.18s ease;
}

body.admin-shell .table tbody tr:hover,
body.client-shell .table tbody tr:hover {
    background: rgba(45, 212, 191, 0.08);
}

body.admin-shell .btn,
body.client-shell .btn {
    border-radius: 14px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

body.admin-shell .btn-primary,
body.client-shell .btn-primary {
    border: 0;
    background: linear-gradient(135deg, var(--h2o-primary) 0%, var(--h2o-blue) 100%);
    box-shadow: 0 12px 24px rgba(15, 123, 140, 0.22);
}

body.admin-shell .btn-primary:hover,
body.client-shell .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 123, 140, 0.28);
}

body.admin-shell .btn-success,
body.client-shell .btn-success {
    border: 0;
    background: linear-gradient(135deg, #0f9f6e 0%, #14b8a6 100%);
    box-shadow: 0 12px 24px rgba(20, 184, 166, 0.2);
}

body.admin-shell .btn-warning,
body.client-shell .btn-warning {
    border: 0;
    color: #3b2600;
    background: linear-gradient(135deg, #f59e0b 0%, #facc15 100%);
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.2);
}

body.admin-shell .btn-danger,
body.admin-shell .btn-outline-danger:hover,
body.client-shell .btn-danger,
body.client-shell .btn-outline-danger:hover {
    border-color: transparent;
    color: #ffffff;
    background: linear-gradient(135deg, #e5484d 0%, #f97373 100%);
}

body.admin-shell .btn-light,
body.client-shell .btn-light {
    border: 1px solid rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 20px rgba(7, 39, 60, 0.08);
}

body.admin-shell .btn-outline-primary,
body.client-shell .btn-outline-primary {
    border-color: rgba(15, 123, 140, 0.32);
    color: var(--h2o-primary);
    background: rgba(255, 255, 255, 0.52);
}

body.admin-shell .btn-outline-primary:hover,
body.client-shell .btn-outline-primary:hover {
    border-color: transparent;
    color: #ffffff;
    background: var(--h2o-primary);
}

body.admin-shell .btn-outline-secondary,
body.client-shell .btn-outline-secondary {
    border-color: rgba(100, 122, 143, 0.24);
    color: #3d566e;
    background: rgba(255, 255, 255, 0.55);
}

body.admin-shell .form-control,
body.admin-shell .form-select,
body.client-shell .form-control,
body.client-shell .form-select {
    min-height: 44px;
    border: 1px solid rgba(24, 88, 112, 0.16);
    border-radius: 15px;
    background-color: rgba(255, 255, 255, 0.82);
    color: var(--h2o-ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

body.admin-shell textarea.form-control,
body.client-shell textarea.form-control {
    min-height: auto;
}

body.admin-shell .form-control:focus,
body.admin-shell .form-select:focus,
body.client-shell .form-control:focus,
body.client-shell .form-select:focus {
    border-color: rgba(15, 123, 140, 0.7);
    box-shadow: 0 0 0 0.22rem rgba(45, 212, 191, 0.18);
}

body.admin-shell .alert,
body.client-shell .alert {
    border: 1px solid rgba(24, 88, 112, 0.11);
    border-radius: 18px;
    box-shadow: var(--h2o-shadow-soft);
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(12px);
}

body.admin-shell .badge,
body.client-shell .badge {
    border-radius: 999px;
    font-weight: 800;
}

body.client-shell .navbar {
    border-bottom: 1px solid rgba(24, 88, 112, 0.12);
    background: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 10px 30px rgba(7, 39, 60, 0.08);
    backdrop-filter: blur(18px);
}

body.client-shell .navbar .container {
    max-width: 1180px;
}

body.client-shell .navbar-brand {
    color: var(--h2o-primary-strong) !important;
    font-weight: 800;
    letter-spacing: -0.03em;
}

body.client-shell .navbar .nav-link {
    display: inline-flex;
    align-items: center;
    padding-inline: 0.9rem;
    color: #315369 !important;
    font-weight: 800;
}

body.client-shell .navbar .nav-link:hover {
    color: var(--h2o-primary-strong) !important;
    background: rgba(15, 123, 140, 0.08);
}

body.client-shell .navbar-brand img,
body.admin-shell .top-header img,
body.admin-shell .sidebar .logo img {
    filter: drop-shadow(0 8px 12px rgba(15, 123, 140, 0.16));
}

body.client-shell > .container {
    max-width: 1180px;
}

body.client-shell .main-content {
    padding: 0;
    background: transparent;
}

body.client-shell .card {
    overflow: hidden;
}

body.client-shell .card:hover {
    transform: translateY(-3px);
    box-shadow: var(--h2o-shadow);
}

body.client-shell .row.justify-content-center > .col-md-5 .card {
    position: relative;
    overflow: hidden;
    border-radius: 32px !important;
    background:
        radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.2), transparent 32%),
        rgba(255, 255, 255, 0.9);
}

body.client-shell .row.justify-content-center > .col-md-5 .card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 7px;
    background: linear-gradient(180deg, var(--h2o-aqua), var(--h2o-blue));
}

body.client-shell .row.justify-content-center > .col-md-5 .card img {
    padding: 0.36rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 24px rgba(15, 123, 140, 0.14);
}

body.client-shell .client-mobile-menu,
body.admin-shell .mobile-profile-menu {
    border-left: 1px solid var(--h2o-border);
    background:
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.17), transparent 34%),
        #ffffff;
    box-shadow: -24px 0 56px rgba(7, 39, 60, 0.2);
}

body.client-shell .menu-overlay.active,
body.admin-shell .sidebar-overlay.active {
    background: rgba(7, 25, 38, 0.46);
    backdrop-filter: blur(6px);
}

body.client-shell .dropdown-menu,
body.admin-shell .dropdown-menu {
    overflow: hidden;
    border: 1px solid var(--h2o-border);
    border-radius: 18px;
    box-shadow: var(--h2o-shadow);
}

body.client-shell .dropdown-item,
body.admin-shell .dropdown-item,
body.client-shell .client-mobile-menu .nav-link,
body.admin-shell .mobile-profile-menu .nav-link {
    border-radius: 14px;
    font-weight: 700;
}

body.client-shell .dropdown-item:hover,
body.admin-shell .dropdown-item:hover,
body.client-shell .client-mobile-menu .nav-link:hover,
body.admin-shell .mobile-profile-menu .nav-link:hover {
    color: var(--h2o-primary-strong) !important;
    background: rgba(15, 123, 140, 0.08);
}

.modal-backdrop,
body.modal-open .modal-backdrop {
    backdrop-filter: none !important;
    background: rgba(7, 25, 38, 0.6) !important;
}

body.client-shell .modal-content,
body.admin-shell .modal-content {
    border: 1px solid var(--h2o-border);
    border-radius: 26px;
    background:
        radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.14), transparent 34%),
        rgba(255, 255, 255, 0.95);
    box-shadow: var(--h2o-shadow);
}

body.client-shell::-webkit-scrollbar,
body.admin-shell::-webkit-scrollbar,
body.client-shell *::-webkit-scrollbar,
body.admin-shell *::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

body.client-shell::-webkit-scrollbar-thumb,
body.admin-shell::-webkit-scrollbar-thumb,
body.client-shell *::-webkit-scrollbar-thumb,
body.admin-shell *::-webkit-scrollbar-thumb {
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    background: rgba(15, 123, 140, 0.38);
}

body.client-shell::-webkit-scrollbar-track,
body.admin-shell::-webkit-scrollbar-track,
body.client-shell *::-webkit-scrollbar-track,
body.admin-shell *::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.36);
}

@media (min-width: 768px) {
    body.admin-shell .sidebar {
        left: 0;
    }

    body.admin-shell .main-content {
        margin-left: 280px;
    }

    body.admin-shell.sidebar-collapsed .sidebar {
        width: 92px;
        padding: 0.85rem 0.65rem;
    }

    body.admin-shell.sidebar-collapsed .main-content {
        margin-left: 92px;
    }

    body.admin-shell.sidebar-collapsed .sidebar .logo {
        padding: 0.82rem 0.55rem;
        border-radius: 22px;
        text-align: center;
    }

    body.admin-shell.sidebar-collapsed .sidebar .logo .d-flex {
        justify-content: center !important;
    }

    body.admin-shell.sidebar-collapsed .sidebar .logo img {
        margin-right: 0 !important;
    }

    body.admin-shell.sidebar-collapsed .sidebar .logo h5,
    body.admin-shell.sidebar-collapsed .sidebar .logo small {
        display: none !important;
    }

    body.admin-shell.sidebar-collapsed .sidebar .nav-link {
        justify-content: center !important;
        min-height: 50px;
        padding: 0.72rem 0.4rem;
        font-size: 0;
    }

    body.admin-shell.sidebar-collapsed .sidebar .nav-link span {
        font-size: 0;
    }

    body.admin-shell.sidebar-collapsed .sidebar .nav-link i {
        width: 38px;
        height: 38px;
        margin-right: 0 !important;
        font-size: 1rem;
    }

    body.admin-shell.sidebar-collapsed .sidebar .nav-link .badge {
        display: none;
    }

    body.admin-shell.sidebar-collapsed .sidebar hr {
        width: 42px;
        margin-inline: auto;
    }

    body.admin-shell.sidebar-collapsed .sidebar .nav-link:hover,
    body.admin-shell.sidebar-collapsed .sidebar .nav-link.active {
        transform: translateX(0);
    }
}

@media (max-width: 767.98px) {
    body.admin-shell .sidebar {
        width: min(88vw, 280px);
        left: min(-88vw, -280px);
    }

    body.admin-shell .top-header {
        border-radius: 0 0 22px 22px;
    }

    body.admin-shell .content-area,
    body.client-shell > .container {
        padding-inline: 1rem !important;
    }

    body.admin-shell .mobile-menu-btn {
        display: inline-flex !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
