:root {
    --green: #565c57;
    --green-dark: #464c47;
    --text: #202320;
    --muted: #8a8f8b;
    --border: #e5e7e5;
    --background: #f8f9f8;
    --white: #ffffff;
    --input-bg: #ffffff;
    --soft-bg: #f4f5f4;
    --hover-bg: #fcfdfc;
    --label: #555b56;
    --button-text: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;

    background: var(--background);
    color: var(--text);

    font-family: 'Manrope', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.login {
    width: 100%;
    max-width: 420px;

    margin: 0 auto;
    padding: 70px 24px;
}

.logo {
    text-align: center;

    margin-bottom: 34px;

    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.12em;

    color: var(--green);
}

.card {
    background: var(--white);

    border: 1px solid rgba(86, 92, 87, 0.08);
    border-radius: 22px;

    padding: 42px;

    box-shadow:
        0 20px 60px rgba(30, 35, 31, 0.07);
}

.title {
    font-size: 28px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.03em;

    margin-bottom: 9px;
}

.subtitle {
    color: var(--muted);

    font-size: 14px;
    line-height: 1.6;

    margin-bottom: 30px;
}

.field {
    margin-bottom: 18px;
}

.label {
    display: block;

    margin-bottom: 8px;

    font-size: 13px;
    font-weight: 500;

    color: var(--label);
}

.input-wrapper {
    position: relative;
}

input {
    width: 100%;
    height: 52px;

    padding: 0 16px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: var(--input-bg);
    color: var(--text);

    font-family: inherit;
    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

input::placeholder {
    color: #b1b5b2;
}

input:focus {
    border-color: var(--green);

    box-shadow:
        0 0 0 3px rgba(86, 92, 87, 0.10);
}

.password-input {
    padding-right: 80px;
}

.password-toggle {
    position: absolute;

    top: 50%;
    right: 14px;

    transform: translateY(-50%);

    border: none;
    background: transparent;

    color: var(--muted);

    cursor: pointer;

    font-family: inherit;
    font-size: 12px;
}

.password-toggle:hover {
    color: var(--green);
}

.forgot {
    display: block;

    margin-top: -3px;
    margin-bottom: 25px;

    text-align: right;

    color: var(--green);

    text-decoration: none;

    font-size: 12px;
    font-weight: 500;
}

.forgot:hover {
    text-decoration: underline;
}

.login-button {
    width: 100%;
    height: 52px;

    border: none;
    border-radius: 12px;

    background: var(--green);
    color: var(--button-text);

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.1s ease,
        box-shadow 0.2s ease;
}

.login-button:hover {
    background: var(--green-dark);

    box-shadow:
        0 8px 20px rgba(86, 92, 87, 0.18);
}

.login-button:active {
    transform: translateY(1px);
}

.footer {
    margin-top: 26px;

    text-align: center;

    color: #a0a5a1;

    font-size: 11px;
    font-weight: 400;
}

.error-message {
    margin-bottom: 18px;

    padding: 12px 14px;

    border-radius: 12px;

    background: var(--soft-bg);
    color: #565c57;

    font-size: 13px;
    line-height: 1.4;
}

.dashboard-page {
    width: 100%;
    min-height: 100vh;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 42px 16px 70px;
}

.dashboard-logo {
    margin-bottom: 32px;

    color: var(--green);

    font-size: 21px;
    font-weight: 700;

    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.dashboard-card {
    width: min(560px, 100%);

    padding: 36px;

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: 24px;

    box-shadow:
        0 18px 50px rgba(32, 35, 32, 0.07);
}

.welcome {
    margin-bottom: 30px;
}

.welcome-title {
    margin: 0;

    color: var(--text);

    font-size: 23px;
    font-weight: 700;
    line-height: 1.35;
}

.welcome-emoji {
    display: inline-block;

    margin-left: 2px;

    font-size: 21px;
}

.welcome-subtitle {
    margin-top: 6px;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.5;
}

.dashboard-header {
    margin-bottom: 24px;

    padding-top: 26px;

    border-top: 1px solid var(--border);
}

.dashboard-title {
    margin: 0;

    color: var(--text);

    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
}

.dashboard-subtitle {
    margin-top: 6px;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.5;
}

.cabinet-list {
    display: flex;
    flex-direction: column;

    gap: 10px;
}

.cabinet-card {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 72px;

    padding: 13px 15px;

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: 16px;

    color: var(--text);
    text-decoration: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease,
        background 0.2s ease;
}

.cabinet-card:hover {
    background: var(--hover-bg);

    border-color: var(--green);

    box-shadow:
        0 8px 22px rgba(32, 35, 32, 0.06);

    transform: translateY(-1px);
}

.cabinet-icon {
    width: 44px;
    height: 44px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-right: 14px;

    background: var(--background);

    border-radius: 12px;

    font-size: 20px;
}

.cabinet-content {
    min-width: 0;
    flex: 1;
}

.cabinet-name {
    color: var(--text);

    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.cabinet-description {
    margin-top: 3px;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.4;
}

.cabinet-arrow {
    margin-left: 12px;

    color: var(--muted);

    font-size: 18px;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.cabinet-card:hover .cabinet-arrow {
    color: var(--green);

    transform: translateX(2px);
}

@media (max-width: 600px) {

    .dashboard-page {
        padding: 36px 16px 50px;
    }

    .dashboard-logo {
        margin-bottom: 26px;

        font-size: 19px;
    }

    .dashboard-card {
        padding: 26px 20px;

        border-radius: 20px;
    }

    .welcome-title {
        font-size: 21px;
    }

    .welcome-subtitle {
        font-size: 13px;
    }

    .dashboard-title {
        font-size: 19px;
    }

    .dashboard-subtitle {
        font-size: 13px;
    }

    .cabinet-card {
        min-height: 68px;
    }
}

@media (max-width: 480px) {

    .login {
        padding: 40px 16px;
    }

    .card {
        padding: 30px 24px;

        border-radius: 18px;
    }

    .title {
        font-size: 25px;
    }
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--white);
    color: var(--text);

    font-size: 19px;
    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--green);
    transform: translateY(-1px);
}

[data-theme="dark"] {
    --green: #aab8ad;
    --green-dark: #c2d0c5;
    --text: #e8ece9;
    --muted: #a0aaa3;
    --border: #343d37;
    --background: #171b18;
    --white: #202622;

    --input-bg: #252d28;
    --soft-bg: #2a332d;
    --hover-bg: #252d28;
    --label: #c0c9c2;
    --button-text: #202622;
}

[data-theme="light"] {
    --input-bg: #ffffff;
    --soft-bg: #f4f5f4;
    --hover-bg: #fcfdfc;
    --label: #555b56;
    --button-text: #ffffff;
}

* {
    transition:
        background-color 0.4s ease,
        color 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

/* =========================
   Event Manager
   ========================= */

.event-page {
    background: var(--background);
}

.event-layout {
    min-height: 100vh;
    display: flex;
}

/* Sidebar */

.event-sidebar {
    width: 250px;
    min-height: 100vh;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 30px 18px 24px;
    background: var(--white);
    border-right: 1px solid var(--border);
}

.event-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
    margin-bottom: 55px;
}

.event-brand-icon {
    width: 43px;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: var(--green);
    color: var(--button-text);
    font-size: 14px;
    font-weight: 800;
}

.event-brand-name {
    color: var(--text);
    font-size: 15px;
    font-weight: 800;
}

.event-brand-caption {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.event-sidebar-label {
    padding: 0 12px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.event-navigation {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.event-nav-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 14px;
    border-radius: 12px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.event-nav-item:hover,
.event-nav-item.active {
    background: var(--background);
    color: var(--green);
}

.event-nav-item.active {
    font-weight: 700;
}

.event-nav-icon {
    width: 22px;
    text-align: center;
    font-size: 20px;
}

.event-sidebar-bottom {
    margin-top: auto;
}

.event-role-badge {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}

.event-role-dot,
.event-coming-soon span {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #79a987;
}

.event-back-link {
    display: block;
    padding: 10px 12px;
    color: var(--muted);
    text-decoration: none;
    font-size: 11px;
}

.event-back-link:hover {
    color: var(--green);
}


/* Main */

.event-main {
    width: min(100%, 1450px);
    min-width: 0;
    margin: 0 auto;
    padding: 36px 48px 24px;
}

.event-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.event-page-caption,
.event-section-label,
.event-welcome-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.13em;
}

.event-page-title {
    margin: 5px 0 0;
    color: var(--text);
    font-size: 25px;
    font-weight: 800;
}

.event-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding-right: 58px;
}

.event-user-avatar {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--green);
    color: var(--button-text);
    font-weight: 800;
}

.event-user-name {
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.event-user-role {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}


/* Welcome */

.event-welcome {
    position: relative;
    min-height: 245px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 36px 42px;
    margin-bottom: 36px;
    border-radius: 23px;
    background: linear-gradient(115deg, #414c45 0%, #64766a 100%);
    color: #ffffff;
}

.event-welcome-content {
    position: relative;
    z-index: 2;
    max-width: 570px;
}

.event-welcome-label {
    color: #c5d2c8;
}

.event-welcome h2 {
    margin: 14px 0 10px;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.event-welcome h2 span {
    font-size: 25px;
}

.event-welcome p {
    max-width: 470px;
    margin: 0 0 22px;
    color: #d5ded7;
    font-size: 13px;
    line-height: 1.7;
}

.event-primary-button {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    padding: 12px 17px;
    border-radius: 11px;
    background: #ffffff;
    color: #414c45;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.event-primary-button span {
    font-size: 17px;
}

.event-welcome-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 38%;
    height: 100%;
    opacity: 0.8;
}

.event-decoration-circle {
    position: absolute;
    top: 22px;
    right: 55px;
    width: 190px;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 100px;
}

.event-decoration-text {
    position: absolute;
    right: 83px;
    bottom: 37px;
    color: rgba(255, 255, 255, 0.24);
    font-size: 12px;
    line-height: 1.5;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-align: center;
}

.event-decoration-star {
    position: absolute;
    color: rgba(255, 255, 255, 0.7);
}

.star-one {
    top: 35px;
    right: 40px;
    font-size: 25px;
}

.star-two {
    top: 65px;
    right: 270px;
    font-size: 30px;
}

.star-three {
    bottom: 35px;
    right: 35px;
    font-size: 18px;
}


/* Statistics */

.event-section {
    margin-bottom: 34px;
}

.event-section-heading,
.event-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.event-section-heading h2,
.event-panel-heading h2 {
    margin: 5px 0 0;
    color: var(--text);
    font-size: 19px;
    font-weight: 800;
}

.event-period {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--muted);
    font-size: 10px;
}

.event-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.event-stat-card {
    min-width: 0;
    padding: 19px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--white);
}

.event-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.event-stat-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 19px;
    font-weight: 700;
}

.event-stat-icon.purple {
    background: #eee9f8;
    color: #8064ad;
}

.event-stat-icon.green {
    background: #e7f1e9;
    color: #548262;
}

.event-stat-icon.orange {
    background: #f8eee2;
    color: #b47c42;
}

.event-stat-icon.blue {
    background: #e7eef6;
    color: #5c7fa5;
}

.event-stat-mark {
    color: var(--muted);
    opacity: 0.55;
    font-size: 10px;
    font-weight: 800;
}

.event-stat-value {
    color: var(--text);
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.event-stat-title {
    margin-top: 5px;
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}

.event-stat-description {
    margin-top: 7px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}


/* Bottom panels */

.event-bottom-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 16px;
}

.event-panel,
.event-action-panel {
    min-width: 0;
    padding: 23px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--white);
}

.event-trophy {
    color: #b58b4f;
    font-size: 27px;
}

.event-empty-state {
    padding: 20px 10px 12px;
    text-align: center;
}

.event-empty-icon {
    margin-bottom: 10px;
    font-size: 35px;
}

.event-empty-state h3 {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.event-empty-state p {
    max-width: 300px;
    margin: 8px auto 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.event-action-panel {
    background: var(--soft-bg);
}

.event-action-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 13px;
    background: var(--white);
    color: var(--green);
    font-size: 23px;
}

.event-action-panel h2 {
    margin: 9px 0;
    color: var(--text);
    font-size: 19px;
    line-height: 1.35;
}

.event-action-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.7;
}

.event-coming-soon {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}


/* Footer */

.event-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 25px 2px 0;
    color: var(--muted);
    font-size: 10px;
}


/* Dark theme */

[data-theme="dark"] .event-welcome {
    background: linear-gradient(115deg, #303b34 0%, #465a4c 100%);
}

[data-theme="dark"] .event-stat-icon.purple {
    background: #393044;
    color: #c2a9e5;
}

[data-theme="dark"] .event-stat-icon.green {
    background: #2d4033;
    color: #a2c9aa;
}

[data-theme="dark"] .event-stat-icon.orange {
    background: #44382c;
    color: #e2b783;
}

[data-theme="dark"] .event-stat-icon.blue {
    background: #2e3b4b;
    color: #a7c4e5;
}


/* Responsive */

@media (max-width: 1100px) {
    .event-main {
        padding: 30px 28px 22px;
    }

    .event-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .event-layout {
        display: block;
    }

    .event-sidebar {
        width: 100%;
        min-height: auto;
        padding: 15px 18px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .event-brand {
        margin-bottom: 17px;
    }

    .event-sidebar-label,
    .event-sidebar-bottom {
        display: none;
    }

    .event-navigation {
        flex-direction: row;
        gap: 5px;
    }

    .event-nav-item {
        flex: 1;
        justify-content: center;
        padding: 10px 6px;
        font-size: 11px;
    }

    .event-nav-icon {
        width: auto;
        font-size: 16px;
    }

    .event-main {
        padding: 25px 17px;
    }

    .event-user {
        padding-right: 48px;
    }

    .event-welcome {
        min-height: 250px;
        padding: 28px 24px;
    }

    .event-welcome-decoration {
        opacity: 0.35;
    }

    .event-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .event-topbar {
        align-items: flex-start;
    }

    .event-user-info {
        display: none;
    }

    .event-page-title {
        font-size: 22px;
    }

    .event-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .event-stat-card {
        padding: 14px;
    }

    .event-stat-value {
        font-size: 23px;
    }

    .event-stat-title {
        font-size: 10px;
    }

    .event-stat-description {
        font-size: 9px;
    }

    .event-section-heading h2,
    .event-panel-heading h2 {
        font-size: 16px;
    }

    .event-welcome-decoration {
        display: none;
    }

    .event-footer {
        flex-direction: column;
    }
}

/* Плавное появление кабинета */
.event-sidebar {
    animation: revealLeft 0.7s ease both;
}

.event-topbar {
    animation: revealDown 0.6s ease 0.1s both;
}

.event-welcome {
    animation: revealUp 0.7s ease 0.15s both;
}

.event-stat-card {
    opacity: 0;
    animation: revealUp 0.6s ease both;
}

.event-stat-card:nth-child(1) { animation-delay: 0.25s; }
.event-stat-card:nth-child(2) { animation-delay: 0.35s; }
.event-stat-card:nth-child(3) { animation-delay: 0.45s; }
.event-stat-card:nth-child(4) { animation-delay: 0.55s; }

.event-section {
    animation: revealUp 0.7s ease 0.55s both;
}

.event-bottom-grid {
    animation: revealUp 0.7s ease 0.65s both;
}

.event-footer {
    animation: revealUp 0.6s ease 0.75s both;
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes revealDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes revealLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .event-sidebar,
    .event-topbar,
    .event-welcome,
    .event-stat-card,
    .event-section,
    .event-bottom-grid,
    .event-footer {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}