/* ─── Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@100..900&display=swap');
@import url('custom-select.css');

/* ─── Design Tokens ──────────────────────────────────── */
:root {
    --red:          #c42a2a;
    --red-bright:   #e03535;
    --red-dim:      rgba(196, 42, 42, 0.18);
    --red-glow:     rgba(196, 42, 42, 0.30);
    --orange:       #d4532a;

    --bg:           #07070a;
    --bg-card:      rgba(10, 10, 15, 0.80);
    --border:       rgba(255, 255, 255, 0.07);
    --border-red:   rgba(196, 42, 42, 0.38);

    --text:         #f0f0f2;
    --text-sub:     #8a8a9a;
    --text-muted:   #48485a;

    --nav-h:        68px;
    --max-w:        1100px;
    --radius:       12px;
    --font:         'Noto Sans Hebrew', system-ui, sans-serif;
}

/* ─── Utilities ──────────────────────────────────────── */
.text-center { text-align: center; }
.text-start { text-align: start !important; }
.text-end { text-align: end !important; }
:lang(he) .strikethrough { text-decoration: line-through !important; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }

.w-100 { width: 100%; }
.min-h-60vh { min-height: 60vh; }
.min-h-70vh { min-height: 70vh; }

.mb-1rem { margin-bottom: 1rem; }
.mb-2rem { margin-bottom: 2rem; }

.opacity-90 { opacity: 0.9; }

.display-inline { display: inline; }
.display-inline-block { display: inline-block; }

.max-w-900 { max-width: 900px; }
.p-2rem { padding: 2rem; }
.mb-1-5rem { margin-bottom: 1.5rem; }
.mb-2rem { margin-bottom: 2rem; }
.h-150 { height: 150px; }
.res-v { resize: vertical; }
.d-none { display: none; }
.border-red { border-color: var(--red) !important; }
.text-red { color: var(--red) !important; }

/* ─── Custom Scrollbar ───────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

/* ─── Reset ──────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font);
}

/* ─── Fixed Background ───────────────────────────────── */
#space { position: fixed; inset: 0; z-index: -1000; }

#planet {
    position: fixed;
    inset: 0;
    background: #000 url('../../images/background.jpg') 50% 0 / cover no-repeat;
    opacity: 0.30;
}

/* ─── Body ───────────────────────────────────────────── */
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.4s ease;
}

body.i18n-ready {
    opacity: 1;
}

/* ─── Typography ─────────────────────────────────────── */
h1 {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 900;
    line-height: 1.06;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text);
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
}

p {
    color: var(--text-sub);
    line-height: 1.75;
    margin-bottom: 1rem;
}

a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover { color: var(--red-bright); }

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

img { width: 100%; display: block; }

/* ─── Layout ─────────────────────────────────────────── */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

main {
    flex-grow: 1;
    padding-top: var(--nav-h);
}

.section-padding { padding: 5rem 0; }

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

/* Red dot accent on section headings */
.section-header h2 {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
}

.section-header h2::after {
    content: '';
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--red);
    flex-shrink: 0;
}

.section-header.align-start { text-align: start; }

/* ─── Navigation ─────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-h);
    background: rgba(7, 7, 10, 0.70);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background 0.3s;
}

.navbar.scrolled { background: rgba(7, 7, 10, 0.97); }

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

/* Small red dot after logo name */
.logo::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    flex-shrink: 0;
}

.navbar .logo::after {
    display: none;
}

.nav-logo-img {
    height: 67px;
    width: auto;
    display: block;
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.2rem;
}

.nav-links li a {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-sub);
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-links li a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.nav-links li a.active {
    color: var(--text);
    background: var(--red-dim);
}

/* ─── Custom Select ──────────────────────────────────── */
.custom-select {
    position: relative;
    user-select: none;
    margin: 0 0.5rem;
    z-index: 1000;
}

.select-trigger {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    padding: 0.45rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    min-width: 60px;
    justify-content: space-between;
}

.select-trigger:hover {
    border-color: var(--border-red);
    background: rgba(255, 255, 255, 0.08);
}

.select-trigger .arrow {
    width: 10px;
    height: 10px;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.custom-select.open .select-trigger .arrow {
    transform: rotate(180deg);
}

.select-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    min-width: 80px;
}

.custom-select.open .select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.option {
    padding: 0.6rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.option:hover {
    background: var(--red-dim);
    color: var(--text);
}

.option.selected {
    color: var(--red-bright);
    background: rgba(255, 255, 255, 0.03);
}

/* Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    margin: 4px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ─── Cards ──────────────────────────────────────────── */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 2.5rem 2.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-4px);
    border-color: var(--border-red);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.55),
        0 0 0 1px var(--border-red),
        0 0 30px var(--red-dim);
}

/* ─── Buttons ────────────────────────────────────────── */
.button {
    display: inline-block;
    padding: 0.7em 1.9em;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.22s ease;
    text-decoration: none;
}

.primary-button {
    background: linear-gradient(135deg, var(--red) 0%, var(--orange) 100%);
    color: #fff;
    box-shadow: 0 4px 18px var(--red-glow);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--red-glow);
    color: #fff;
}

.outline-button {
    background: transparent;
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.18);
}

.outline-button:hover {
    border-color: var(--red);
    color: var(--red-bright);
    background: var(--red-dim);
}

/* ─── Hero ───────────────────────────────────────────── */
.hero {
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: center;
    padding: 6rem 0 4rem;
}

.hero-content {
    z-index: 2;
    animation: fadeUp 0.85s ease forwards;
    opacity: 0;
    transform: translateY(22px);
}

.hero-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--red-bright);
    margin-bottom: 1.25rem;
}

/* Short red bar before subtitle */
.hero-subtitle::before {
    content: '';
    display: inline-block;
    width: 22px;
    height: 2px;
    background: var(--red);
    flex-shrink: 0;
}

.hero-actions {
    display: flex;
    gap: 0.9rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

/* ─── Media / Video ──────────────────────────────────── */
.media-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.panel-heading {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--red-bright);
    margin-bottom: 1.25rem;
}

/* Thin red bar accent before panel heading */
.panel-heading::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: var(--red);
    border-radius: 2px;
    flex-shrink: 0;
}

.videoWrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 8px;
    overflow: hidden;
}

.videoWrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ─── Social Icon Bar ────────────────────────────────── */
.icon-bar {
    position: fixed;
    top: 50%;
    right: 0;
    z-index: 99;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    border-radius: 8px 0 0 8px;
    overflow: hidden;
}

.icon-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    font-size: 18px;
    color: #fff;
    font-weight: normal;
    text-decoration: none;
    transition: width 0.22s ease, opacity 0.22s ease;
    opacity: 0.85;
}

.icon-bar a:hover { width: 54px; opacity: 1; }

.icon-bar .soundcloud { background: #f50; }
.icon-bar .spotify { background: #1DB954; }
.icon-bar .youtube { background: #FF0000; }

.icon-bar a img {
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(1);
    display: block;
}

/* ─── Scroll-to-top Button ───────────────────────────── */
#top-button {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 105;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-red);
    outline: none;
    background: rgba(7, 7, 10, 0.88);
    cursor: pointer;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.22s;
}

#top-button img {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1);
    display: block;
    transition: filter 0.22s;
}

#top-button.visible {
    display: flex;
}

#top-button:hover {
    background: var(--red);
    border-color: var(--red);
    transform: translateY(-2px);
}

/* ─── Footer ─────────────────────────────────────────── */
footer {
    background: rgba(5, 5, 8, 0.98);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-top: auto;
    text-align: center;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.footer-disclaimer p {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.8;
    text-align: center;
    white-space: normal;
    max-width: 1100px;
    margin: 0 auto;
}

.footer-disclaimer {
    width: auto;
    border-bottom: none;
    padding-bottom: 0;
    flex: 1;
}

.footer-main {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.25rem;
}

.footer-container > div {
    flex: 1;
    display: flex;
    align-items: center;
}

.footer-main .logo {
    justify-content: flex-start;
}

.social-links { 
    display: flex;
    justify-content: flex-end; 
    gap: 0.75rem; 
}

.social-links a {
    color: var(--text-sub);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 5px;
    transition: all 0.2s;
    text-decoration: none;
}

.social-links a:hover {
    color: var(--red-bright);
    border-color: var(--border-red);
    background: var(--red-dim);
}

.social-links a img {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(0.6);
    display: block;
    transition: filter 0.2s;
}

.social-links a:hover img {
    filter: brightness(0) invert(0.75) sepia(1) saturate(4) hue-rotate(320deg);
}

.footer-bottom {
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    padding-top: 0;
    border-top: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: nowrap;
}

.heart-icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    vertical-align: middle;
    margin: 0 4px;
    /* White filter for black SVG */
    filter: brightness(0) invert(1);
}

/* ─── Industry Page ──────────────────────────────────── */
.industry-hero {
    padding: 6rem 0 5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

/* On small screens, stack the footer */
@media (max-width: 768px) {
    .footer-main {
        gap: 1.25rem;
    }
    
    .footer-disclaimer p {
        white-space: normal !important;
        text-align: center;
        font-size: 0.7rem;
    }

    .footer-brand-row {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-main .logo, .social-links {
        justify-content: center;
    }
}

.industry-hero p {
    max-width: 520px;
    margin: 1rem auto 0;
    font-size: 1rem;
}

/* Year headings inside the article card */
article.glass-panel h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    border-inline-start: 3px solid var(--red);
    padding-inline-start: 0.85rem;
    margin-top: 0;
    margin-bottom: 0.6rem;
}

/* ─── Legal Page ─────────────────────────────────────── */
.legal-hero {
    min-height: 45vh;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding: 5rem 0;
}

.legal-hero .container { text-align: center; }

.legal-hero p {
    max-width: 520px;
    margin: 1rem auto 0;
}

.legal-about {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.legal-content-grid .glass-panel h3 {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--red-bright);
    margin-bottom: 1.5rem;
}

.practice-areas {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.practice-areas li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.93rem;
    transition: all 0.2s;
}

/* Dot accent */
.practice-areas li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    flex-shrink: 0;
}

.practice-areas li:hover {
    background: var(--red-dim);
    border-color: var(--border-red);
    transform: translateX(-4px);
}

.legal-contact-action { margin-top: 2rem; }

/* ─── News Page ──────────────────────────────────────── */
.news-main { padding-top: var(--nav-h); }

.news-section { padding-top: 2rem; }

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Top accent stripe on news cards */
.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-top: 2px solid var(--red);
}

.news-date {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--red-bright);
    margin-bottom: 0.75rem;
}

.news-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.news-content {
    flex-grow: 1;
    font-size: 0.93rem;
    margin-bottom: 1.5rem;
}

.read-more-button { align-self: flex-start; }

/* ─── Animations ─────────────────────────────────────── */
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.no-scroll { overflow: hidden; }

.fade-in-up-start {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in-up-end {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
    .hamburger { display: block; }

    .nav-links {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--nav-h));
        background: rgba(7, 7, 10, 0.98);
        border-top: 1px solid var(--border);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: all 0.35s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 999;
    }

    .custom-select {
        margin: 0 0.5rem;
        order: -1; 
    }

    .nav-right {
        order: 1;
    }

    .nav-links li a {
        font-size: 0.95rem;
        padding: 0.65rem 1.5rem;
    }

    .nav-links.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

    .hero { min-height: 70vh; padding: 4rem 0 3rem; }

    .hero-actions { flex-direction: column; }

    .glass-panel { padding: 1.5rem; }

    .icon-bar { display: none; }

    #top-button { right: 16px; bottom: 16px; }

    .news-grid { grid-template-columns: 1fr; }
}

/* ─── Visits Dashboard ──────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1.75rem 1rem;
    border-top: 2px solid var(--red);
}

.stat-number {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-sub);
}

.chart-panel { padding: 2rem 2.5rem 2rem; }

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.chart-header .panel-heading { margin-bottom: 0; }

.range-buttons {
    display: flex;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.25rem;
}

.range-button {
    background: transparent;
    color: var(--text-sub);
    border: none;
    padding: 0.4rem 0.9rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.range-button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.range-button.active {
    color: var(--text);
    background: var(--red-dim);
    box-shadow: 0 0 12px var(--red-glow);
}

.chart-container {
    position: relative;
    height: 340px;
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .chart-panel { padding: 1.25rem; }
    .chart-container { height: 260px; }
    .chart-header { flex-direction: column; align-items: flex-start; }
}

.logs-panel { 
    margin-top: 2rem; 
    padding: 1.5rem 2rem 2rem; 
}

.chart-panel + .chart-panel {
    margin-top: 2rem;
}

.pie-container {
    height: 300px !important;
    display: flex;
    justify-content: center;
}

@media (max-width: 768px) {
    .pie-container {
        height: 400px !important;
    }
}

.logs-container {
    overflow-x: auto;
    margin-top: 1.25rem;
}

.logs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.88rem;
    color: var(--text-sub);
    table-layout: fixed;
}

.logs-table th {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    font-size: 0.65rem;
}

.logs-table td {
    padding: 1.2rem 1.25rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    transition: background 0.2s ease, color 0.2s ease;
}

.logs-table tr:last-child td { border-bottom: none; }

.log-url { 
    color: var(--text); 
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.log-time { 
    white-space: nowrap; 

    font-family: inherit;
    font-variant-numeric: tabular-nums;
    opacity: 0.75;
    font-size: 0.82rem;
}

.logs-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}

.logs-table tr:hover .log-url {
    color: var(--red-bright);
}

/* ─── Auth Pages (login / register) ─────────────────── */
.auth-section {
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: center;
    padding-top: calc(var(--nav-h) + 3rem);
    padding-bottom: 4rem;
}

.auth-card {
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
    padding: 2.5rem 2.75rem 2.75rem;
}

.auth-card .section-header {
    margin-bottom: 1.75rem;
}

.auth-card .section-header h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-sub);
}

.form-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    outline: none;
    padding: 0.7rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    width: 100%;
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--border-red);
    box-shadow: 0 0 0 3px var(--red-dim);
}

.auth-button {
    margin-top: 0.5rem;
    width: 100%;
    padding: 0.85em 1.5em;
    font-size: 0.84rem;
}

.auth-alert {
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
}

.auth-alert-error {
    background: rgba(196, 42, 42, 0.14);
    border: 1px solid var(--border-red);
    color: #f08080;
}

.auth-alert-success {
    background: rgba(42, 196, 106, 0.12);
    border: 1px solid rgba(42, 196, 106, 0.35);
    color: #7de8a4;
}

.auth-alert-success a {
    color: #7de8a4;
    text-decoration: underline;
}

.auth-switch-text {
    color: var(--text-sub);
    font-size: 0.85rem;
    margin-bottom: 0;
    margin-top: 1.25rem;
    text-align: center;
}

.auth-link {
    color: var(--red-bright);
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--text);
}

@media (max-width: 520px) {
    .auth-card {
        padding: 2rem 1.5rem 2.25rem;
    }
}

/* ─── Custom Popup ───────────────────────────────────── */
body.popup-open { overflow: hidden; }

.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.popup-overlay.popup-visible { opacity: 1; }

.popup-dialog {
    background: rgba(14, 14, 20, 0.96);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.25rem 2.5rem 2rem;
    max-width: 420px;
    width: 90%;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.04);
    transform: scale(0.92) translateY(12px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
    opacity: 0;
}

.popup-visible .popup-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.popup-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.popup-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--red-dim);
    border-radius: 50%;
    margin-bottom: 0.25rem;
}

.popup-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--red-bright);
}

.popup-message {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 0;
}

.popup-input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
}

.popup-input:focus { border-color: var(--border-red); }

.popup-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    width: 100%;
    justify-content: center;
}

.popup-button {
    min-width: 100px;
    text-align: center;
    font-family: var(--font);
}

@media (max-width: 480px) {
    .popup-dialog { padding: 1.75rem 1.5rem 1.5rem; }
    .popup-actions { flex-direction: column; }
    .popup-button { width: 100%; }
}

.h1-xl { font-size: 5rem; }
.h1-large { font-size: 2.5rem; }
.h2-medium { font-size: 2rem; }

.text-accent-red { color: var(--red-bright); }
.text-muted-dark { color: var(--text-muted); }

/* ─── Notifications ──────────────────────────────────── */
.notifications-banner {
    background: rgba(196, 42, 42, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 90;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    max-height: 200px;
    overflow-y: auto;
}

.notif-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.notif-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notif-item:last-child { border-bottom: none; }

.notif-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.notif-text {
    font-size: 0.85rem;
    font-weight: 600;
    flex-grow: 1;
}

.notif-close { 
    background: none;
    border: none;
    color: white;
    cursor: pointer; 
    font-size: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 0.5rem;
    line-height: 1;
}

.notif-close:hover { opacity: 1; }

/* ─── Profile Avatar ─────────────────────────────────── */
.profile-menu {
position: relative;
display: flex;
align-items: center;
}

.profile-link {
display: flex;
align-items: center;
gap: 0.5rem;
text-decoration: none;
padding: 0.45rem 0.9rem;
border-radius: 50px;
transition: all 0.2s;
cursor: pointer;
}

.profile-link:hover {
background: rgba(255, 255, 255, 0.06);
}

.avatar-circle {
width: 36px;
height: 36px;
border-radius: 50%;
background: linear-gradient(135deg, var(--red) 0%, var(--orange) 100%);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
overflow: hidden;
box-shadow: 0 2px 8px rgba(196, 42, 42, 0.3);
}

.avatar-circle img {
width: 20px;
height: 20px;
filter: brightness(0) invert(1);
}

.username {
font-size: 0.78rem;
font-weight: 600;
color: var(--text-sub);
white-space: nowrap;
}

.profile-dropdown {
position: absolute;
top: calc(100% + 8px);
left: 50%;
transform: translateX(-50%) translateY(-10px);
background: rgba(10, 10, 15, 0.98);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid var(--border);
border-radius: 12px;
padding: 0.5rem 0;
min-width: 180px;
opacity: 0;
visibility: hidden;
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
z-index: 1001;
}

.profile-menu:hover .profile-dropdown {
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(0);
}

.profile-dropdown a {
display: block;
padding: 0.65rem 1.25rem;
font-size: 0.8rem;
font-weight: 600;
color: var(--text-sub);
text-decoration: none;
transition: all 0.2s;
border-radius: 8px;
margin: 0.15rem 0.3rem;
}

.profile-dropdown a:hover {
background: var(--red-dim);
color: var(--text);
}

.profile-dropdown a::before {
content: '';
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--red);
margin-left: 0.5rem;
opacity: 0;
transition: opacity 0.2s;
}

.profile-dropdown a:hover::before {
opacity: 1;
}
