:root {
    --bacco-primary: #722f37;
    --bacco-secondary: #8b4513;
    --bacco-accent: #d4af37;
    --bacco-bg: #f4efe6;
    --bacco-text: #2d2320;
    --bacco-muted: #6d625d;
    --bacco-surface: rgba(255, 255, 255, 0.9);
    --bacco-border: rgba(114, 47, 55, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    color: var(--bacco-text);
    background:
        radial-gradient(circle at top left, rgba(212, 175, 55, 0.18), transparent 30%),
        radial-gradient(circle at bottom right, rgba(114, 47, 55, 0.12), transparent 34%),
        linear-gradient(180deg, #faf6ef 0%, var(--bacco-bg) 100%);
}

body.bacco-login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(212, 175, 55, 0.22), transparent 34%),
        radial-gradient(circle at bottom right, rgba(114, 47, 55, 0.18), transparent 38%),
        linear-gradient(180deg, #f8f4ed 0%, #f3efe8 100%);
}

a {
    color: var(--bacco-primary);
}

.bacco-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
}

.bacco-site-header__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.bacco-site-header__brand {
    text-decoration: none;
    color: #111;
    font-size: 1.7rem;
    font-weight: 800;
}

.bacco-site-header__nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bacco-site-header__link {
    text-decoration: none;
    color: #333;
    border-bottom: 2px solid transparent;
    padding: 4px 6px;
    font-weight: 600;
}

.bacco-site-header__link.is-active,
.bacco-site-header__link:hover {
    color: var(--bacco-primary);
    border-bottom-color: var(--bacco-primary);
}

.bacco-page {
    max-width: 1240px;
    margin: 18px auto;
    padding: 0 16px;
}

.bacco-page-section,
.bacco-page-section__inner {
    width: 100%;
}

.bacco-page-section__inner {
    display: grid;
    gap: 16px;
}

.bacco-page__header {
    background: linear-gradient(120deg, var(--bacco-primary), var(--bacco-secondary));
    color: #fff;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 16px;
}

.bacco-page__title {
    margin: 0;
    color: #fff;
}

.bacco-page__subtitle {
    margin: 4px 0 0;
    opacity: 0.95;
}

.bacco-page__content {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.box {
    margin-bottom: 14px;
}

.hide-show-btn,
.filter-button,
button {
    background: linear-gradient(120deg, var(--bacco-primary), var(--bacco-secondary));
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
}

.filter-button {
    margin-right: 8px;
}

.tables {
    width: 100%;
}

.bacco-page__placeholder {
    border: 1px dashed #bbb;
    border-radius: 8px;
    padding: 12px;
    background: #fafafa;
}

.content {
    display: block;
}

.content,
.chart-container {
    max-width: 100%;
}

.bacco-login-page .bacco-site-header {
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(14px);
}

.bacco-login-page .bacco-page {
    max-width: 1120px;
    margin: 40px auto 0;
}

.bacco-login-page .bacco-page__header {
    display: none;
}

.bacco-public-page .bacco-site-header {
    display: none;
}

.bacco-public-page .bacco-page__header {
    display: none;
}

.bacco-login {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
    gap: 22px;
    align-items: stretch;
}

.bacco-login__hero,
.bacco-login__panel {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(24, 34, 54, 0.14);
}

.bacco-login__hero {
    background:
        linear-gradient(145deg, rgba(114, 47, 55, 0.98), rgba(139, 69, 19, 0.94)),
        #722f37;
    color: #fff;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    position: relative;
}

.bacco-login__hero::before,
.bacco-login__hero::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.bacco-login__hero::before {
    width: 180px;
    height: 180px;
    top: 22px;
    left: 20px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.24), rgba(212, 175, 55, 0));
}

.bacco-login__hero::after {
    width: 240px;
    height: 240px;
    right: -70px;
    bottom: -80px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
}

.bacco-login__eyebrow {
    display: inline-flex;
    align-self: flex-start;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    letter-spacing: 0.16em;
    font-size: 0.76rem;
    font-weight: 800;
}

.bacco-login__title {
    margin: 18px 0 10px;
    font-size: clamp(2.3rem, 4.8vw, 4rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.bacco-login__copy {
    margin: 0;
    max-width: 40ch;
    font-size: 1.01rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
}

.bacco-login__panel {
    position: relative;
    background: var(--bacco-surface);
    border: 1px solid var(--bacco-border);
    padding: 32px;
    backdrop-filter: blur(12px);
}

.bacco-login__panel::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--bacco-primary), var(--bacco-secondary), var(--bacco-accent));
}

.bacco-login__panel-title {
    margin: 8px 0 0;
    font-size: 1.4rem;
}

.bacco-login__panel-text {
    margin: 8px 0 20px;
    color: var(--bacco-muted);
    line-height: 1.55;
}

.bacco-login__form {
    display: grid;
    gap: 16px;
}

.bacco-login__field {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.bacco-login__field span {
    font-size: 0.92rem;
}

.bacco-login__field input {
    width: 100%;
    min-height: 54px;
    border: 1px solid rgba(114, 47, 55, 0.16);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 1rem;
    background: #fff;
    color: var(--bacco-text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.bacco-login__field input:focus {
    outline: none;
    border-color: var(--bacco-primary);
    box-shadow: 0 0 0 4px rgba(114, 47, 55, 0.1);
}

.bacco-login__submit {
    margin-top: 4px;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 14px 26px rgba(114, 47, 55, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.bacco-login__submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(114, 47, 55, 0.28);
    filter: saturate(1.03);
}

.bacco-nav__intro {
    margin: 0 0 16px;
    color: #4a4a4a;
    font-weight: 600;
}

.bacco-nav__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.bacco-nav__section {
    border: 1px solid rgba(114, 47, 55, 0.16);
    border-radius: 10px;
    background: #fffdf8;
    padding: 12px;
}

.bacco-nav__section h2 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: var(--bacco-primary);
}

.bacco-nav__section ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 7px;
}

.bacco-nav__section a {
    text-decoration: none;
    color: #244f93;
    font-weight: 600;
}

.bacco-nav__section a:hover {
    text-decoration: underline;
}

.bacco-nav__note {
    margin: 0 0 10px;
    color: #8a3d12;
    font-weight: 700;
    font-size: 0.92rem;
}

@media (max-width: 860px) {
    .bacco-site-header__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .bacco-login {
        grid-template-columns: 1fr;
    }

    .bacco-login__hero,
    .bacco-login__panel {
        padding: 24px;
        border-radius: 22px;
    }
}

@media (max-width: 640px) {
    .bacco-site-header__inner {
        padding: 10px 12px;
    }

    .bacco-site-header__brand {
        font-size: 1.35rem;
    }

    .bacco-site-header__nav {
        width: 100%;
        gap: 6px;
    }

    .bacco-site-header__link {
        padding: 6px 0;
    }

    .bacco-page {
        margin: 14px auto;
        padding: 0 12px 16px;
    }

    .bacco-page-section__inner {
        gap: 12px;
    }

    .bacco-page__header,
    .bacco-page__content {
        border-radius: 14px;
    }

    .bacco-page__header {
        padding: 14px 16px;
    }

    .bacco-page__content {
        padding: 12px;
    }

    .box {
        margin-bottom: 12px;
    }

    .hide-show-btn,
    .filter-button,
    .back-link__button,
    .bacco-login__submit,
    button {
        width: 100%;
    }

    .content,
    .chart-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .bacco-page__title {
        font-size: 1.45rem;
    }
}
