/* DARK THEME COMPACT DESIGN */
:root {
    --bg-primary: #1a0f2f;
    --bg-secondary: #2b0047;
    --bg-tertiary: #620098;
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --text-muted: #ffffff;
    --accent-primary: #a47bff;
    --accent-secondary: #a47bff;
    --accent-success: #a47bff;
    --accent-warning: #f39c12;
    --accent-danger: #e74c3c;
    --border-color: #2b0047;
    --shadow-dark: rgba(0, 0, 0, 0.5);
    --container-width: 1400px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    
    color: var(--text-primary);
    min-height: 100vh;
    padding: 0;
    font-size: 14px;
    overflow-x: hidden;
}

/* Основной контейнер */
.main-wrapper {
    width: 100%;
    min-height: 100vh;
    
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* Навигация */
.main-nav {
    background: #1a0f2f;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: #ffffffff;
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.logo a:hover {
    color: #fff;
}

/* Главный контейнер с приложением */
.app-main-container {
    max-width: var(--container-width);
    margin: 20px auto;
    padding: 0 15px;
}

.app-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    width: 100%;
}

/* Боковая панель с заявками */
.sidebar {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px var(--shadow-dark);
    height: calc(100vh - 100px);
}

.sidebar-header {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.sidebar-header p {
    color: var(--text-muted);
    font-size: 13px;
}

.applications-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 5px;
}

.application-item {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    position: relative;
}

.application-item:hover {
    background: #343450;
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.app-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}

.status-pending {
    background: rgba(243, 156, 18, 0.2);
    color: var(--accent-warning);
}

.status-approved {
    background: rgba(46, 204, 113, 0.2);
    color: var(--accent-success);
}

.status-rejected {
    background: rgba(231, 76, 60, 0.2);
    color: var(--accent-danger);
}

.app-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.app-comment {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(231, 76, 60, 0.1);
    border: none;
    color: var(--accent-danger);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: var(--accent-danger);
    color: white;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 36px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Основной контент */
.main-content {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    height: calc(100vh - 100px);
}

.form-section, .info-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px var(--shadow-dark);
    overflow-y: auto;
}

.section-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.section-header h1 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 13px;
}

/* Форма */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.rules-group {
    margin: 25px 0;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.rules-question {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin-bottom: 12px;
    font-size: 13px;
}

.radio-group {
    display: flex;
    gap: 15px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.submit-btn {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: all 0.2s ease;
    margin-top: 15px;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
}

/* Информационный блок */
.info-card {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.info-card.warning {
    background: rgba(243, 156, 18, 0.1);
    border-color: rgba(243, 156, 18, 0.3);
    color: var(--accent-warning);
}

.info-list {
    list-style: none;
}

.info-list li {
    padding: 8px 0 8px 24px;
    position: relative;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

.info-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-success);
    font-weight: bold;
}

.info-list li + li {
    border-top: 1px solid var(--border-color);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 30, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: var(--bg-tertiary);
    color: var(--accent-danger);
}

#modalContent {
    padding: 20px;
}

.modal-field {
    margin-bottom: 15px;
}

.modal-field label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    display: block;
    margin-bottom: 5px;
}

.modal-field .value {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 14px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    min-height: 40px;
}

.modal-actions {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

.btn-danger {
    background: rgba(231, 76, 60, 0.2);
    color: var(--accent-danger);
    border: 1px solid rgba(231, 76, 60, 0.3);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: var(--accent-danger);
    color: white;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 15px;
    right: 15px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    font-size: 13px;
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.notification.show {
    display: flex;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: var(--accent-success);
}

.notification.error {
    background: var(--accent-danger);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Иконки */
.icon {
    color: var(--accent-primary);
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Адаптивность */
@media (max-width: 1400px) {
    .container,
    .nav-container,
    .app-main-container {
        max-width: 100%;
        padding: 0 15px;
    }
}

@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sidebar {
        height: 400px;
        order: 2;
    }
    
    .main-content {
        height: auto;
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .app-main-container {
        margin: 10px auto;
        padding: 0 10px;
    }
    
    .app-container {
        gap: 10px;
    }
    
    .sidebar, .form-section, .info-section {
        padding: 15px;
    }
    
    .modal-content {
        width: 95%;
    }
}

/* Загрузка */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-muted);
}

.loading i {
    font-size: 32px;
    margin-bottom: 15px;
}

/* Футер (если нужен) */
.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    margin-top: 30px;
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}