:root {
    /* Base Variables (Shared) */
    --accent-blue: #b3840e;
    --accent-purple: #c99520;
    --accent-green: #34d399;
    --accent-orange: #fb923c;
    --accent-red: #f87171;
    --accent-terracotta: #e2725b;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;

    /* v16.4.30: Dark Mode FORCED (Default) */
    --primary-bg: #121214;
    --glass-bg: rgba(30, 30, 35, 0.5);
    --glass-border: rgba(255, 255, 255, 0.06);
    --text-main: #f0f0f0;
    --text-muted: #8b8b9a;
}

/* v16.5.1: Unit Selection Styles */
#unit-selection-view {
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0 100px 0;
}

.unit-selection-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
}

.unit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.unit-card {
    padding: 35px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.unit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.unit-card.dry:hover {
    border-color: var(--accent-terracotta);
    background: rgba(226, 114, 91, 0.08);
}

.unit-card.reefer:hover {
    border-color: var(--accent-blue);
    background: rgba(200, 230, 0, 0.08);
}

.unit-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: 0.8px;
}

.unit-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.unit-card-icon {
    font-size: 4rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    width: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.unit-card.dry .unit-card-icon {
    color: var(--accent-terracotta);
}

.unit-card.reefer .unit-card-icon {
    color: var(--accent-blue);
}

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

/* v16.7.5: Liquid Glass Unit Toggle */
.unit-toggle-container {
    display: flex;
    position: relative;
    background: rgba(30, 30, 35, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 3px;
    width: 140px;
    height: 34px;
    cursor: pointer;
    overflow: hidden;
    user-select: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.unit-toggle-segment {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    z-index: 2;
    transition: color 0.3s ease;
    letter-spacing: 0.5px;
}

.unit-toggle-segment.active {
    color: #fff;
}

.unit-toggle-active-bg {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    border-radius: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.unit-toggle-container.dry-active .unit-toggle-active-bg {
    left: 3px;
    background: var(--accent-blue);
    box-shadow: 0 0 15px rgba(200, 230, 0, 0.4);
}

.unit-toggle-container.reefer-active .unit-toggle-active-bg {
    left: 50%;
    background: var(--accent-blue);
    box-shadow: 0 0 15px rgba(200, 230, 0, 0.4);
}

/* v16.8.2: Update notification banner */
.update-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    padding: 12px 20px;
    z-index: 10000;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.4s ease-out;
    font-weight: 600;
}

.update-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .update-banner {
        padding: 8px 12px;
    }

    .update-banner-content {
        gap: 6px;
        font-size: 0.75rem;
    }

    .update-banner-content i {
        font-size: 1rem;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.update-banner.hidden {
    display: none;
}

/* v16.8.3: Mobile-responsive folder shortcuts */
#folder-shortcuts-container {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    #folder-shortcuts-container {
        margin-top: 10px;
        gap: 6px;
    }

    #folder-shortcuts-container .btn {
        font-size: 0.7rem !important;
        padding: 4px 8px !important;
    }

    /* Move folder header elements on separate lines on mobile */
    .folder-view>div:first-child {
        flex-direction: column !important;
        gap: 10px !important;
    }
}

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

html,
body {
    background-color: var(--primary-bg);
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    /* Prevent horizontal scroll */
    position: relative;
    width: 100%;
    max-width: 100vw;
    -webkit-text-size-adjust: 100%;
    /* Fix iOS font scaling */
}

/* v19.10.7: Global overlay constraint — prevents ANY fixed overlay from overflowing viewport on iOS */
div[id$="-overlay"],
div[id$="-modal"],
div[id$="-modal-overlay"],
.modal-overlay {
    max-width: 100vw !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
}

body {
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    overflow-x: hidden;
    background: #121214;
    padding-top: 0;
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* iOS 26 Glassmorphism Ambient Bg */
body::before,
body::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
    animation: floatingGlow 15s ease-in-out infinite alternate;
    pointer-events: none;
}

body::before {
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 60%);
    transform: translate(-80%, -80%);
}

body::after {
    background: radial-gradient(circle, var(--accent-orange) 0%, transparent 60%);
    transform: translate(0%, 20%);
    animation-delay: -7.5s;
}

@keyframes floatingGlow {
    0% {
        transform: translate(-80%, -80%) scale(1);
    }

    100% {
        transform: translate(-60%, -60%) scale(1.2);
    }
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    margin-top: 0;
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Header — v19.11.0: Sticky */
header {
    background: rgba(18, 18, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    margin-bottom: 0;
    padding: 10px 15px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* --- Header Layout --- */
.header-main-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.header-left-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
}

.header-right-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    overflow: hidden;
    min-width: 0;
}

.logo {
    background: #121214;
    padding: 6px 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.logo img {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.header-compact-btns {
    display: flex;
    gap: 8px;
}

.btn-update-compact {
    color: var(--accent-blue) !important;
}

.btn-logout-compact {
    color: var(--accent-red) !important;
}

.btn-logout-compact .hide-mobile,
.btn-update-compact .hide-mobile {
    display: inline;
}

#user-info-compact {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    gap: 15px;
    overflow: hidden;
    min-width: 0;
}

#user-info-compact .search-box {
    display: flex !important;
    align-items: center;
    max-width: 200px;
    position: relative;
}

#user-info-compact .search-box input {
    padding: 6px 30px !important;
    padding-right: 35px !important;
    font-size: 0.8rem !important;
    border-radius: 8px !important;
    width: 100%;
}

#user-info-compact .search-box i.ph-magnifying-glass {
    position: absolute;
    left: 10px !important;
    font-size: 0.9rem !important;
}

#user-info-compact .btn-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-top: 15px;
}

.bottom-actions-grid button {
    height: 45px;
    font-size: 0.85rem;
}

.user-info-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    line-height: 1.1;
    min-width: 0;
}

/* v17.6.0: Desktop Dashboard Header Alignment */
.dashboard-header-container {
    margin-bottom: 25px;
}

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

.dashboard-search-wrapper {
    flex: 1;
    max-width: 600px;
    padding: 10px !important;
    margin-bottom: 0 !important;
}

@media (max-width: 1024px) {
    .dashboard-header-container {
        margin-bottom: 20px;
        padding: 0 5px;
    }

    .dashboard-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .dashboard-search-wrapper {
        max-width: none;
        width: 100%;
        order: 3;
        margin: 0 !important;
        padding: 5px !important;
    }

    #ui-dashboard-title {
        order: 1;
        font-size: 1.4rem !important;
    }

    #unit-switch-container {
        order: 2;
        align-self: flex-start;
        margin-bottom: 5px;
    }
}

.btn-accounting-compact {
    height: 40px !important;
    font-size: 0.85rem !important;
    padding: 0 20px !important;
}

#active-user-name {
    font-weight: 700;
    color: white;
    font-size: 0.8rem;
    white-space: nowrap;
}

#live-currency {
    color: var(--accent-blue);
    font-size: 0.65rem;
    font-weight: 700;
    white-space: nowrap;
}

#live-date {
    font-weight: 700;
    color: var(--accent-blue);
    font-size: 0.65rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    header {
        padding: 5px 10px !important;
        padding-top: calc(env(safe-area-inset-top, 0px) + 5px) !important;
    }

    .header-main-grid {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 0 4px !important;
        width: 100%;
    }

    .header-left-actions {
        display: flex;
        gap: 6px;
        justify-content: flex-start;
        align-items: center;
    }

    .header-right-actions {
        display: flex;
        gap: 4px;
        justify-content: flex-end;
        align-items: center;
        overflow: hidden;
        min-width: 0;
    }

    #user-info-compact {
        overflow: hidden;
        min-width: 0;
    }

    .user-info-inner {
        overflow: hidden;
        min-width: 0;
    }

    #active-user-name {
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 80px;
    }

    #live-currency {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .logo {
        grid-column: 2;
        justify-self: center;
        padding: 2px 4px !important;
    }

    .logo img {
        height: 20px !important;
    }

    #user-info-compact {
        margin-right: 0 !important;
        min-width: 0;
    }

    .user-info-inner div {
        font-size: 0.55rem !important;
    }
}

/* Dashboard Search Sizing (v17.4.0: Narrowed and Centered) */
.dashboard-search-wrapper,
.search-container {
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 25px !important;
}

#folder-shortcuts-container {
    display: flex !important;
    justify-content: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 12px !important;
    width: 100%;
    padding-bottom: 4px;
}

/* Buttons become icons only on mobile */
.btn-logout-compact,
.btn-update-compact {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 38px !important;
}

.btn-logout-compact i,
.btn-update-compact i {
    font-size: 1.2rem !important;
}

.hide-mobile {
    display: none !important;
}

#user-info-compact {
    padding-left: 5px !important;
    border-left: none !important;
}

.user-info-inner {
    gap: 0 !important;
}

#active-user-name {
    font-size: 0.75rem !important;
    white-space: nowrap !important;
}

#live-currency,
#live-date {
    font-size: 0.6rem !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
}

/* Analytics & Shortcut Fixes */
.analytics-btn-scroll {
    flex-wrap: wrap !important;
    display: flex !important;
    gap: 6px !important;
}

.analytics-btn-scroll button {
    flex: 1 1 auto;
    min-width: 45px;
}

#folder-shortcuts-container {
    flex-wrap: wrap !important;
    margin-top: 10px;
}

.logo img:hover {
    transform: scale(1.05);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.category-card {
    position: relative;
    padding: 35px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: rgba(30, 30, 35, 0.4);
    overscroll-behavior-x: none;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(40, 40, 45, 0.7);
    border-color: rgba(179, 132, 14, 0.5);
    /* var(--accent-blue) ama transparan */
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5), 0 0 20px rgba(179, 132, 14, 0.1);
}

/* Mobile Optimizations */
@media (max-width: 500px) {
    body {
        padding: 0;
    }

    .app-container {
        padding: 10px;
        width: 100%;
    }

    #login-view {
        width: 90% !important;
        margin-top: calc(env(safe-area-inset-top, 20px) + 20px) !important;
        margin-bottom: 40px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 30px 20px !important;
    }

    header {
        padding: 10px;
        padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
        margin-bottom: 15px;
        flex-direction: column;
        gap: 15px;
    }

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

    /* v16.9.1: Improved mobile table layout with sticky headers */
    .damage-table-container {
        max-height: 60vh;
        overflow-y: auto;
        position: relative;
    }

    .damage-table-container thead {
        display: none;
        /* Hide on mobile, we'll use labels instead */
    }

    .damage-table-container table {
        min-width: 100% !important;
    }

    .damage-table-container tbody {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .damage-table-container tr {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        padding: 12px;
        margin-bottom: 0 !important;
    }

    .damage-table-container td {
        display: flex !important;
        flex-direction: column;
        gap: 4px;
        padding: 6px 0 !important;
        border-bottom: none !important;
        text-align: left;
    }

    /* Add labels before each field on mobile */
    .damage-table-container td::before {
        content: attr(data-label);
        font-size: 0.65rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 700;
    }

    .damage-table-container td:nth-child(2),
    .damage-table-container td:nth-child(4) {
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        padding-left: 10px !important;
    }

    .damage-table-container td:last-child {
        grid-column: span 2;
        border-top: 1px dashed rgba(255, 255, 255, 0.08);
        margin-top: 6px;
        padding-top: 8px !important;
        justify-content: center;
        align-items: center;
    }

    .damage-table-container td:last-child::before {
        content: none;
        /* No label for delete button */
    }


    .damage-table-container td input {
        width: 100% !important;
        font-size: 0.85rem;
        padding: 8px !important;
    }

    .modal-content {
        max-height: 95vh;
        border-radius: 0;
    }
}

.category-card .badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-blue);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #000;
    /* Açık zeminde koyu yazı kuralı */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.category-card h3 {
    font-size: 1rem;
    font-weight: 600;
}

/* Specific category colors — unified single accent */
.cat-reported,
.cat-pending,
.cat-repairing,
.cat-completed,
.cat-rejected,
.cat-washing {
    border-left: 4px solid var(--accent-blue);
}

/* Modal / Form Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    /* Controlled by JS */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    padding-top: calc(env(safe-area-inset-top, 20px) + 20px);
}

.modal-content {
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 30px;
    border-bottom: 1px solid var(--glass-border);
}

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

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(179, 132, 14, 0.2);
}

/* v10.0.5 Checkbox Fix: Exclude from global appearance:none */
input[type="checkbox"] {
    width: auto !important;
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    background-image: none !important;
    cursor: pointer;
}

select option {
    background-color: #121214;
    /* Dropdown listesi için koyu arka plan */
    color: var(--text-main);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: #334155;
}

/* Dynamic Table */
.damage-table-container {
    overflow-x: auto;
    margin-top: 20px;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}

.modal-totals-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .modal-totals-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

th {
    text-align: left;
    padding: 12px;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    font-size: 0.65rem;
    height: 32px;
}

.btn i {
    font-size: 0.85rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #d89b14, #eea400);
    color: #000;
    box-shadow: 0 4px 15px rgba(238, 164, 0, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(238, 164, 0, 0.4);
    background: linear-gradient(135deg, #e5a71a, #f7b116);
    color: #000;
}

.btn.glass {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    /* Koyu zeminde açık yazı */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn.glass:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.btn-add-row {
    background: rgba(200, 230, 0, 0.1);
    color: var(--accent-blue);
    border: 1px dashed var(--accent-blue);
    margin-top: 10px;
    width: 100%;
}

/* v19.3.1: Mobile damage form toolbar — compact buttons */
@media (max-width: 500px) {
    .damage-table-container+div {
        gap: 6px !important;
    }

    .damage-table-container+div .btn {
        min-width: 0 !important;
        flex: 0 1 auto !important;
        padding: 8px 10px !important;
        font-size: 0.65rem !important;
        white-space: nowrap !important;
    }

    .damage-table-container+div .btn span {
        display: none !important;
    }

    .damage-table-container+div .btn-add-row span {
        display: inline !important;
    }
}

.badge {
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: 800;
    color: #000;
    /* Genel badge kuralı: Açık zemin koyu yazı */
    font-size: 0.7rem;
    text-transform: uppercase;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        max-height: 95vh;
        border-radius: 15px;
    }

    .modal-header,
    .modal-body,
    .modal-content {
        padding: 30px 20px;
    }

    /* v16.9.3: Fix form labels on mobile portrait */
    .modal-body>div[style*="grid"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    .form-group {
        display: flex !important;
        flex-direction: column !important;
    }

    /* v16.9.4: Aggressive label styling for mobile */
    .modal-body .form-group label,
    .modal-body label,
    label {
        display: block !important;
        font-size: 0.75rem !important;
        font-weight: 700 !important;
        margin-bottom: 6px !important;
        color: var(--accent-orange) !important;
        opacity: 1 !important;
        visibility: visible !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }

    footer {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin-top: 50px;
        padding: 15px 10px;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 15px);
        background: rgba(0, 0, 0, 0.4);
        border-radius: 20px 20px 0 0;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    footer>* {
        flex: 1 1 auto;
        min-width: fit-content;
        max-width: 100%;
        justify-content: center;
    }

    footer button,
    #footer-notification-container {
        font-size: 0.7rem !important;
        padding: 6px 10px !important;
        white-space: nowrap;
    }

    footer i {
        font-size: 1rem !important;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    table {
        min-width: 600px;
        /* Reduction for mobile touch targets */
    }

    input,
    select,
    textarea {
        font-size: 0.9rem;
        padding: 10px;
    }

    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }

    .modal-footer div {
        flex-wrap: wrap;
        justify-content: center !important;
    }

    .modal-footer select {
        width: 100% !important;
    }

    .modal-footer button {
        flex: 1;
        min-width: 120px;
    }
}

#folder-view>div:first-child {
    flex-wrap: wrap;
    gap: 10px !important;
}

#folder-view h2 {
    font-size: 1.2rem;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        /* Two columns on very small screens */
        gap: 12px;
    }

    .category-card {
        padding: 15px 10px;
    }

    .category-card i {
        font-size: 1.5rem;
    }

    .category-card h3 {
        font-size: 0.8rem;
    }
}

/* Search Bar Styles (v5.8) */
.search-container {
    margin: 0 auto 30px auto;
    max-width: 600px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 15px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-box input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(200, 230, 0, 0.2);
}

.search-box i.ph-magnifying-glass {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

.btn-clear {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.btn-clear:hover {
    color: var(--accent-red);
}

/* v10.0.4 Modern Card Layout */
.v1004-card {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0 !important;
    overflow: visible;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.report-card-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: none;
}

.report-card-check {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
}

.card-top-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.card-top-left h4 {
    color: var(--accent-blue);
    font-size: 1.1rem;
    margin: 0;
    cursor: pointer;
    text-decoration: underline;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-customer-info {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 15px;
}

.card-top-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.card-top-right-row {
    display: flex;
    align-items: center;
    gap: 25px;
}

.card-summary-price {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.card-total-hours {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.card-total-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.card-primary-actions {
    display: flex;
    gap: 8px;
}

.card-primary-actions .btn {
    height: 32px;
    font-size: 0.75rem;
}

/* Body Content */
.report-card-body {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 0;
}

.report-card-table-side {
    padding: 15px 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.preview-scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.preview-scroll-container table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.preview-scroll-container th {
    text-align: left;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-scroll-container td {
    padding: 10px;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.report-card-workflow-side {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 15px;
}

.workflow-btn-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.workflow-btn-group .btn {
    width: 100%;
    justify-content: flex-start;
    height: 36px;
    font-size: 0.8rem;
}

@media (max-width: 900px) {
    .report-card-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .card-top-right {
        width: 100%;
        align-items: flex-start;
    }

    .card-top-right-row {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 600px) {
    .report-card-body {
        grid-template-columns: 1fr;
    }

    .report-card-table-side {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .card-primary-actions span {
        display: none;
    }

    .card-primary-actions button {
        width: 40px;
        padding: 0 !important;
    }
}

/* v6.6.0 Modern Preview Styles */
.preview-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 600px) {
    .preview-meta-grid {
        grid-template-columns: 1fr 1fr;
        /* Keep it 2-column even on small phones */
        padding: 15px;
        gap: 12px;
    }
}

.preview-meta-item label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.preview-meta-item strong {
    font-size: 1rem;
    color: white;
}

/* v6.6.0 Modern Preview Table Styles */
.preview-damage-table-wrapper {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 10px;
}

.preview-damage-table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
}

.preview-damage-table th {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    text-align: left;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-damage-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.85rem;
    color: white;
}

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

/* removed grid conversion to favor horizontal scrolling */
@media (max-width: 500px) {
    .preview-damage-table {
        min-width: 700px !important;
    }
}

@media (max-width: 500px) {

    .report-card,
    .report-card.is-repairing-layout {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }

    .report-card-check {
        border-right: 0;
        padding: 0;
        justify-content: flex-start;
        height: auto;
    }

    .report-card-actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-left: 0;
        padding-top: 15px;
        margin-top: 5px;
    }

    .report-card-preview {
        display: block !important;
        width: 100%;
        margin-top: 10px;
        background: rgba(0, 0, 0, 0.3);
    }

    .report-card-preview table {
        min-width: 600px;
        /* Force internal scroll on small screens */
    }

    .report-card-btns {
        flex-direction: row;
        gap: 10px;
    }

    .report-card-price {
        font-size: 1.1rem;
    }

    .hide-mobile {
        display: none !important;
    }
}

/* Modern Permission Settings (v14.1.3) */
.perm-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.role-perm-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.role-perm-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.role-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.role-name {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--accent-blue);
}

.folder-perm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.folder-perm-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.folder-perm-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.folder-perm-item input {
    margin: 0;
    width: 16px;
    height: 16px;
}

.folder-perm-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Global Scroll & Grid Fix (v16.1.4) */
.scroll-x-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100%;
    position: relative;
    padding-bottom: 5px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
    /* Better scroll space for mobile */
}

/* Force horizontal scroll on specific containers */
.report-card-table-side,
.preview-scroll-container,
#profit-results,
.analytics-btn-scroll {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* v19.5.2: Tablet breakpoint for accounting grid & filter panel */
@media (max-width: 1024px) {
    .accounting-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }

    .accounting-grid input[type="date"] {
        font-size: 0.8rem !important;
        padding: 8px !important;
        height: 40px !important;
    }

    .accounting-grid select {
        font-size: 0.8rem !important;
        padding: 8px !important;
        height: 40px !important;
    }

    #filter-panel>div {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)) !important;
        gap: 8px !important;
    }

    #filter-panel input[type="date"] {
        font-size: 0.75rem !important;
        padding: 6px !important;
        height: 36px !important;
    }
}

@media (max-width: 600px) {
    .accounting-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .accounting-grid input[type="date"] {
        font-size: 0.85rem !important;
        padding: 10px !important;
        height: 44px !important;
    }

    .profit-cards-grid {
        display: flex !important;
        overflow-x: auto !important;
        gap: 15px !important;
        padding-bottom: 10px !important;
        min-width: 100% !important;
    }

    .profit-cards-grid>div {
        min-width: 200px !important;
        flex: 0 0 auto !important;
    }
}

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

/* v16.4.23: Offline Banner Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

#offline-banner {
    animation: slideDown 0.3s ease !important;
}

/* v16.4.23: Loading Skeleton Animations */
.skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
    min-height: 20px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background: rgba(30, 30, 35, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 35px 20px;
    min-height: 150px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 10px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 15px;
}

/* v16.4.28: Mobile Form Optimization - Hide labels, use placeholders */
@media (max-width: 600px) {
    .form-group label {
        display: none !important;
    }

    label {
        display: none !important;
    }

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

    /* Make placeholders more visible on mobile */
    input::placeholder,
    select::placeholder,
    textarea::placeholder {
        color: rgba(148, 163, 184, 0.9);
        opacity: 1;
        font-size: 0.8rem;
    }

    /* v19.10.0: Keep labels visible in PTI modal and barcode scanner */
    #pti-modal label,
    #pti-form label,
    #barcode-scanner-modal label {
        display: block !important;
        color: rgba(148, 163, 184, 0.8) !important;
        font-size: 0.7rem !important;
    }
}

/* v18.0.0: Damage Analytics Modal Responsive */
.damage-analytics-content {
    touch-action: pan-y;
    overscroll-behavior: contain;
}

.damage-analytics-scroll {
    touch-action: pan-y;
    overscroll-behavior: contain;
}

/* Charts container - horizontal scroll on mobile */
.damage-charts-container {
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-scroll-snap-type: x mandatory;
}

.damage-charts-container>div {
    scroll-snap-align: start;
}

/* Desktop: Side-by-side charts, 4-column stats */
@media (min-width: 768px) {
    .damage-stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .damage-charts-container {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        overflow-x: visible !important;
    }

    .damage-charts-container>div {
        min-width: auto !important;
    }

    .damage-analytics-content {
        height: auto !important;
        max-height: 90vh !important;
    }

    /* v19.5: Show refresh button on desktop only */
    .btn-refresh-desktop {
        display: inline-flex !important;
    }
}

/* Landscape mobile: Optimize for wider screens */
@media (max-height: 500px) and (orientation: landscape) {
    .damage-analytics-content {
        margin: 5px !important;
        height: 98vh !important;
        max-height: 98vh !important;
    }

    .damage-stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
    }

    .damage-charts-container {
        flex-direction: row !important;
    }

    .damage-charts-container canvas {
        max-height: 150px !important;
    }
}

/* Custom Autocomplete Dropdown */
.ac-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

.ac-dropdown {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: 10vh;
    width: 94%;
    max-width: 480px;
    background: var(--bg-secondary, #1e293b);
    border-radius: 16px;
    max-height: 70vh;
    z-index: 9999;
    display: none;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    flex-direction: column;
    overflow: hidden;
}

.ac-dropdown.active {
    display: flex;
}

.ac-overlay.active {
    display: block;
}

.ac-dropdown .ac-header {
    padding: 12px 16px 8px;
    position: sticky;
    top: 0;
    background: var(--bg-secondary, #1e293b);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ac-dropdown .ac-header .ac-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent, #38bdf8);
    margin-bottom: 8px;
    font-weight: 700;
}

.ac-dropdown .ac-search {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
}

.ac-dropdown .ac-search:focus {
    border-color: var(--accent, #38bdf8);
}

.ac-dropdown .ac-list {
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
}

.ac-dropdown .ac-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
}

.ac-dropdown .ac-item:active,
.ac-dropdown .ac-item.ac-highlighted {
    background: rgba(200, 230, 0, 0.18);
    color: #fff;
}

.ac-dropdown .ac-item .ac-code {
    font-weight: 700;
    color: var(--accent, #38bdf8);
    margin-right: 6px;
}

.ac-dropdown .ac-item .ac-desc {
    color: rgba(255, 255, 255, 0.7);
}

.ac-dropdown .ac-empty {
    padding: 20px 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

/* v18.0.0: Offline Queue Badge Pulse */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* v19.3.1: iOS Safe Area — All fullscreen overlays */
#kanban-overlay,
#weekly-pdf-overlay,
#global-search-overlay,
#profit-dashboard-overlay,
#portal-overlay,
#tag-manager-overlay,
#template-overlay,
#smart-notif-overlay,
#ai-detect-overlay,
#offline-status-overlay,
#qr-modal-overlay,
#field-options-overlay,
#ac-overlay {
    padding-top: env(safe-area-inset-top, 0px) !important;
}

/* End of file */

/* v19.4.1: Card Overflow Menu */
.card-overflow-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    min-width: 160px;
    background: rgba(26, 29, 33, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 6px;
    z-index: 1500;
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
}

.card-overflow-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s;
    text-align: left;
    width: 100%;
}

.card-overflow-menu button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.card-overflow-menu button i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* v19.4.1: Card Body Toggle Bar */
.card-body-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    font-size: 0.7rem;
    color: var(--text-muted);
    cursor: pointer;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s;
}

.card-body-toggle:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--accent-blue);
}

.card-toggle-icon {
    font-size: 0.7rem;
    transition: transform 0.25s ease;
}

/* v19.4.1: Sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
}

.sidebar-overlay.open {
    display: block;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: rgba(18, 18, 22, 0.97);
    backdrop-filter: blur(24px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.sidebar-section-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 8px 12px 4px;
    opacity: 0.7;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.2s;
}

.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-btn i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-btn-active {
    background: rgba(76, 175, 80, 0.1);
    color: var(--accent-green);
}

/* v19.12.4: Sidebar Submenu Styles */
.sidebar-submenu-body .sidebar-btn {
    padding: 10px 12px;
    font-size: 0.8rem;
    opacity: 0.9;
}

.sidebar-submenu-body .sidebar-btn i {
    font-size: 0.95rem;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 10px 0;
}

.sidebar-footer {
    padding: 12px 20px;
    font-size: 0.65rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* ===== THEME TOGGLE SWITCH ===== */
.theme-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.theme-toggle-wrapper:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-toggle-track {
    position: relative;
    width: 38px;
    height: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.3s ease;
}

.theme-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-blue);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.theme-toggle-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 30px;
}

.theme-toggle-icon {
    font-size: 1rem;
    transition: opacity 0.3s;
}

/* Light mode active toggle state */
body.light-mode .theme-toggle-thumb {
    left: 20px;
}

body.light-mode .theme-toggle-track {
    background: rgba(200, 230, 0, 0.3);
}

body.light-mode .theme-toggle-wrapper {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .theme-toggle-wrapper:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* ===== LIGHT MODE OVERRIDES ===== */
body.light-mode {
    --primary-bg: #e8e8e4;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --text-main: #1a1a1a;
    --text-muted: #555b63;
    background: radial-gradient(circle at 50% 50%, #f0f0ec 0%, #e4e4e0 100%);
}

body.light-mode .glass {
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-mode header {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .logo {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .sidebar {
    background: rgba(255, 255, 255, 0.97);
    border-right-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .sidebar-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .sidebar-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

body.light-mode .sidebar-btn:active {
    background: rgba(0, 0, 0, 0.08);
}

body.light-mode .sidebar-divider {
    background: rgba(0, 0, 0, 0.06);
}

body.light-mode .sidebar-footer {
    border-top-color: rgba(0, 0, 0, 0.04);
}

body.light-mode .category-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.light-mode .category-card:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

body.light-mode .skeleton-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .category-card .badge {
    color: #000;
}

body.light-mode .btn-primary {
    color: #000;
}

/* Light mode form inputs */
body.light-mode input,
body.light-mode select,
body.light-mode textarea {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #1a1a1a !important;
}

body.light-mode input::placeholder {
    color: #9ca3af !important;
}

/* Light mode modals */
body.light-mode .modal-content {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Light mode select dropdown */
body.light-mode select option {
    background-color: #ffffff;
    color: #1a1a1a;
}

/* Light mode search box */
body.light-mode .search-box input:focus {
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 0 20px rgba(179, 132, 14, 0.2);
}

/* Light mode unit toggle */
body.light-mode .unit-toggle-container {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
}

/* Light mode scrollbar */
body.light-mode ::-webkit-scrollbar-track {
    background: #f0f0ec;
}

body.light-mode ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Light mode: Username & header info readability */
body.light-mode #active-user-name {
    color: #1a1a1a;
}

body.light-mode #live-currency,
body.light-mode #live-date {
    color: #8b6914;
}

/* Light mode: Glass buttons need dark text */
body.light-mode .btn.glass {
    color: #333;
    border-color: rgba(0, 0, 0, 0.12);
}

body.light-mode .btn.glass:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* Light mode: Footer version text */
body.light-mode footer {
    background: rgba(255, 255, 255, 0.6);
}

/* Light mode: Autocomplete dropdown */
body.light-mode .ac-dropdown {
    background: #ffffff;
}

body.light-mode .ac-dropdown .ac-header {
    background: #ffffff;
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .ac-dropdown .ac-search {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1a1a1a;
}

body.light-mode .ac-dropdown .ac-item {
    color: #333;
    border-bottom-color: rgba(0, 0, 0, 0.04);
}

body.light-mode .ac-dropdown .ac-empty {
    color: #999;
}

/* Light mode: Card overflow menu */
body.light-mode .card-overflow-menu {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.1);
}

body.light-mode .card-overflow-menu button:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* ===== v19.5.1: SMOOTH THEME TRANSITION ===== */
body.theme-transitioning,
body.theme-transitioning *,
body.theme-transitioning *::before,
body.theme-transitioning *::after {
    transition: background-color 0.45s ease,
        color 0.45s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease,
        background 0.45s ease !important;
}

/* ===== v19.5.1: REPORT LIST SKELETON LOADING ===== */
.report-skeleton-card {
    background: rgba(30, 30, 35, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.report-skeleton-card .skel-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.report-skeleton-card .skel-bar {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 6px;
    height: 14px;
}

.report-skeleton-card .skel-bar.skel-title {
    height: 18px;
    width: 45%;
}

.report-skeleton-card .skel-bar.skel-badge {
    height: 22px;
    width: 60px;
    border-radius: 10px;
}

.report-skeleton-card .skel-bar.skel-text {
    width: 30%;
}

.report-skeleton-card .skel-bar.skel-short {
    width: 20%;
}

.report-skeleton-card .skel-bar.skel-amount {
    width: 25%;
    margin-left: auto;
}

body.light-mode .report-skeleton-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .report-skeleton-card .skel-bar {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* ===== v19.5.1: EMPTY STATE ILLUSTRATIONS ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 30px;
    text-align: center;
    animation: emptyFadeIn 0.5s ease;
}

@keyframes emptyFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.empty-state svg {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 8px 0;
    opacity: 0.8;
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 280px;
}

body.light-mode .empty-state svg {
    opacity: 0.4;
}

/* ===== v19.5.1: ENHANCED OFFLINE/ONLINE BANNER ===== */
#offline-banner {
    animation: slideDown 0.3s ease !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

#offline-banner .offline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fbbf24;
    animation: offlinePulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes offlinePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.7);
    }
}

.online-restored-banner {
    position: fixed;
    top: calc(env(safe-area-inset-top, 20px) + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-green);
    color: #000;
    padding: 12px 24px;
    border-radius: 12px;
    z-index: 9999;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

.online-restored-banner.fade-out {
    animation: fadeUp 0.4s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
}

/* ===== v19.5.1: BULK ACTION BAR ===== */
.bulk-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(18, 18, 22, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 8000;
    display: none;
    align-items: center;
    gap: 10px;
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.bulk-action-bar.active {
    display: flex;
}

.bulk-action-bar .bulk-count {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-blue);
    white-space: nowrap;
    min-width: 80px;
}

.bulk-action-bar .bulk-actions {
    display: flex;
    gap: 8px;
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.bulk-action-bar .bulk-actions::-webkit-scrollbar {
    display: none;
}

.bulk-action-bar .bulk-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
}

.bulk-action-bar .bulk-btn:active {
    transform: scale(0.95);
}

/* v19.12.2F: User Manual Styling */
.manual-section {
    margin-bottom: 40px;
}

.manual-section h3 {
    color: var(--accent-blue);
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 8px;
}

.manual-section p {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 15px;
    opacity: 0.9;
}

.manual-step {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 3px solid var(--accent-blue);
}

.manual-step-title {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--accent-orange);
}

.manual-step-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.manual-tip {
    background: rgba(200, 230, 0, 0.08);
    border: 1px solid rgba(200, 230, 0, 0.2);
    border-radius: 10px;
    padding: 12px;
    font-size: 0.8rem;
    color: #c8e600;
    margin: 15px 0;
}

.manual-img-placeholder {
    width: 100%;
    height: 180px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-top: 10px;
    border: 1px dashed rgba(255,255,255,0.1);
}

body.light-mode .manual-step {
    background: rgba(0,0,0,0.02);
}

body.light-mode .manual-tip {
    background: rgba(76, 175, 80, 0.05);
    color: #2e7d32;
    border-color: rgba(76, 175, 80, 0.2);
}

.bulk-action-bar .bulk-btn.bulk-clear {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.2);
    color: var(--accent-red);
}

.report-card.selected {
    border-left: 3px solid var(--accent-blue) !important;
    background: rgba(179, 132, 14, 0.06) !important;
}

/* Bulk status dropdown */
.bulk-status-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    min-width: 180px;
    background: rgba(26, 29, 33, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 6px;
    z-index: 8001;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.bulk-status-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 8px;
    width: 100%;
    text-align: left;
}

.bulk-status-menu button:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Light mode overrides for bulk */
body.light-mode .bulk-action-bar {
    background: rgba(255, 255, 255, 0.95);
    border-top-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.08);
}

body.light-mode .bulk-action-bar .bulk-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #333;
}

body.light-mode .bulk-status-menu {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .bulk-status-menu button:hover {
    background: rgba(0, 0, 0, 0.04);
}

body.light-mode .report-card.selected {
    background: rgba(179, 132, 14, 0.08) !important;
}

/* ===== v19.5.1: KEYBOARD SHORTCUT HINT ===== */
.kbd-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(18, 18, 22, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 0.75rem;
    color: var(--text-muted);
    z-index: 7999;
    animation: emptyFadeIn 0.3s ease;
    pointer-events: none;
}

.kbd-hint kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: inherit;
    font-size: 0.7rem;
    color: var(--accent-blue);
}

/* ===== v19.5.1: OFFLINE INDICATOR BAR ===== */
.offline-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: linear-gradient(135deg, #92400e, #b45309);
    transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.offline-bar.active {
    transform: translateY(0);
}

.offline-bar.online {
    background: linear-gradient(135deg, #065f46, #047857);
}

.offline-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

.offline-content i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.offline-sync-status {
    font-size: 0.7rem;
    opacity: 0.8;
    font-weight: 400;
    margin-left: auto;
}

/* ===== v19.5.1: KEYBOARD SHORTCUTS PANEL ===== */
.keyboard-shortcuts-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(18, 18, 22, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 0;
    z-index: 10001;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.keyboard-shortcuts-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.kb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.kb-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.kb-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.2s;
}

.kb-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.kb-list {
    padding: 12px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kb-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.kb-item:last-child {
    border-bottom: none;
}

.kb-item kbd {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 4px 10px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-blue);
    min-width: 70px;
    text-align: center;
}

.kb-item span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Light mode overrides for shortcuts panel */
body.light-mode .keyboard-shortcuts-panel {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body.light-mode .kb-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.light-mode .kb-close:hover {
    background: rgba(0, 0, 0, 0.04);
}

body.light-mode .kb-item {
    border-bottom-color: rgba(0, 0, 0, 0.04);
}

body.light-mode .kb-item kbd {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.12);
}

/* v19.6.0: Timeline Modal Styles */
.timeline-container {
    padding: 10px 0;
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 25px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: 8px;
    top: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
    z-index: 2;
    font-size: 1rem;
}

.timeline-item.latest .timeline-icon {
    box-shadow: 0 0 10px currentColor;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px 15px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.timeline-action {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.timeline-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-user {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.timeline-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    font-style: italic;
}

.timeline-empty {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-style: italic;
}

/* v19.10.0: Barcode Scanner Scan Line Animation */
@keyframes scanLine {
    0%, 100% { transform: translateY(-20px); opacity: 0.4; }
    50% { transform: translateY(20px); opacity: 1; }
}