body {
    background-color: #f4f7f6;
}

/* ── Quick Access Bar ── */
.quick-access-bar {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.05);
    border-right: 4px solid #0C756F;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(12,117,111,0.07);
}

.quick-access-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.quick-access-icon-box {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #0C756F, #0fa39a);
    color: #fff;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(12,117,111,0.25);
}

.quick-access-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

.quick-access-hint {
    font-size: 10.5px;
    color: #94a3b8;
    margin-top: 2px;
    max-width: 260px;
    white-space: normal;
}

.quick-access-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    max-width: 560px;
}

.quick-search-field {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 12px;
    height: 42px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.quick-search-field.focused {
    border-color: #0C756F;
    box-shadow: 0 0 0 3px rgba(12,117,111,0.1);
    background: #fff;
}

.quick-search-field.shake {
    animation: shake 0.4s ease;
    border-color: #e03131;
    box-shadow: 0 0 0 3px rgba(224,49,49,0.12);
}

.quick-search-prefix-icon {
    color: #0C756F;
    font-size: 12px;
    flex-shrink: 0;
    opacity: 0.7;
}

.quick-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 12.5px;
    font-weight: 500;
    color: #1e293b;
    outline: none;
    direction: ltr;
    text-align: right;
}

.quick-search-input::placeholder {
    color: #b0bec5;
    font-weight: 400;
    font-size: 11.5px;
    direction: rtl;
}

/* hide browser arrows on number input */
.quick-search-input::-webkit-outer-spin-button,
.quick-search-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.quick-search-input[type=number] { -moz-appearance: textfield; }

.quick-clear-btn {
    background: none;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 11px;
    border-radius: 4px;
    display: flex; align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.quick-clear-btn:hover { color: #e03131; background: #fff1f1; }

.quick-submit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0C756F;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0 20px;
    height: 42px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 3px 8px rgba(12,117,111,0.3);
}
.quick-submit-btn:hover {
    background: #085a55;
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(12,117,111,0.35);
}
.quick-submit-btn:active { transform: translateY(0); }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

/* ── Quick Result Row ── */
.quick-result-row {
    display: none;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
    animation: fadeSlideIn 0.25s ease;
}
.quick-result-row.visible { display: flex; }

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.qr-id {
    font-size: 13px;
    font-weight: 800;
    color: #0C756F;
    background: #e8f3f2;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #b3d7d5;
    white-space: nowrap;
}

.qr-divider {
    width: 1px;
    height: 16px;
    background: #e2e8f0;
    flex-shrink: 0;
}

.qr-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #334155;
    white-space: nowrap;
}
.qr-item i {
    color: #0C756F;
    font-size: 11px;
    opacity: 0.7;
}

.qr-main-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.qr-inspectors {
    display: none;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.qr-inspectors-label {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}
.qr-inspectors-label i { color: #0C756F; }

.qr-comment {
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
    font-size: 12px;
    color: #475569;
}

.qr-inspector-chip {
    background: #e8f3f2;
    color: #0C756F;
    border: 1px solid #b3d7d5;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.qr-inspectors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.qr-close-btn {
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.qr-close-btn:hover {
    color: #e03131;
    background: #fff1f1;
    border-color: #ffc9c9;
}

@media (max-width: 768px) {
    .quick-access-bar { flex-direction: column; align-items: stretch; gap: 14px; }
    .quick-access-form { flex-direction: column; align-items: stretch; max-width: 100%; }
    .quick-submit-btn { width: 100%; justify-content: center; }
    .qr-divider { display: none; }
    .qr-item { flex-basis: calc(50% - 10px); }
    .qr-close-btn { margin-right: 0; width: 100%; justify-content: center; }
}


.main-wrapper {
    direction: rtl;
    text-align: right;
}

.container {
    max-width: 100% !important;
    padding-inline: 15px;
}

/* ── Card ── */
.glass-container {
    background: #ffffff;
    border-radius: 14px;
    padding: 15px 20px;
    border: 1px solid rgba(0,0,0,0.05);
}

.table-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.header-right { display: flex; align-items: center; gap: 12px; }

.table-divider { border-top: 1px solid #f1f1f1; margin: 10px 0; }

.icon-box {
    width: 38px; height: 38px;
    background: #e8f3f2;
    color: #0C756F;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    border-radius: 10px;
}

.table-main-title { font-size: 16px; font-weight: 700; color: #2d3436; margin: 0; }
.table-subtitle { font-size: 11px; color: #636e72; margin-top: 2px; }

/* ── Filter Bar ── */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-pill {
    background: #f8fafb;
    padding: 6px 15px;
    border-radius: 50px;
    border: 1px solid #eeeeee;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.v-divider { width: 1px; height: 15px; background: #eee; }

.status-pill {
    background: #f8fafb;
    padding: 6px 15px;
    border-radius: 50px;
    border: 1px solid #eeeeee;
    font-size: 12px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dropdown {
    border: none;
    background: transparent;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    color: #444;
    outline: none;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 5px;
}

.search-icon { font-size: 10px; color: #0C756F; opacity: 0.7; }

.inline-search-input {
    border: none;
    background: transparent;
    font-size: 11px;
    font-weight: 600;
    color: #444;
    outline: none;
    width: 90px;
    transition: all 0.2s;
}
.inline-search-input:focus { width: 120px; color: #0C756F; }
.inline-search-input::placeholder { color: #a0a8ab; font-weight: 400; }

.input-action-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.input-action-group .inline-search-input {
    width: 90px;
}

.filter-search-btn {
    background: none;
    border: none;
    padding: 2px 5px;
    cursor: pointer;
    color: #0C756F;
    font-size: 10px;
    line-height: 1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.55;
    flex-shrink: 0;
    transition: opacity 0.15s, background 0.15s;
}
.filter-search-btn:hover {
    opacity: 1;
    background: #f0f7f6;
}

.filter-clear-btn {
    background: none;
    border: none;
    padding: 2px 5px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 10px;
    line-height: 1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
}
.filter-clear-btn:hover {
    color: #e03131;
    background: #fff1f1;
}

/* ── City Search Dropdown ── */
.search-wrapper { position: relative; display: flex; align-items: center; }

.city-input-search {
    border: 1px solid #eee;
    background: #fff;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #444;
    outline: none;
    transition: all 0.3s ease;
    width: 150px;
}
.city-input-search:focus { border-color: #0C756F; box-shadow: 0 0 0 2px rgba(12,117,111,0.1); }

.custom-dropdown-list {
    position: absolute;
    top: 100%; right: 0; left: 0;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
    margin-top: 5px;
}
.custom-dropdown-list.show { display: block; }

.city-option {
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: right;
    border-bottom: 1px solid #f9f9f9;
}
.city-option:last-child { border-bottom: none; }
.city-option:hover { background-color: #f4f7f6; color: #0C756F; }

/* ── Live Dot ── */
.dot { width: 6px; height: 6px; background: #2ecc71; border-radius: 50%; }
.pulse { animation: pulse-animation 2s infinite; }

@keyframes pulse-animation {
    0%   { box-shadow: 0 0 0 0 rgba(46,204,113,0.4); }
    70%  { box-shadow: 0 0 0 6px rgba(46,204,113,0); }
    100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); }
}

/* ── Table ── */
.table-responsive { overflow-x: auto; border-radius: 10px; }

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
}

.modern-table thead th {
    background: #f8fafb;
    padding: 10px;
    font-size: 11.5px;
    color: #636e72;
    font-weight: 600;
    text-align: center;
}

.modern-table tbody tr { background: #ffffff; transition: all 0.2s ease; }
.modern-table tbody tr:hover { background: #f9fdfc; transform: translateY(-1px); }

.modern-table td {
    padding: 8px 10px;
    text-align: center;
    vertical-align: middle;
    border-top: 1px solid #f1f1f1;
    border-bottom: 1px solid #f1f1f1;
    color: #2d3436;
    font-size: 12.5px;
}

.id-cell { font-weight: 600; color: #0C756F; }

/* ── Badges ── */
.badge {
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 95px;
    border: 1px solid transparent;
}

.badge-warning  { background-color: #fff9db !important; color: #f08c00 !important; border-color: #ffe066 !important; }
.badge-success  { background-color: #e8f3f2 !important; color: #0C756F !important; border-color: #b3d7d5 !important; }
.badge-info     { background-color: #e7f5ff !important; color: #1971c2 !important; border-color: #a5d8ff !important; }
.badge-danger   { background-color: #fff5f5 !important; color: #e03131 !important; border-color: #ffc9c9 !important; }
.badge-secondary{ background-color: #f8f9fa !important; color: #495057 !important; border-color: #dee2e6 !important; }

/* ── Action Button ── */
.btn-action {
    background: #0C756F;
    color: #fff !important;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
    text-decoration: none;
}
.btn-action:hover { background: #085a55; }

/* ── Pagination ── */
.pagination-wrapper {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.modern-pagination { display: flex; align-items: center; gap: 8px; }

.page-link {
    padding: 5px 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    color: #2d3436;
    text-decoration: none;
    font-size: 11.5px;
}

.active-page {
    width: 28px; height: 28px;
    background: #0C756F;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
}

/* ── Responsive ── */
@media (max-width: 992px) {
    .header-left { justify-content: center; width: 100%; }
    .filter-pill { border-radius: 15px; width: 100%; padding: 12px; }
    .filter-pill form { gap: 15px !important; width: 100%; }
    .v-divider { display: none; }
    .search-input-wrapper, .search-wrapper {
        background: white; padding: 5px 10px;
        border-radius: 8px; border: 1px solid #f1f1f1;
        flex-grow: 1; min-width: 140px;
    }
    .inline-search-input, .city-input-search { width: 100% !important; }
}

@media (max-width: 793px) {
    .table-header-wrapper { justify-content: center; text-align: center; }
    .header-left { flex-direction: column-reverse; width: 100%; }
    .modern-table thead { display: none; }
    .modern-table tbody tr { display: block; border: 1px solid #eee; border-radius: 10px; margin-bottom: 12px; }
    .modern-table td { display: flex; justify-content: space-between; border: none; padding: 6px 12px; }
    .modern-table td::before { content: attr(data-label); font-weight: 600; color: #636e72; font-size: 11px; }
}

@media (max-width: 576px) {
    .filter-pill form { flex-direction: column; align-items: stretch !important; }
    .status-pill { width: 100%; justify-content: center; }
}

.reason-cell {
    max-width: 260px;
}

.reason-text {
    display: block;
    word-break: break-word;
}

.reason-toggle-btn {
    background: none;
    border: none;
    padding: 2px 0;
    margin-top: 2px;
    cursor: pointer;
    color: #0C756F;
    font-size: 11px;
    font-weight: 600;
}
.reason-toggle-btn:hover { text-decoration: underline; }
