/* ─────────────────────────────────────────────
   Fix Веселинове — основні стилі додатку
   ───────────────────────────────────────────── */

/* ── CSS змінні бренду ── */
:root {
    --fix-primary: #19bcc9;
    --fix-primary-dark: #0e9aa6;
    --fix-primary-light: #e8f9fb;
    --fix-sidebar-bg: #0f1923;
    --fix-sidebar-width: 240px;
    --fix-font: 'Segoe UI', system-ui, sans-serif;
}

/* ── Base ── */
html,
body {
    height: 100%;
    margin: 0;
    font-family: var(--fix-font);
}

body {
    background: #f5f7fa;
}

/* ─────────────────────────────────────────────
   Layout
   ───────────────────────────────────────────── */

.fix-layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.fix-sidebar {
    width: var(--fix-sidebar-width);
    background: var(--fix-sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.fix-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fix-brand-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 10px;
    background: transparent;
}

.fix-logo-icon {
    font-size: 28px;
}

.fix-logo-title {
    color: var(--fix-primary);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
}

.fix-logo-sub {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
}

.fix-nav-list {
    list-style: none;
    padding: 12px 8px;
    margin: 0;
    flex: 1;
}

.fix-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
    margin-bottom: 2px;
}

    .fix-nav-link:hover {
        background: rgba(25, 188, 201, 0.12);
        color: var(--fix-primary);
    }

    .fix-nav-link.active {
        background: rgba(25, 188, 201, 0.18);
        color: var(--fix-primary);
    }

.fix-nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.fix-sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.fix-user-name {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
}

.fix-user-role {
    color: var(--fix-primary);
    font-size: 11px;
}

.fix-btn-logout {
    margin-top: 8px;
    width: 100%;
    padding: 6px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    cursor: pointer;
    transition: 0.15s;
}

    .fix-btn-logout:hover {
        background: rgba(220, 53, 69, 0.25);
        color: #ffffff;
    }

/* ── Main content ── */
.fix-content {
    flex: 1;
    padding: 24px;
    background: #f5f7fa;
    overflow-y: auto;
    min-width: 0;
}

/* ─────────────────────────────────────────────
   Page header
   ───────────────────────────────────────────── */

.page-header {
    margin-bottom: 20px;
}

    .page-header h1 {
        font-size: 24px;
        font-weight: 700;
        color: #1a2332;
        margin-bottom: 4px;
    }

    .page-header p {
        color: #6c757d;
        margin: 0;
    }

/* ─────────────────────────────────────────────
   KPI tiles
   ───────────────────────────────────────────── */

.kpi-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.kpi-tile {
    flex: 1;
    min-width: 140px;
    padding: 16px 20px;
    border-radius: 12px;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.kpi-label {
    font-size: 12px;
    opacity: 0.85;
    font-weight: 600;
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.kpi-total {
    background: linear-gradient(135deg, var(--fix-primary), var(--fix-primary-dark));
}

.kpi-new {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.kpi-progress {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.kpi-resolved {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.kpi-overdue {
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
    color: #ffffff !important;
}

    .kpi-overdue .kpi-label,
    .kpi-overdue .kpi-value {
        color: #ffffff !important;
        opacity: 1 !important;
    }

/* ─────────────────────────────────────────────
   Таблиця звернень
   ───────────────────────────────────────────── */

.fix-table {
    font-size: 13px;
}

    .fix-table th {
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
    }

    .fix-table td {
        vertical-align: middle;
    }

.table-danger {
    --bs-table-bg: #f8d7da;
    --bs-table-striped-bg: #f5c2c7;
    --bs-table-hover-bg: #f1b0b7;
}

/* ─────────────────────────────────────────────
   Карта
   ───────────────────────────────────────────── */

.fix-map-marker {
    width: 28px;
    height: 28px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

    .fix-map-marker span {
        transform: rotate(45deg);
        font-size: 12px;
    }

/* ─────────────────────────────────────────────
   Login
   ───────────────────────────────────────────── */

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f1923 0%, #1a2f3d 100%);
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    width: 420px;
    max-width: calc(100vw - 32px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.login-brand {
    margin-bottom: 14px;
    display: flex;
    justify-content: center;
}

.login-brand-logo {
    width: 170px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.login-logo {
    font-size: 48px;
    margin-bottom: 12px;
}

.login-title {
    font-weight: 800;
    color: #1a2332;
    margin-bottom: 4px;
}

.login-sub {
    color: #aaaaaa;
    font-size: 13px;
    margin-bottom: 24px;
}

/* ─────────────────────────────────────────────
   Bootstrap override
   ───────────────────────────────────────────── */

.btn-primary {
    background-color: var(--fix-primary) !important;
    border-color: var(--fix-primary) !important;
}

    .btn-primary:hover {
        background-color: var(--fix-primary-dark) !important;
        border-color: var(--fix-primary-dark) !important;
    }

/* ─────────────────────────────────────────────
   Фото / відео у зверненні
   ───────────────────────────────────────────── */

.case-media-grid {
    display: block;
    width: 100%;
}

.case-media-card {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 10px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    margin-bottom: 14px;
}

.case-media-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    background: #f3f4f6;
}

.case-media-video {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 75vh;
    border-radius: 12px;
    background: #000000;
}

/* Новий великий режим фото */
.case-section {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.75rem 1rem;
}

    .case-section + .case-section {
        margin-top: 1rem;
    }

.case-section-summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    color: #1f2937;
    list-style: none;
}

.case-media-focus {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.case-media-focus-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
}

.case-media-focus-img {
    display: block;
    width: 100%;
    max-height: 55vh;
    object-fit: contain;
    border-radius: 12px;
    background: #eef2f7;
}

.case-media-focus-video {
    display: block;
    width: 100%;
    max-height: 55vh;
    border-radius: 12px;
    background: #000000;
}

.modal-xl {
    max-width: 1400px;
}

/* ─────────────────────────────────────────────
   Журнал дій
   ───────────────────────────────────────────── */

.audit-table td {
    vertical-align: top;
}

.audit-details {
    max-width: 620px;
    white-space: normal;
    line-height: 1.35;
}

/* ─────────────────────────────────────────────
   Toast-сповіщення Fix Веселинове
   ───────────────────────────────────────────── */

.notification-stack {
    position: fixed !important;
    right: 24px !important;
    bottom: 24px !important;
    top: auto !important;
    left: auto !important;
    z-index: 99999 !important;
    width: 360px !important;
    max-width: calc(100vw - 48px) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    pointer-events: none !important;
}

    .notification-stack .unread-notifier,
    .notification-stack .overdue-notifier {
        position: relative !important;
        width: 100% !important;
        pointer-events: auto !important;
        border-radius: 16px !important;
        padding: 14px 16px !important;
        color: #ffffff !important;
        box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35) !important;
        overflow: hidden !important;
    }

    .notification-stack .unread-notifier {
        background: linear-gradient(135deg, #0f1923, #1f3b4d) !important;
        border: 1px solid rgba(25, 188, 201, 0.45) !important;
    }

    .notification-stack .overdue-notifier {
        background: linear-gradient(135deg, #7f1d1d, #dc2626) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
    }

    .notification-stack .unread-notifier-title {
        color: #ffffff !important;
        font-weight: 800 !important;
        font-size: 15px !important;
        margin-bottom: 8px !important;
    }

    .notification-stack .unread-notifier-body {
        color: #ffffff !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
        margin-bottom: 10px !important;
    }

        .notification-stack .unread-notifier-body span,
        .notification-stack .unread-notifier-body small {
            color: rgba(255, 255, 255, 0.88) !important;
        }

    .notification-stack .unread-notifier-actions {
        display: flex !important;
        gap: 8px !important;
        justify-content: flex-end !important;
    }

    .notification-stack .btn {
        white-space: nowrap !important;
        font-size: 12px !important;
        padding: 5px 9px !important;
    }

/* ─────────────────────────────────────────────
   Адаптив
   ───────────────────────────────────────────── */

@media (max-width: 900px) {
    .fix-layout {
        flex-direction: column;
    }

    .fix-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .fix-nav-list {
        display: flex;
        overflow-x: auto;
        gap: 6px;
    }

    .fix-nav-link {
        white-space: nowrap;
    }

    .fix-content {
        padding: 16px;
    }

    .kpi-row {
        gap: 10px;
    }

    .kpi-tile {
        min-width: 150px;
    }

    .notification-stack {
        right: 12px !important;
        bottom: 12px !important;
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
    }
}
.my-tasks-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
}