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

:root {
    --gcub-blue: #1473f8;
    --gcub-blue-dark: #0f5fd2;
    --gcub-navy: #101f36;
    --gcub-ink: #07111f;
    --gcub-heading: #07111f;
    --gcub-muted: #5d6b7c;
    --gcub-soft: #f5f8fc;
    --gcub-soft-2: #f8fbff;
    --gcub-surface: #ffffff;
    --gcub-line: rgba(16, 31, 54, 0.10);
    --gcub-line-strong: rgba(16, 31, 54, 0.18);
    --gcub-lime: #c7ff4a;
    --gcub-shadow: 0 22px 58px rgba(16, 31, 54, 0.09);
    --gcub-shadow-soft: 0 14px 34px rgba(16, 31, 54, 0.07);
    --gcub-radius-lg: 28px;
    --gcub-radius-md: 20px;
    --gcub-radius-sm: 14px;
    --gcub-focus: 0 0 0 0.22rem rgba(32, 111, 230, 0.16);
}

html {
    min-width: 0;
}

body {
    min-width: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% -10%, rgba(20, 115, 248, 0.10), transparent 32rem),
        linear-gradient(180deg, #f5f8fc 0%, #ffffff 430px) !important;
    color: var(--gcub-ink);
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-rendering: geometricPrecision;
}

a {
    color: var(--gcub-blue);
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--gcub-blue-dark);
}

h1,
.h1 {
    color: var(--gcub-heading);
    font-size: clamp(2rem, 4.2vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

h2,
.h2,
.h3,
.h4,
.h5 {
    color: var(--gcub-heading);
    font-weight: 750;
    letter-spacing: -0.025em;
}

.text-muted {
    color: var(--gcub-muted) !important;
}

.container.py-5 {
    width: min(100% - 32px, 1360px);
    max-width: none;
    padding-top: clamp(24px, 4vw, 48px) !important;
    padding-bottom: clamp(28px, 5vw, 56px) !important;
}

.hero,
.panel,
.section-card,
.filters-card,
.table-card,
.chart-card,
.card-shell,
.log-shell,
.metric,
.metric-card,
.summary-card,
.info-item,
.form-card,
.create-box,
.manager-card,
.empty-card,
.login-card {
    border-color: var(--gcub-line) !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: var(--gcub-shadow-soft) !important;
}

.hero,
.panel,
.section-card,
.filters-card,
.table-card,
.chart-card,
.card-shell,
.log-shell,
.empty-card {
    border-radius: var(--gcub-radius-lg) !important;
}

.hero,
.panel,
.section-card,
.filters-card,
.chart-card,
.card-shell,
.log-shell,
.empty-card {
    padding: clamp(20px, 2.4vw, 30px) !important;
}

.hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.92)),
        radial-gradient(circle at 100% 0%, rgba(20, 115, 248, 0.12), transparent 18rem) !important;
    border-radius: 22px !important;
    padding: clamp(15px, 1.6vw, 20px) clamp(18px, 2vw, 24px) !important;
    box-shadow: 0 14px 34px rgba(16, 31, 54, 0.075) !important;
}

.hero::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -95px;
    width: 210px;
    height: 210px;
    border-radius: 999px;
    background: rgba(20, 115, 248, 0.07);
    pointer-events: none;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero p,
.hero .text-muted {
    max-width: 820px;
    font-size: clamp(0.92rem, 1vw, 1rem) !important;
    line-height: 1.42 !important;
}

.hero h1,
.hero .h1 {
    margin: 0 0 0.35rem !important;
    font-size: clamp(1.65rem, 2.35vw, 2.35rem) !important;
    line-height: 1.04 !important;
    letter-spacing: -0.045em !important;
}

.hero a + h1 {
    margin-top: 0.45rem !important;
}

.hero-summary {
    color: rgba(7, 17, 31, 0.62) !important;
    font-size: clamp(0.88rem, 0.95vw, 0.96rem) !important;
    line-height: 1.35 !important;
}

.hero .summary-strip,
.hero .metrics {
    gap: 10px !important;
    margin-top: 14px !important;
}

.hero .summary-card,
.hero .metric-card {
    padding: 12px 14px !important;
    border-radius: 16px !important;
}

.hero .summary-value,
.hero .metric-value {
    margin-top: 4px !important;
    font-size: clamp(1.15rem, 1.55vw, 1.55rem) !important;
}

.hero .summary-label,
.hero .metric-label {
    font-size: 0.68rem !important;
}

.metric,
.metric-card,
.summary-card,
.info-item,
.form-card,
.create-box,
.team-summary-pill,
.summary-pill {
    border-radius: var(--gcub-radius-md) !important;
    background: #ffffff !important;
}

.metric,
.metric-card,
.summary-card {
    padding: clamp(15px, 1.8vw, 20px) !important;
}

.metric-label,
.summary-label,
.info-item-label,
.stat-label,
.team-summary-pill-label,
.summary-pill-label {
    color: rgba(7, 17, 31, 0.58) !important;
    font-size: 0.74rem !important;
    font-weight: 750 !important;
    letter-spacing: 0.09em !important;
    text-transform: uppercase;
}

.metric-value,
.summary-value,
.stat-value,
.team-summary-pill-value,
.summary-pill-value {
    color: var(--gcub-heading) !important;
    font-weight: 800 !important;
    letter-spacing: -0.035em;
}

.metric-value {
    font-size: clamp(1.55rem, 2.3vw, 2.05rem) !important;
}

.btn {
    border-radius: 999px;
    min-height: 42px;
    padding: 0.58rem 1.08rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:focus-visible,
.form-control:focus,
.form-select:focus {
    box-shadow: var(--gcub-focus) !important;
}

.btn-dark,
.btn-staff,
.btn-login,
.btn-manager {
    background: var(--gcub-ink) !important;
    border-color: var(--gcub-ink) !important;
    color: #ffffff !important;
    box-shadow: 0 14px 28px rgba(16, 31, 54, 0.16) !important;
}

.btn-staff,
.btn-login,
.btn-manager {
    background: var(--gcub-blue) !important;
    border-color: var(--gcub-blue) !important;
    box-shadow: 0 14px 30px rgba(20, 115, 248, 0.22) !important;
}

.btn-dark:hover {
    background: var(--gcub-navy) !important;
    border-color: var(--gcub-navy) !important;
}

.btn-staff:hover,
.btn-login:hover,
.btn-manager:hover {
    background: var(--gcub-blue-dark) !important;
    border-color: var(--gcub-blue-dark) !important;
}

.btn-outline-secondary {
    background: rgba(255, 255, 255, 0.78) !important;
    border-color: rgba(16, 31, 54, 0.22) !important;
    color: rgba(7, 17, 31, 0.68) !important;
}

.btn-outline-secondary:hover {
    background: #ffffff !important;
    border-color: var(--gcub-ink) !important;
    color: var(--gcub-ink) !important;
}

.btn-sm {
    min-height: 36px;
    padding: 0.45rem 0.9rem;
}

.floating-admin-menu {
    position: fixed;
    top: 50%;
    right: 22px;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    gap: 9px;
    transform: translateY(-50%);
}

.floating-admin-menu .btn {
    position: relative;
    min-width: 190px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 800;
    box-shadow: 0 12px 34px rgba(16, 31, 54, 0.12);
    backdrop-filter: blur(10px);
}

.floating-admin-menu .btn:hover {
    transform: translateX(-2px);
}

.floating-admin-menu .menu-main {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: var(--gcub-blue) !important;
    color: var(--gcub-blue-dark) !important;
    box-shadow: 0 10px 26px rgba(20, 115, 248, 0.12) !important;
}

.floating-admin-menu .menu-main:hover {
    background: #eef4fb !important;
    border-color: var(--gcub-blue-dark) !important;
    color: var(--gcub-blue-dark) !important;
}

.floating-admin-menu .menu-sub {
    background: rgba(255, 255, 255, 0.94) !important;
    border-color: rgba(16, 31, 54, 0.16) !important;
    color: rgba(7, 17, 31, 0.72) !important;
}

.floating-admin-menu .menu-sub:hover {
    background: #f8fbff !important;
    border-color: rgba(20, 115, 248, 0.28) !important;
    color: var(--gcub-blue-dark) !important;
}

.floating-admin-menu .menu-tech,
.floating-admin-menu .menu-exit {
    background: rgba(248, 251, 255, 0.92) !important;
    border-color: rgba(16, 31, 54, 0.12) !important;
    color: rgba(7, 17, 31, 0.56) !important;
}

.floating-admin-menu .menu-tech {
    margin-top: 6px;
}

.floating-admin-menu .menu-tech:hover {
    background: #eef4fb !important;
    border-color: rgba(16, 31, 54, 0.18) !important;
    color: var(--gcub-navy) !important;
}

.floating-admin-menu .menu-exit:hover {
    background: #fff7f8 !important;
    border-color: rgba(255, 157, 157, 0.58) !important;
    color: #a43d4a !important;
}

.floating-admin-menu .btn.is-current,
.floating-admin-menu .btn.is-current:hover {
    background: var(--gcub-blue) !important;
    border-color: var(--gcub-blue) !important;
    color: #ffffff !important;
    box-shadow: 0 14px 34px rgba(20, 115, 248, 0.26) !important;
    transform: translateX(-4px);
}

.form-label {
    color: rgba(7, 17, 31, 0.78);
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    min-height: 48px;
    border-radius: var(--gcub-radius-sm) !important;
    border-color: rgba(16, 31, 54, 0.14) !important;
    background-color: #ffffff !important;
    color: var(--gcub-ink);
    font-size: 1rem;
}

.form-control::placeholder {
    color: rgba(7, 17, 31, 0.38);
}

textarea.form-control {
    line-height: 1.55;
}

.input-group > .form-control {
    min-width: 0;
}

.input-group > .btn {
    border-radius: var(--gcub-radius-sm) !important;
}

.table-responsive,
.table-wrap,
.tasks-table-wrap {
    border-radius: var(--gcub-radius-md) !important;
    border: 1px solid var(--gcub-line) !important;
    background: #ffffff;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
}

.table {
    --bs-table-border-color: rgba(16, 31, 54, 0.10);
    color: var(--gcub-ink);
}

.table > :not(caption) > * > * {
    padding: 0.86rem 0.95rem;
    vertical-align: middle;
}

.table thead th {
    background: #f5f8fc !important;
    color: var(--gcub-ink) !important;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.table tbody tr:hover td {
    background: #f8fbff !important;
}

.table-card {
    overflow: hidden;
    background: #ffffff !important;
}

.tag-pill,
.filters-tags .btn,
.period-shortcuts .btn {
    border-radius: 999px !important;
}

.footer-links {
    border-top-color: var(--gcub-line) !important;
    margin-top: 30px !important;
}

.client-grid {
    gap: 8px !important;
}

.client-grid > .client-card {
    min-height: 58px;
    border-radius: 10px !important;
    border-color: rgba(16, 31, 54, 0.12) !important;
    background: rgba(255, 255, 255, 0.72) !important;
    box-shadow: none !important;
}

.client-grid > .client-card:hover {
    border-color: rgba(20, 115, 248, 0.30) !important;
    box-shadow: 0 8px 20px rgba(16, 31, 54, 0.06) !important;
}

.client-grid > .client-card.is-inactive {
    border-color: rgba(16, 31, 54, 0.08) !important;
    background: rgba(245, 248, 252, 0.54) !important;
    box-shadow: none !important;
}

.client-grid > .client-card.is-search-result {
    border-color: rgba(20, 115, 248, 0.42) !important;
    background: rgba(246, 250, 255, 0.92) !important;
    box-shadow: 0 8px 20px rgba(20, 115, 248, 0.08) !important;
}

.client-title {
    font-size: clamp(0.94rem, 1vw, 1rem) !important;
    line-height: 1.16 !important;
}

.client-logo {
    width: 35px !important;
    height: 35px !important;
}

.client-arrow {
    font-family: inherit;
}

.status-pill,
.context-status-pill {
    border-radius: 999px !important;
}

.alert {
    border-radius: var(--gcub-radius-md);
}

.dropdown-menu {
    border-radius: 16px;
    border-color: var(--gcub-line);
    box-shadow: 0 18px 42px rgba(16, 31, 54, 0.12);
    padding: 0.45rem;
}

.dropdown-item {
    border-radius: 10px;
    font-weight: 600;
}

.sheet {
    width: min(100% - 32px, 1120px);
    border: 1px solid var(--gcub-line);
    box-shadow: var(--gcub-shadow) !important;
}

.brand-badge {
    box-shadow: 0 18px 38px rgba(20, 115, 248, 0.20) !important;
}

.summary-pill {
    box-shadow: 0 12px 28px rgba(16, 31, 54, 0.08) !important;
}

.login-card {
    background: rgba(255, 255, 255, 0.96) !important;
}

pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

@media (max-width: 991.98px) {
    .container.py-5 {
        width: min(100% - 24px, 1360px);
    }

    .hero h1 {
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: 15px;
    }

    .container.py-5 {
        width: min(100% - 20px, 1360px);
    }

    .hero,
    .panel,
    .section-card,
    .filters-card,
    .chart-card,
    .table-card,
    .card-shell,
    .log-shell,
    .empty-card {
        border-radius: 22px !important;
    }

    .hero,
    .panel,
    .section-card,
    .filters-card,
    .chart-card,
    .card-shell,
    .log-shell,
    .empty-card {
        padding: 18px !important;
    }

    .filters-card .btn,
    .manager-action .btn {
        width: 100%;
        min-height: 44px;
    }

    .hero-actions,
    .footer-links,
    .period-shortcuts,
    .filters-tags {
        width: 100%;
    }

    .hero-actions .btn,
    .footer-links .btn {
        flex: 1 1 180px;
    }

    .table-responsive {
        max-width: 100%;
    }

    .context-header {
        flex-direction: column;
        align-items: stretch !important;
    }

    .btn-context-toggle {
        width: 100%;
        min-width: 0 !important;
    }

    .table:not(.tasks-table) {
        min-width: 720px;
    }

    .client-grid {
        grid-template-columns: 1fr !important;
    }

    .client-grid > .client-card {
        min-height: 56px;
        padding: 13px 14px !important;
    }

    .sheet {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .container.py-5 {
        width: min(100% - 16px, 1360px);
    }

    h1,
    .h1 {
        font-size: clamp(1.85rem, 12vw, 2.35rem);
    }
}

@media (max-width: 520px) {
    .floating-admin-menu {
        right: 12px;
        bottom: 14px;
        left: 12px;
        top: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        transform: none;
    }

    .floating-admin-menu .btn {
        min-width: 0;
        padding-right: 10px;
        padding-left: 10px;
        font-size: 0.78rem;
    }

    .floating-admin-menu .menu-tech {
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .sheet .copy-input {
        font-size: 0.9rem;
        min-width: 0;
    }

    .sheet .tasks-table-wrap {
        border: 0 !important;
        background: transparent;
    }

    .sheet .tasks-table,
    .sheet .tasks-table tbody,
    .sheet .tasks-table tr,
    .sheet .tasks-table td {
        display: block;
        width: 100%;
    }

    .sheet .tasks-table {
        min-width: 0 !important;
        border: 0;
    }

    .sheet .tasks-table tr {
        margin-bottom: 12px;
        border: 1px solid var(--gcub-line);
        border-radius: 18px;
        overflow: hidden;
        background: #ffffff;
        box-shadow: 0 10px 24px rgba(16, 31, 54, 0.06);
    }

    .sheet .tasks-table td {
        min-height: 0 !important;
        padding: 12px 14px !important;
        border: 0;
        border-bottom: 1px solid rgba(16, 31, 54, 0.08);
        white-space: normal;
        word-break: break-word;
    }

    .sheet .tasks-table td::before {
        content: attr(data-label);
        position: static !important;
        display: block !important;
        width: auto !important;
        margin: 0 0 5px;
        color: #6a7890;
        font-size: 0.68rem;
        font-weight: 800;
        line-height: 1.2;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .sheet .tasks-table td:last-child {
        border-bottom: 0;
    }

    .sheet .tasks-table tr.tasks-total-row {
        background: #f7fbff;
    }

    .sheet .tasks-table tr.tasks-total-row td[data-label="Итого"] {
        display: none !important;
    }

    .sheet .tasks-table tr.tasks-total-row td[data-label="Всего часов"] {
        padding: 14px !important;
    }
}

@media (min-width: 521px) {
    .floating-admin-menu {
        position: fixed !important;
        top: 50% !important;
        right: 22px !important;
        bottom: auto !important;
        left: auto !important;
        display: flex !important;
        flex-direction: column !important;
        transform: translateY(-50%) !important;
    }
}
