* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.4;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: -0.2px;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
    background: #1a1a1a;
}

/* Страница логина */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #111;
    padding: 20px;
}

.login-card {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 32px 24px;
    width: 100%;
    max-width: 380px;
}

.login-card h1 {
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.subtitle {
    text-align: center;
    color: #888;
    font-size: 12px;
    margin-bottom: 24px;
}

/* Формы */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #333;
    border-radius: 3px;
    font-size: 14px;
    background: #252525;
    color: #e0e0e0;
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #555;
    background: #2a2a2a;
}

.form-group input::placeholder {
    color: #666;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #ccc;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #888;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #444;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s, border-color 0.15s;
    background: #2a2a2a;
    color: #ccc;
    letter-spacing: 0.2px;
}

.btn:active {
    background: #333;
}

.btn-primary {
    background: #3a3a3a;
    border-color: #555;
    color: #fff;
}

.btn-primary:active {
    background: #4a4a4a;
}

.btn-success {
    background: #1a3a2a;
    border-color: #2d5a3d;
    color: #4ecb71;
}

.btn-success:active {
    background: #1f422f;
}

.btn-danger {
    background: #3a1a1a;
    border-color: #5a2d2d;
    color: #e05d5d;
}

.btn-danger:active {
    background: #421f1f;
}

.btn-warning {
    background: #3a2e1a;
    border-color: #5a462d;
    color: #e0a85d;
}

.btn-warning:active {
    background: #42341f;
}

.btn-outline {
    background: transparent;
    color: #999;
    border-color: #444;
}

.btn-outline:active {
    background: #252525;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 2px;
}

.btn-full {
    width: 100%;
    padding: 11px;
    font-size: 13px;
}

/* Алерты */
.alert {
    padding: 10px 12px;
    border-radius: 3px;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 500;
}

.alert-error {
    background: #2a1515;
    color: #e05d5d;
    border: 1px solid #3a2020;
}

.alert-success {
    background: #152a1a;
    color: #4ecb71;
    border: 1px solid #203a25;
}

/* Карточки */
.card {
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 3px;
    padding: 14px;
    margin-bottom: 10px;
}

/* Header */
.header {
    background: #1e1e1e;
    border-bottom: 1px solid #2a2a2a;
    padding: 12px 14px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-info h2 {
    font-size: 14px;
    font-weight: 500;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Табы */
.tabs {
    display: flex;
    gap: 1px;
    background: #1e1e1e;
    border-bottom: 1px solid #2a2a2a;
    padding: 0 14px;
}

.tab {
    padding: 10px 16px;
    text-decoration: none;
    color: #888;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.tab.active {
    color: #fff;
    border-bottom-color: #888;
}

/* Заявки */
.expenses-list {
    padding: 10px 14px 20px;
}

.expenses-list h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 10px;
    padding: 0;
}

.expense-card {
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 3px;
    padding: 12px;
    margin-bottom: 6px;
    border-left: 3px solid #444;
}

.status-new {
    border-left-color: #4a90d9;
}

.status-approved {
    border-left-color: #3d8b40;
    background: #1a221a;
}

.status-rejected {
    border-left-color: #8b3d3d;
    opacity: 0.45;
    filter: grayscale(40%);
}

.status-postponed {
    border-left-color: #c7913d;
    background: #221e1a;
}

.expense-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 4px;
}

.expense-date {
    font-size: 11px;
    color: #777;
}

.direction-badge {
    font-size: 10px;
    background: #252525;
    padding: 2px 6px;
    border-radius: 2px;
    color: #999;
    border: 1px solid #333;
}

.expense-status {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 2px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-new .expense-status {
    background: #1a2a3a;
    color: #6ea8e0;
}

.status-approved .expense-status {
    background: #1a2a1a;
    color: #5cb85c;
}

.status-rejected .expense-status {
    background: #2a1a1a;
    color: #c95b5b;
}

.status-postponed .expense-status {
    background: #2a241a;
    color: #c9a05b;
}

.expense-body {
    margin-bottom: 8px;
}

.expense-amount {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #fff;
}

.expense-desc {
    font-size: 13px;
    color: #aaa;
}

.urgent-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #e05d5d;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.postponed-info {
    font-size: 11px;
    color: #c9a05b;
    margin-bottom: 6px;
}

.admin-comment {
    font-size: 11px;
    color: #888;
    background: #222;
    padding: 6px 10px;
    border-radius: 2px;
    margin-bottom: 6px;
    border-left: 2px solid #444;
}

.action-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.modal-form {
    background: #222;
    padding: 10px;
    border-radius: 2px;
    margin-top: 8px;
    border: 1px solid #333;
}

.delete-form {
    margin-top: 8px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 13px;
}

/* Направления */
.direction-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.direction-info {
    font-size: 13px;
    color: #ccc;
}

.direction-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* Создание заявки */
.create-card {
    margin: 10px 14px;
}

.create-card h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 12px;
}

/* Фильтры */
.filters {
    margin: 10px 14px;
    padding: 12px;
}

.admin-link {
    text-align: center;
    margin-top: 16px;
}

.admin-link a {
    color: #888;
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
}

.admin-link a:hover {
    color: #bbb;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

input[type="date"] {
    color-scheme: dark;
}

/* Стили для мобильных */
@media (max-width: 400px) {
    .container {
        padding: 0;
    }
    
    .expense-amount {
        font-size: 16px;
    }
    
    .expense-desc {
        font-size: 12px;
    }
}