:root {
    --accent: #ff5500;
    --accent-hover: #e64a00;
    --bg: #111;
    --card: #1c1c1c;
    --text: #e0e0e0;
    --text-muted: #c2c8cf;
    --input-bg: #222;
    --input-border: #555;
}

* { scrollbar-width: thin; scrollbar-color: var(--accent) #1b1b1b; }
*::-webkit-scrollbar { width: 10px; }
*::-webkit-scrollbar-track { background: #1b1b1b; }
*::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #ff7a33, var(--accent)); border-radius: 10px; }

html, body { min-height: 100%; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Manrope', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar { background: rgba(20,20,20,0.85); backdrop-filter: blur(5px); }
.navbar-brand { color: white !important; font-weight: bold; }
.navbar-toggler { border-color: rgba(255,255,255,0.35); }
.navbar-toggler:focus { box-shadow: 0 0 0 0.2rem rgba(255, 85, 0, 0.35); }
.brand-logo {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 8px;
}

.telegram-link {
    color: #d9dee3;
    text-decoration: none;
    font-weight: 600;
}

.telegram-link:hover {
    color: #fff;
    text-decoration: underline;
}


.nav-username { color: #d9dee3; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-accent {
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    font-weight: 600;
    transition: background 0.3s;
}
.btn-accent:hover { background-color: var(--accent-hover); color: white; }

.card {
    background-color: var(--card);
    border-radius: 15px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(255,85,0,0.2); }

input, select, textarea {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text);
    border-radius: 8px;
    padding: 10px;
    width: 100%;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 0.15rem rgba(255, 85, 0, 0.25);
}

label, .helptext, .form-text, .text-muted { color: var(--text-muted) !important; }

input[type="file"]::file-selector-button {
    margin-right: 12px;
    border: 0;
    border-radius: 8px;
    padding: 8px 14px;
    color: white;
    font-weight: 600;
    background: linear-gradient(90deg, #ff6a1a, var(--accent));
}

.text-bg-secondary {
    color: #ececec !important;
    background-color: #4a4f57 !important;
}

.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text);
    border-radius: 8px;
    padding: 6px 10px;
    min-height: 48px;
}

.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.15rem rgba(255, 85, 0, 0.25);
}

.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--multiple .select2-selection__rendered { color: var(--text); }

.select2-container--default .select2-selection--single .select2-selection__placeholder,
.select2-container--default .select2-selection--multiple .select2-selection__placeholder { color: var(--text-muted); }

.select2-container--default .select2-results > .select2-results__options {
    background-color: var(--card);
    color: var(--text);
}

.select2-container--default .select2-results__option {
    padding: 8px 12px;
    color: var(--text);
}

.select2-container--default .select2-results__option--highlighted {
    background-color: rgba(255,85,0,0.2);
    color: var(--text);
}

.select2-container--default .select2-results__option--selected {
    background-color: rgba(255, 85, 0, 0.22);
    color: var(--text);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.9rem;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: rgba(255,255,255,0.8);
    margin-right: 0;
    font-size: 1rem;
    line-height: 1;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover { color: #fff; }

.main-content { margin-top: 80px; margin-bottom: 50px; flex: 1 0 auto; }

.feature-title { color: #f2f4f7; }

.hero-card {
    background: radial-gradient(120% 120% at 10% 0%, rgba(255, 85, 0, 0.24), rgba(28, 28, 28, 0.95));
    border: 1px solid rgba(255, 85, 0, 0.35);
    border-radius: 18px;
}

.home-title { font-weight: 800; }

.page-title {
    color: var(--accent);
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-title-lg { font-size: 2.5rem; }
.page-title-md { font-size: 2.3rem; }

.auth-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 25px;
    background: var(--card);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(255,85,0,0.2);
}

.login-card { border: 1px solid rgba(255,85,0,0.25); }

.session-form {
    max-width: 760px;
    margin: 0 auto;
    padding: 28px;
    background: var(--card);
    border: 1px solid rgba(255,85,0,0.28);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(255,85,0,0.18);
}

.archive-current {
    background: #111;
    color: #ddd;
    border: 1px solid rgba(255,255,255,.12);
}

.archive-upload {
    background: #202020;
    border: 1px dashed rgba(255,85,0,0.45);
    border-radius: 12px;
}

.progress-wrapper { display: none; }
.progress-track {
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    height: 22px;
}
.progress-bar-custom {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff6a1a, var(--accent));
    transition: width 0.2s;
}

.session-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    gap: 30px;
}

.session-card-title { color: var(--accent); }

.archive-card { border: 1px solid rgba(255,85,0,.35); }

.inline-form { display: inline; }

.site-footer {
    background: #1a1a1a;
    border-top: 1px solid rgba(255, 85, 0, 0.25);
    padding: 44px 0;
    margin-top: auto;
}

.site-footer .address {
    color: #e5e5e5;
    text-align: center;
}

.site-footer .address p { margin-bottom: 8px; }

.site-footer .map-embed {
    height: 320px;
    margin-top: 24px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
}

.footer-bottom {
    margin-top: 28px;
    text-align: center;
    color: #b6b6b6;
    font-size: 0.95rem;
}

.author-link {
    color: #d8d8d8;
    text-decoration: underline dotted;
    transition: color .25s ease;
}

.author-link:hover { color: var(--accent); }

@media (max-width: 991px) {
    .nav-actions {
        margin-top: 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .nav-actions .btn,
    .nav-actions .telegram-link {
        width: 100%;
        text-align: center;
        margin-right: 0 !important;
    }

    .main-content { margin-top: 96px; }
}

@media (max-width: 768px) {
    .site-footer .map-embed { height: 260px; }
    .hero-card { padding: 1.5rem !important; }
    .page-title-lg { font-size: 2rem; }
    .page-title-md { font-size: 1.85rem; }
    .session-form,
    .auth-form { padding: 18px; }
    .session-grid { gap: 16px; }
}
