/* ============================================================
   Multi Calendar System v2 — components.css
   UI-компоненты. Адаптив под мобилки. «Чётко видно, удобно».
   ============================================================ */

/* ------------------------------------------------------------
   1. КНОПКИ
   ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    min-height: 44px;             /* стандарт тапа */
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}
.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.4);
    text-decoration: none;
    color: #fff;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #fff;
    color: #333;
    border-color: #d0d0d0;
}
.btn-secondary:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #999;
    color: #333;
    text-decoration: none;
}

.btn-danger {
    background: #c62828;
    color: #fff;
    border-color: #c62828;
}
.btn-danger:hover:not(:disabled) {
    background: #a01f1f;
    border-color: #a01f1f;
    color: #fff;
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: #1976d2;
    border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
    background: #e3f2fd;
    color: #1565c0;
    text-decoration: none;
}

.btn-sm {
    padding: 8px 14px;
    min-height: 36px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    min-height: 52px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 10px;
    width: 44px;
    height: 44px;
    min-height: 44px;
}
.btn-icon.btn-sm {
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 6px;
}

/* ------------------------------------------------------------
   2. ФОРМЫ
   ------------------------------------------------------------ */
.form-group {
    margin-bottom: 18px;
}

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

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

.label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.label-required::after {
    content: " *";
    color: #c62828;
}

.input,
.textarea,
.select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #d0d0d0;
    border-radius: 10px;
    background: #fff;
    color: #1a1a1a;
    font-size: 16px;              /* 16px — чтобы iOS не зумил */
    min-height: 48px;
    transition: all 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.select {
    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='%23666' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.15);
}

.input::placeholder,
.textarea::placeholder {
    color: #999;
}

.textarea {
    min-height: 100px;
    line-height: 1.5;
}

.input.error,
.textarea.error,
.select.error {
    border-color: #c62828;
}
.input.error:focus,
.textarea.error:focus,
.select.error:focus {
    box-shadow: 0 0 0 4px rgba(198, 40, 40, 0.15);
}

.form-error {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #c62828;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #666;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 15px;
}
.checkbox input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: #1976d2;
    cursor: pointer;
}

/* ------------------------------------------------------------
   3. КАРТОЧКИ
   ------------------------------------------------------------ */
.card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.2s ease;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fafafa;
}

.card-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 14px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.card-hover {
    transition: all 0.2s;
    cursor: pointer;
}
.card-hover:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #1976d2;
}

/* Мобильный вид карточки */
@media (max-width: 768px) {
    .card-body { padding: 16px; }
    .card-header { padding: 14px 16px; }
}

/* ------------------------------------------------------------
   4. БЕЙДЖИ
   ------------------------------------------------------------ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}

.badge-status-new         { background: #e3f2fd; color: #0d47a1; }
.badge-status-in_progress { background: #fff8e1; color: #e65100; }
.badge-status-completed   { background: #e8f5e9; color: #1b5e20; }
.badge-status-cancelled   { background: #ffebee; color: #b71c1c; }

.badge-priority-low    { background: #e8f5e9; color: #1b5e20; }
.badge-priority-medium { background: #fff8e1; color: #e65100; }
.badge-priority-high   { background: #ffebee; color: #b71c1c; }

.badge-role-admin    { background: #ffebee; color: #b71c1c; }
.badge-role-operator { background: #fff8e1; color: #e65100; }
.badge-role-employee { background: #e8f5e9; color: #1b5e20; }

.badge-muted {
    background: #f0f0f0;
    color: #555;
}

/* ------------------------------------------------------------
   5. ТАБЛИЦЫ
   ------------------------------------------------------------ */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.table thead {
    background: #f5f5f5;
}

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.table th {
    font-weight: 700;
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.table tbody tr:hover {
    background: #fafafa;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Мобильный вид — карточки вместо таблицы */
@media (max-width: 768px) {
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td {
        display: block;
        width: 100%;
    }
    .table tr {
        background: #fff;
        border: 1px solid #e8e8e8;
        border-radius: 10px;
        padding: 12px;
        margin-bottom: 10px;
    }
    .table td {
        padding: 6px 0;
        border: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }
    .table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #666;
        font-size: 12px;
        text-transform: uppercase;
        flex-shrink: 0;
    }
    .table td:empty { display: none; }
}

/* ------------------------------------------------------------
   6. МОДАЛКИ
   ------------------------------------------------------------ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease;
    backdrop-filter: blur(2px);
}

.modal {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.25s ease;
    overflow: hidden;
}

.modal.modal-lg { max-width: 900px; }
.modal.modal-sm { max-width: 420px; }

.modal-header {
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: #f5f5f5;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.modal-close:hover {
    background: #e0e0e0;
    color: #1a1a1a;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    background: #fafafa;
}

/* Мобильный вид — модалка на весь экран */
@media (max-width: 600px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    .modal {
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
        animation: slideUpMobile 0.3s ease;
    }
    .modal-footer {
        flex-direction: column-reverse;
    }
    .modal-footer .btn {
        width: 100%;
    }
}

@keyframes slideUpMobile {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* ------------------------------------------------------------
   7. TOAST
   ------------------------------------------------------------ */
#toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    padding: 14px 18px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    background: #fff;
    border-left: 4px solid #1976d2;
    font-size: 15px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 280px;
}

@keyframes slideIn {
    from { transform: translateX(120%); }
    to   { transform: translateX(0); }
}

.toast-success { border-left-color: #2e7d32; background: #e8f5e9; color: #1b5e20; }
.toast-error   { border-left-color: #c62828; background: #ffebee; color: #b71c1c; }
.toast-warning { border-left-color: #ed6c02; background: #fff3e0; color: #e65100; }
.toast-info    { border-left-color: #1976d2; background: #e3f2fd; color: #0d47a1; }

.toast-text { flex: 1; }
.toast-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    opacity: 0.6;
    padding: 0 4px;
}
.toast-close:hover { opacity: 1; }

@media (max-width: 600px) {
    #toast-container {
        top: 8px;
        left: 8px;
        right: 8px;
        max-width: none;
    }
}

/* ------------------------------------------------------------
   8. SPINNER
   ------------------------------------------------------------ */
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #e0e0e0;
    border-top-color: #1976d2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-lg { width: 44px; height: 44px; border-width: 4px; }

.loading-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    gap: 12px;
    color: #666;
}

/* ------------------------------------------------------------
   9. EMPTY STATE
   ------------------------------------------------------------ */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #666;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.empty-state-text {
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ------------------------------------------------------------
   10. ПОИСК
   ------------------------------------------------------------ */
.search-input {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input input {
    width: 100%;
    padding-left: 44px;
}

.search-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
    pointer-events: none;
}

.search-input-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #f0f0f0;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-input-clear:hover {
    background: #e0e0e0;
    color: #1a1a1a;
}

/* ------------------------------------------------------------
   11. ТАБЫ
   ------------------------------------------------------------ */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
    padding: 14px 20px;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: all 0.15s;
    font-size: 15px;
    margin-bottom: -2px;
}

.tab:hover {
    color: #1a1a1a;
    background: #fafafa;
}

.tab.active {
    color: #1976d2;
    border-bottom-color: #1976d2;
    background: #e3f2fd;
}

@media (max-width: 600px) {
    .tab { padding: 12px 14px; font-size: 14px; }
}

/* ------------------------------------------------------------
   12. ПАГИНАЦИЯ
   ------------------------------------------------------------ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination-info {
    color: #666;
    font-size: 14px;
    margin-right: 12px;
}

.pagination-btn {
    padding: 8px 14px;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.15s;
    min-width: 40px;
    min-height: 40px;
    color: #333;
}

.pagination-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #999;
}

.pagination-btn.active {
    background: #1976d2;
    color: #fff;
    border-color: #1976d2;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ------------------------------------------------------------
   13. ТАЙМЕР
   ------------------------------------------------------------ */
.timer-block {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf3 100%);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
}

.timer-display {
    font-family: var(--font-mono);
    font-size: 42px;
    font-weight: 800;
    color: #1976d2;
    letter-spacing: 0.05em;
    text-align: center;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(25, 118, 210, 0.1);
}

.timer-display.running {
    color: #c62828;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.6; }
}

.timer-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.timer-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.timer-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    flex-wrap: wrap;
}

.timer-entry-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 140px;
}

.timer-entry-duration {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 15px;
}

.timer-entry-amount {
    color: #1976d2;
    font-weight: 700;
}

.timer-entry-actions {
    display: flex;
    gap: 6px;
}

@media (max-width: 600px) {
    .timer-display { font-size: 32px; }
    .timer-controls { flex-direction: column; }
    .timer-controls .btn { width: 100%; }
}

/* ------------------------------------------------------------
   14. ИСТОРИЯ
   ------------------------------------------------------------ */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    padding: 14px 16px;
    background: #fafafa;
    border-left: 4px solid #1976d2;
    border-radius: 8px;
    font-size: 14px;
}

.history-item-date {
    color: #666;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

.history-item-changes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.history-change {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
}

.history-old {
    color: #999;
    text-decoration: line-through;
}

.history-new {
    color: #1a1a1a;
    font-weight: 700;
}

/* ------------------------------------------------------------
   15. КОММЕНТАРИИ
   ------------------------------------------------------------ */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 14px;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 700;
    font-size: 14px;
    color: #1a1a1a;
}

.comment-date {
    color: #999;
    font-size: 12px;
}

.comment-content {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.comment-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.comment-replies {
    margin-left: 52px;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-left: 2px solid #e0e0e0;
    padding-left: 14px;
}

@media (max-width: 600px) {
    .comment-replies { margin-left: 20px; }
}

/* ------------------------------------------------------------
   16. КАРТОЧКИ КЛИЕНТА / ЗАДАЧИ
   ------------------------------------------------------------ */
.client-card,
.task-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.client-card:hover,
.task-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #1976d2;
}

.client-card-header,
.task-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.client-name,
.task-title {
    font-weight: 700;
    font-size: 16px;
    margin: 0;
    word-break: break-word;
    color: #1a1a1a;
}

.client-phone,
.task-meta {
    color: #666;
    font-size: 14px;
    margin-top: 4px;
    word-break: break-word;
}

.task-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 13px;
}

/* ------------------------------------------------------------
   17. ПРОЧЕЕ
   ------------------------------------------------------------ */
.divider {
    height: 1px;
    background: #f0f0f0;
    margin: 20px 0;
    border: none;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    background: #f5f5f5;
    color: #555;
    font-size: 13px;
    font-weight: 500;
}

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    border-left: 4px solid;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 500;
}
.alert-info    { background: #e3f2fd; border-left-color: #1976d2; color: #0d47a1; }
.alert-success { background: #e8f5e9; border-left-color: #2e7d32; color: #1b5e20; }
.alert-warning { background: #fff3e0; border-left-color: #ed6c02; color: #e65100; }
.alert-danger  { background: #ffebee; border-left-color: #c62828; color: #b71c1c; }

/* ------------------------------------------------------------
   18. МОБИЛЬНЫЙ: КРУПНЕЕ ВСЁ
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    /* Кнопки — на всю ширину для главных действий */
    .page-actions .btn {
        flex: 1;
        min-width: auto;
    }

    /* Карточки задач — крупнее */
    .task-card, .client-card {
        padding: 14px;
    }
    .task-title, .client-name {
        font-size: 15px;
    }

    /* Бейджи — крупнее */
    .badge {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* Кнопки-иконки — крупнее */
    .btn-icon {
        width: 44px;
        height: 44px;
    }

    /* Формы — крупнее */
    .label {
        font-size: 15px;
    }

    /* Модалка — снизу */
    .modal-footer .btn {
        min-height: 48px;
    }
}

/* ------------------------------------------------------------
   19. BOTTOM-NAV (мобилка)
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .app-container {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0));
    }
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    padding-bottom: env(safe-area-inset-bottom, 0);
    display: none;
}

@media (max-width: 768px) {
    .bottom-nav { display: block; }
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 64px;
    max-width: 600px;
    margin: 0 auto;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px;
    color: #999;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
    min-height: 52px;
}

.bottom-nav-item:hover {
    text-decoration: none;
    color: #1976d2;
}

.bottom-nav-item.active {
    color: #1976d2;
    background: #e3f2fd;
    border-radius: 8px;
    margin: 6px 4px;
}

.bottom-nav-icon {
    font-size: 22px;
    line-height: 1;
}

.bottom-nav-label {
    font-size: 11px;
    font-weight: 600;
}

/* ------------------------------------------------------------
   20. СТАТИСТИКА (дашборд) — градиентные карточки
   ------------------------------------------------------------ */
.stat-card {
    color: white;
    padding: 20px;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-card-icon {
    font-size: 32px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.stat-card-number {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.stat-card-label {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.stat-card-blue    { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-card-green   { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.stat-card-orange  { background: linear-gradient(135deg, #fdbb2d 0%, #22c1c3 100%); }
.stat-card-pink    { background: linear-gradient(135deg, #fc466b 0%, #3f5efb 100%); }