* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url('/static/backgroung.jpg');
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
    color: #e0e0e0;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 30, 0.6);
    z-index: -1;
    pointer-events: none;
}

/* Для страницы входа - центрируем содержимое */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
}

body.login-page .container {
    max-width: 500px;
    width: 100%;
    position: relative;
    z-index: 1;
}


.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: rgba(30, 30, 46, 0.95);
    padding: 18px 24px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    text-align: left;
    border: 1px solid rgba(45, 45, 61, 0.8);
    backdrop-filter: blur(12px);
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-user {
    color: #9aa4c7;
    font-size: 0.9em;
    font-weight: 500;
    margin-right: 4px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    background: rgba(15, 15, 30, 0.6);
    color: #e2e8f0;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.nav-link:hover {
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.6);
    color: #ffffff;
}

.nav-link.active {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-color: rgba(99, 102, 241, 0.8);
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.35);
}

.nav-link.danger {
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.nav-link.danger:hover {
    border-color: rgba(239, 68, 68, 0.7);
    color: #ffffff;
}

.nav-burger {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    font-size: 1.2em;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
}

header h1 {
    color: #f8fafc;
    margin-bottom: 6px;
    font-size: 2.1em;
    letter-spacing: 0.5px;
}

.subtitle {
    color: #9aa4c7;
    font-size: 1.05em;
}

@media (max-width: 900px) {
    .header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-info {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-burger {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 0 4px;
    }

    .nav-links.open {
        display: flex;
    }
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Левая колонка - Форма */
.left-column .form-section {
    background: #1e1e2e;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid #2d2d3d;
}

.form-section h2 {
    color: #e0e0e0;
    margin-bottom: 25px;
    font-size: 1.8em;
    border-bottom: 3px solid #6366f1;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #d0d0d0;
    font-weight: 600;
    font-size: 0.95em;
}

.form-hint {
    display: block;
    margin-top: 6px;
    color: #9aa4c7;
    font-size: 0.85em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #2d2d3d;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.95em;
    transition: border-color 0.3s;
    background: #2a2a3a;
    color: #e0e0e0;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #7a7a8a;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Кнопки */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: #6366f1;
    color: white;
    width: 100%;
    margin-top: 15px;
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: #3d3d4d;
    color: #e0e0e0;
}

.btn-secondary:hover {
    background: #4a4a5a;
    transform: translateY(-2px);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

.btn-delete {
    background: #ef4444;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}

.btn-delete:hover {
    background: #dc2626;
}

/* Профиль */
.profile-shell {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 30, 46, 0.95);
    border: 1px solid rgba(45, 45, 61, 0.8);
    border-radius: 16px;
    padding: 18px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.panel-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.panel-tab {
    flex: 1;
    padding: 12px 16px;
    background: #1e1e2e;
    border: 1px solid #2d2d3d;
    border-radius: 8px;
    color: #b0b0b0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.panel-tab.active {
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-color: rgba(99, 102, 241, 0.8);
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.35);
}

.panel-tab:hover {
    color: #e0e0e0;
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.4);
}

.panel-content {
    display: none;
}

.panel-content.active {
    display: block;
    animation: panelFade 0.3s ease-out;
}

@keyframes panelFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.slot-card-public {
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.95) 0%, rgba(22, 22, 32, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.slot-card-public h3 {
    color: #e0e0e0;
    margin-bottom: 6px;
    font-size: 1.05em;
}

.slot-card-public p {
    color: #b0b0b0;
    font-size: 0.9em;
}

.slot-card-public::after {
    content: '● Свободно';
    color: #22c55e;
    font-weight: 600;
    font-size: 0.85em;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.slot-card-public:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.35);
}

@media (max-width: 520px) {
    .panel-tabs {
        flex-direction: column;
    }

    .slot-card-public {
        flex-direction: column;
        align-items: flex-start;
    }
}
    position: sticky;
    top: 20px;
    z-index: 5;
    backdrop-filter: blur(12px);
}

.profile-brand {
    font-size: 1.2em;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.5px;
}

.profile-nav {
    display: flex;
    gap: 16px;
    align-items: center;
}

.profile-nav a {
    color: #cbd5f5;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.profile-nav a:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #ffffff;
}

.profile-nav a.active {
    background: rgba(99, 102, 241, 0.25);
    color: #ffffff;
}

.profile-nav a.danger {
    color: #fca5a5;
}

.profile-nav a.danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.burger {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    font-size: 1.2em;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
}

.profile-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

.profile-identity,
.profile-bio {
    background: rgba(30, 30, 46, 0.92);
    border: 1px solid rgba(45, 45, 61, 0.8);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.profile-identity {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: center;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #6366f1 0%, #22c55e 100%);
    display: grid;
    place-items: center;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-fallback {
    font-size: 2.2em;
    font-weight: 700;
    color: #0f172a;
}

.profile-title h1 {
    font-size: 2em;
    margin-bottom: 6px;
}

.profile-title p {
    color: #9aa4c7;
    font-size: 0.95em;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8em;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.2);
    color: #c7d2fe;
    border: 1px solid rgba(99, 102, 241, 0.4);
}

.badge.owner {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.4);
}

.badge.admin {
    background: rgba(168, 85, 247, 0.2);
    color: #e9d5ff;
    border-color: rgba(168, 85, 247, 0.4);
}

.badge.worker {
    background: rgba(34, 197, 94, 0.2);
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.4);
}

.badge.guest {
    background: rgba(59, 130, 246, 0.2);
    color: #bfdbfe;
    border-color: rgba(59, 130, 246, 0.4);
}

.badge.muted {
    background: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.35);
    font-weight: 500;
}

.profile-bio h3 {
    margin-bottom: 10px;
    color: #cbd5f5;
}

.profile-bio p {
    color: #d3d7e6;
    line-height: 1.6;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.profile-card {
    background: rgba(30, 30, 46, 0.92);
    border: 1px solid rgba(45, 45, 61, 0.8);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.profile-card h2 {
    margin-bottom: 16px;
    color: #cbd5f5;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    background: rgba(15, 15, 30, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-label {
    color: #a5b4fc;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.stat-value {
    font-family: 'JetBrains Mono', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.6em;
    color: #f8fafc;
}

.stat-value.small {
    font-size: 0.95em;
}

.profile-form .btn-primary {
    width: auto;
    margin-top: 10px;
}

@media (max-width: 1024px) {
    .profile-hero {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .burger {
        display: inline-flex;
    }

    .profile-nav {
        position: absolute;
        top: calc(100% + 12px);
        right: 24px;
        background: rgba(20, 20, 36, 0.95);
        border: 1px solid rgba(45, 45, 61, 0.8);
        border-radius: 14px;
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        display: none;
        min-width: 180px;
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
    }

    .profile-nav.open {
        display: flex;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .profile-identity {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-avatar {
        margin: 0 auto;
    }

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

/* Сообщения */
.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 5px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.message:not(:empty) {
    display: block;
}

.message.success {
    background: #1b4d2a;
    color: #86efac;
}

.message.error {
    background: #4d1b1b;
    color: #fca5a5;
}

/* Правая колонка - Список */
.right-column {
    display: flex;
    flex-direction: column;
    background: #1e1e2e;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid #2d2d3d;
}

.actions-bar {
    margin-bottom: 25px;
}

.actions-bar h2 {
    color: #e0e0e0;
    margin-bottom: 15px;
    font-size: 1.8em;
    border-bottom: 3px solid #6366f1;
    padding-bottom: 10px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    flex: 1;
    min-width: 150px;
}

/* Список кандидатов */
.applicants-list {
    flex: 1;
    overflow-y: auto;
    max-height: 800px;
}

.applicant-card {
    background: #252530;
    border: 2px solid #2d2d3d;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.applicant-card:hover {
    border-color: #6366f1;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
    background: #2a2a35;
}

.applicant-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.applicant-header h3 {
    color: #6366f1;
    font-size: 1.2em;
    margin: 0;
    word-break: break-word;
}

.applicant-card p {
    color: #c0c0c0;
    margin-bottom: 10px;
    line-height: 1.5;
    word-break: break-word;
}

.applicant-card strong {
    color: #e0e0e0;
}

.position {
    color: #6366f1;
    font-weight: 600;
    font-size: 1.05em;
}

.date {
    font-size: 0.85em;
    color: #7a7a8a;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #2d2d3d;
}

.loading,
.empty {
    text-align: center;
    color: #7a7a8a;
    padding: 40px 20px;
    font-size: 1.1em;
}

.empty {
    color: #6a6a7a;
}

/* Расширенный скролл (красивый скролл) */
.applicants-list::-webkit-scrollbar {
    width: 8px;
}

.applicants-list::-webkit-scrollbar-track {
    background: #1a1a2a;
    border-radius: 10px;
}

.applicants-list::-webkit-scrollbar-thumb {
    background: #6366f1;
    border-radius: 10px;
}

.applicants-list::-webkit-scrollbar-thumb:hover {
    background: #4f46e5;
}

/* Адаптивный дизайн */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        min-width: auto;
    }

    .main-content {
        gap: 20px;
    }

    .left-column .form-section,
    .right-column {
        padding: 20px;
    }
}

/* Анимации */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.applicant-card {
    animation: slideIn 0.3s ease-out;
}
