/* ----- Global Layout ----- */
.purchase-session-banner, .purchase-session-notice {
    box-sizing: border-box; width: 90%; margin: 20px auto; padding: 15px 20px;
    border: 1px solid #64748b; border-radius: 12px; background: #1e293b;
    color: #e2e8f0; text-align: center; font-weight: 700;
}
.purchase-session-banner[data-active="true"] { background: #064e3b; border-color: #34d399; color: #d1fae5; }
.purchase-session-banner[data-active="false"] { background: #3f2525; border-color: #f87171; color: #fee2e2; }
.purchase-session-notice { background: #422006; color: #fef3c7; border-color: #fbbf24; }
#purchaseSessionToggle { min-height: 42px; padding: 10px 18px; border: 1px solid #34d399; border-radius: 8px; background: #065f46; color: #fff; cursor: pointer; font: inherit; }
#purchaseSessionToggle[data-active="true"] { background: #991b1b; border-color: #f87171; }
#purchaseSessionToggle:disabled { opacity: .6; cursor: wait; }
.farmer-wallet-summary .rc-gift-disabled:disabled,
#rc-issue button:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(1); }

body {
    margin: 0;
    font-family: "IRANSans", sans-serif;
    background: #0d0d0d;
    /* بک‌گراند مشکی ساده */
    color: #e6e6e6;
    direction: rtl;
    /* راست‌چین کردن کلی */
}

.container {
    width: 90%;
    margin: 40px auto;
    background: #1a1a1a;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(255, 200, 100, 0.15);
}


/* ----- Typography ----- */

h1,
h2,
h3 {
    color: #f5c15c;
    margin-bottom: 20px;
    font-weight: 600;
}


/* ----- Forms ----- */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="search"],
input:not([type]),
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #121212;
    color: #fff;
    font-size: 15px;
    box-sizing: border-box;
}

input:focus,
textarea:focus {
    border-color: #f5c15c;
    outline: none;
    box-shadow: 0 0 0 2px rgba(245, 193, 92, 0.3);
}

select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    transition: 0.2s ease;
}

select:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 6px rgba(255,255,255,0.08);
}

select option {
    background: #121212;
    color: #fff;
    padding: 10px;
}

/* ----- Buttons & Icons ----- */

.button-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.btn-primary {
    background: #f5c15c;
    color: black;
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
    text-decoration: none;
    font-size: 15px;
}

.btn-primary:hover {
    background: #ffdb88;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #333;
    color: #e6e6e6;
    padding: 12px 24px;
    border-radius: 6px;
    border: 1px solid #555;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s ease;
    text-decoration: none;
    font-size: 15px;
}

.btn-secondary:hover {
    background: #444;
    border-color: #666;
    transform: translateY(-1px);
}

.btn-danger {
    background: #722828;
    color: black;
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
    text-decoration: none;
    font-size: 15px;
}

.btn-danger:hover {
    background: #c45959;
    transform: translateY(-1px);
}

.btn-success {
    background: #2f6b45;
    color: black;
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
    text-decoration: none;
    font-size: 15px;
}

.btn-success:hover {
    background: #4aa56d;
    transform: translateY(-1px);
}

.btn-normal {
    background: #044794;
    color: black;
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
    text-decoration: none;
    font-size: 15px;
}

.btn-normal:hover {
    background: #277cdd;
    transform: translateY(-1px);
}

i.icon {
    margin-left: 8px;
    color: #f5c15c;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    transition: 0.3s ease;
}

.btn-icon:hover {
    color: #f5c15c;
    transform: scale(1.1);
}

/* ===== Table Tools ===== */

.table-tools{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
    margin-bottom:20px;
    flex-wrap:wrap;
}

.dashboard-table-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    direction: rtl;
}

.dashboard-table-actions > #purchaseSessionToggle,
.dashboard-table-actions > .dashboard-archive-link,
.dashboard-table-actions > .dashboard-tool-button,
.dashboard-table-actions > .ringoo-filter,
.dashboard-table-actions > .dashboard-column-picker > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 45px;
    margin: 0;
    padding: 10px 13px;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-table-actions > .dashboard-archive-link,
.dashboard-table-actions > .dashboard-tool-button,
.dashboard-table-actions > .dashboard-column-picker > summary {
    min-width: 45px;
    font-size: 22px;
    line-height: 1;
}

.dashboard-table-actions > .dashboard-archive-link {
    gap: 6px;
    border: 1px solid #f5c15c;
    background: #f5c15c;
    color: #30220a;
    text-decoration: none;
    transition: background .2s, border-color .2s;
}

.dashboard-table-actions > .dashboard-archive-link:hover {
    background: #e4ad43;
    border-color: #e4ad43;
}

.dashboard-tool-button {
    border: 1px solid transparent;
    color: #fff;
    cursor: pointer;
}
.dashboard-history-button, .dashboard-retry-button { background: #287bd8; }
.dashboard-history-button:hover:not(:disabled), .dashboard-retry-button:hover:not(:disabled) { background: #1d60ad; }
.dashboard-delete-button, .dashboard-cancel-button { background: #d9534f; }
.dashboard-delete-button:hover:not(:disabled), .dashboard-cancel-button:hover:not(:disabled) { background: #c9302c; }
.dashboard-stop-button { background: #996515; }
.dashboard-stop-button:hover:not(:disabled) { background: #805211; }
.dashboard-tool-button:disabled { opacity: .45; cursor: not-allowed; }

.dashboard-table-actions :is(a, button, summary, input):focus-visible {
    outline: 2px solid #6d94c5;
    outline-offset: 3px;
}

/* Search */

.search-box input{
    width:260px;
    padding:10px 14px;
    border-radius:6px;
    border:1px solid #444;
    background:#121212;
    color:#fff;
    font-size:14px;
}

.search-box input:focus{
    border-color:#f5c15c;
    box-shadow:0 0 0 2px rgba(245,193,92,.2);
    outline:none;
}

/* Filters */

.toolbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
    gap:20px;
    flex-wrap:wrap;
}

.toolbar-right{
    display:flex;
    gap:15px;
    flex-wrap:wrap;
}

.toolbar-info{
    background:#f6f6f6;
    padding:10px 15px;
    border-radius:10px;
    font-size:14px;
}

.status-filters{
    display:flex;
    gap:8px;
}

.filter-btn{
    width:38px;
    height:38px;
    border-radius:8px;
    border:1px solid #333;
    background:#151515;
    cursor:pointer;
    font-size:16px;
    transition:.25s;
}

.filter-btn:hover{
    transform:translateY(-2px);
    border-color:#f5c15c;
}

/* Active */

.filter-btn.active{
    border-color:#f5c15c;
    background:#262626;
}

/* رنگ‌ها */

.filter-btn.in-progress.active{
    box-shadow:0 0 8px rgba(0,255,120,.4);
}

.filter-btn.completed.active{
    box-shadow:0 0 8px rgba(0,140,255,.4);
}

.filter-btn.error.active{
    box-shadow:0 0 8px rgba(255,0,0,.4);
}


/* ----- Status panel ----- */

.status-panel {
    display: flex;
    justify-content: space-between;
    background: #111827;
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    margin: 15px 0;
}

.status-panel div {
    display: flex;
    gap: 8px;
    align-items: center;
}

.status-panel b {
    color: #9ca3af;
}


/* ----- Table ----- */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

table th,
table td {
    padding: 14px;
    text-align: center;
}

table th {
    background: #262626;
    color: #f5c15c;
    font-weight: 600;
}

table tr:nth-child(even) {
    background: #141414;
}

table tr:hover {
    background: #222;
}

table td .btn-icon {
    /* استایل آیکون‌ها در سلول‌های جدول */
    margin: 0 5px;
    /* فاصله بین آیکون‌ها */
}

.table-wrap{
    overflow-x:auto;
}

/* ===== Status Badge ===== */

.status-badge{
    font-size:16px;
    font-weight:700;
    min-width:85px;
}

/* statuses */
.status-badge.running{
    color:#38d87a;
}

.status-badge.partly-completed,
.status-badge.completed{
    color:#48a8ff;
}

.status-badge.error{
    color:#ff6666;
}

.status-badge.starting,
.status-badge.awaiting-credentials,
.status-badge.waiting-login,
.status-badge.stopping,
.status-badge.paused{
    color:#f5c15c;
}

.order-row{ 
    cursor: pointer; 
    transition: 0.2s; 
}

.order-row.selected {
    background: #2a3b55 !important;
    outline: 2px solid #4da3ff;
}

#dashboardOrdersTable .order-row.delivery-unmarked {
    background: rgba(56, 216, 122, 0.22);
}
#dashboardOrdersTable .order-row.delivery-unmarked:hover {
    background: rgba(56, 216, 122, 0.30);
}
.delivery-stage-btn { white-space: nowrap; }

.top-actions{
    display:flex;
    align-items:center;
    gap:10px;
}

.top-actions button{
    border:none;
    outline:none;
    padding:10px 18px;
    border-radius:10px;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    transition:0.2s;
    color:white;
}

#deleteBtn{
    background:#d9534f;
}

#deleteBtn:hover:not(:disabled){
    background:#c9302c;
}

#archiveBtn{
    background:#f5c15c;
}

#clearLoginHistoryBtn{
    background:#287bd8;
}

#clearLoginHistoryBtn:hover:not(:disabled){
    background:#1d60ad;
}

#archiveBtn:hover{
    background:#c4922e;
}

.top-actions button:disabled{
    opacity:0.45;
    cursor:not-allowed;
}

.custom-date-filter{ 
    display: flex; 
    gap: 10px; 
    align-items: center; 
    flex-wrap: wrap; 
} 

.custom-date-filter input{ 
    background: #1e1e1e; 
    color: white; 
    border: 1px solid #444; 
    padding: 8px 12px; 
    border-radius: 8px; 
}

/* ===== Actions ===== */

.action-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* هر ردیف */
.action-row {
    display: flex;
    width: 100%;
}

.button-row .action-btn {
    flex: 1;
    margin: 0 2px;
    padding: 6px 0;
    font-size: 16px;
}

.action-btn{
    width:36px;
    height:36px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    background:#151515;
    border:1px solid #333;
    color:#fff;
    font-size:17px;
    transition:0.25s ease;
}

.action-btn:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(0,0,0,.35);
}

.view-btn:hover{
    background:#15387e;
    border-color:#2959c9;
}

.edit-btn:hover{
    background:#664600;
    border-color:#d49713;
}

.image-btn:hover{
    background:#37614a;
    border-color:#1ac25a;
}

.delete-btn:hover{
    background:#530a0a;
    border-color:#ad2222;
}

.retry-btn:hover{
    background:#390549;
    border-color:#8e17b3;
}

.archive-search-form,
.history-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.safe-stop-btn:hover{
    background:#5b3b00;
    border-color:#f59e0b;
}

.golden-period-badge {
    display: block;
    width: max-content;
    margin: 5px auto 0;
    padding: 3px 8px;
    border: 1px solid rgba(234, 179, 8, .45);
    border-radius: 999px;
    background: rgba(234, 179, 8, .12);
    color: #a16207;
    font-size: 11px;
    white-space: nowrap;
}

.golden-tariff-help {
    margin: 12px 0 4px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(234, 179, 8, .09);
    color: #713f12;
    line-height: 1.9;
}

.modal-box.pricing-settings-form {
    width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.pricing-settings-form fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
}

.pricing-settings-form label {
    display: block;
    margin-bottom: 8px;
}

.pricing-settings-form input[type="checkbox"] {
    width: auto;
    margin: 0 0 0 6px;
}

.continue-order-btn{
    width:auto;
    min-width:48px;
    padding-inline:7px !important;
    font-size:11px !important;
}

.continue-order-btn:hover{
    background:#07523a;
    border-color:#16a36f;
}

.gallery-btn:hover{
    background:#023f3a;
    border-color:#14e6d4;
}

.change-btn:hover{
    background:#054d02;
    border-color:#14940f;
}

.warning-btn:hover{
    background:#6b6904;
    border-color:#cecb18;
}

.warning-btn:disabled{
    opacity:.55;
    cursor:wait;
    transform:none;
}


/* ----- image LIST (MAIN UX) ----- */

.hint {
    font-size: 12px;
    color: #888;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 14px 16px;
    border-radius: 10px;

    background: linear-gradient(145deg, #1f1f1f, #161616);
    border: 1px solid #2d2d2d;

    cursor: pointer;
    transition: all 0.25s ease;

    position: relative;
    overflow: hidden;
}

/* hover glow */
.file-btn:hover {
    transform: translateY(-2px);
    border-color: #f5c15c;
    box-shadow: 0 10px 25px rgba(245, 193, 92, 0.12);
}

/* file name */
.file-text {
    flex: 1;
    font-size: 14px;
    color: #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* arrow */
.file-arrow {
    color: #777;
    font-size: 20px;
    transition: 0.2s;
}

.file-btn:hover .file-arrow {
    color: #f5c15c;
    transform: translateX(-3px);
}

/* ----- EMPTY STATE ----- */

.empty-state {
    text-align: center;
    padding: 40px;
    color: #777;
    border: 1px dashed #333;
    border-radius: 10px;
    background: #141414;
}

/* ----- Links ----- */

a {
    color: #f5c15c;
    text-decoration: none;
}

a:hover {
    color: #ffdb88;
}

/* ----- Card specific adjustments ----- */

.card {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(255, 200, 100, 0.15);
}

.card h1,
.card h2 {
    text-align: center;
    /* تیترها در کارت وسط چین */
    margin-bottom: 30px;
}

.card form {
    display: flex;
    flex-direction: column;
}

/* ----- GLOBAL RESET ----- */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "IRANSans", sans-serif;
    background: radial-gradient(circle at top, #141414, #0d0d0d);
    color: #e6e6e6;
    direction: rtl;
}

/* ----- LAYOUT ----- */

.container {
    margin: 50px auto;
}

.card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.card strong{
    color:#f5c15c;
    font-weight:600;
    margin-right:8px;
}

/* ----- HEADER ----- */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #2a2a2a;
}

.top-bar h2 {
    margin: 0;
    font-size: 20px;
    color: #f5c15c;
}

.info-box{
    background:#121212;
    border:1px solid #333;
    border-radius:10px;
    padding:18px 22px;
    margin:20px auto 0;
    max-width: 1000px;
}

.info-box p{
    margin:12px 0;
    text-align:center;
    direction:ltr;
    font-size:16px;
    color:#e6e6e6;
}

.shot-box{
    margin-top:30px;
    text-align:center;
}

.shot-box h3{
    margin-bottom:18px;
}

#coin-shot{
    display:block;
    margin:0 auto;
    max-width:520px;
    width:100%;
    border-radius:12px;
    border:1px solid #333;
    box-shadow:0 0 14px rgba(245,193,92,0.18);
    transition:0.3s ease;
}

#coin-shot:hover{
    transform:scale(1.02);
    border-color:#f5c15c;
}

#no-shot{
    color:#888;
    font-size:14px;
    margin-top:12px;
    text-align:center;
}

/* ===== Progress Bar ===== */

.progress-wrap{
    margin-top:32px;
    width:100%;
    max-width:520px;
    margin-left:auto;
    margin-right:auto;
}

.progress-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:8px;
    font-size:14px;
    color:#ccc;
}

.progress-bar{
    width:100%;
    height:22px;
    background:#1a1a1a;
    border:1px solid #333;
    border-radius:50px;
    overflow:hidden;
}

#progress-fill{
    width:0%;
    height:100%;
    border-radius:50px;
    background:linear-gradient(90deg,#f5c15c,#ffd978);
    box-shadow:0 0 12px rgba(245,193,92,.35);
    transition:width .6s ease;
}

#progress-text{
    color:#f5c15c;
    font-weight:700;
}

.progress-title{
    font-size:15px;
    font-weight:700;
    color:#f5c15c;
    letter-spacing:.3px;
}

/* درصد داخل نوار */

#progress-inside{
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    font-size:12px;
    font-weight:800;
    color:#111;
    white-space:nowrap;
    text-shadow:0 1px 2px rgba(255,255,255,.25);
    pointer-events:none;
}

#status-desc{
    white-space: pre-line;
    line-height: 1.7;
    color:#d7d7d7;
}

.archive-filters{
    display:flex;
    gap:10px;
    margin-bottom:20px;
}

.archive-filter-btn{
    padding:10px 16px;
    border-radius:10px;
    background:#1f2937;
    color:white;
    text-decoration:none;
    transition:.2s;
}

.archive-filter-btn:hover{
    background:#374151;
}

.archive-filter-btn.active{
    background:#2563eb;
}

.modal-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-box{
    width: 450px;
    max-width: 95%;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.modal-box h3{
    margin-top: 0;
    margin-bottom: 20px;
}

.modal-box input{
    width: 100%;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
}

.modal-actions{
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
}

.modal-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:20px;
}

.modal-header h3{
    margin:0;
}

.action-finder-btn{
    border:none;
    padding:8px 14px;
    border-radius:8px;
    cursor:pointer;
    color:white;
    font-size:13px;
    margin:0 2px;
}

.editcard-btn{
    background:#39b44e;
}

.editcard-btn:hover{
    background:#238333;
}

.toggle-btn{
    background:#f59e0b;
}

.toggle-btn:hover{
    background:#d97706;
}

.deletecard-btn{
    background:#dc2626;
}

.deletecard-btn:hover{
    background:#b91c1c;
}

.excel-upload{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:20px;
}

#excel-file{
    display:none;
}

.excel-upload-btn{
    background:#aec6fa;
    color:#fff;
    padding:5px 16px;
    border-radius:4px;
    cursor:pointer;
    transition:.2s;
    user-select:none;
}

.excel-upload-btn:hover{
    background:#8ca5eb;
}

#excel-file-name{
    color:#666;
    font-size:13px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    max-width:250px;
}

.current-card {
    border-right: 5px solid #00ff66;
}

.bulk-price-box{
    display:flex;
    gap:10px;
    align-items:center;
    margin:15px 0;
}

.bulk-price-box input{
    width:180px;
    padding:10px;
    border:1px solid #ddd;
    border-radius:8px;
}

.bulk-price-box button{
    padding:10px 16px;
}

.button-card-container{
    display:flex;
    justify-content:space-between;
    align-items:stretch;
    flex-wrap:wrap;
    gap:14px;
    margin-bottom:20px;
}

.left-actions{
    display:grid;
    grid-template-columns:repeat(2, minmax(260px, 1fr));
    flex:1 1 650px;
    gap:12px;
}

.right-actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    align-content:center;
}

.card-setting-box {
    min-width:0;
    min-height:142px;
    padding:15px;
    border:1px solid #353535;
    border-radius:12px;
    background:linear-gradient(145deg, #242424, #1c1c1c);
    box-shadow:0 7px 18px rgba(0,0,0,.18);
    display:flex;
    flex-direction:column;
}

.card-setting-heading {
    display:flex;
    flex-direction:column;
    gap:3px;
    margin-bottom:12px;
}

.card-setting-heading label {
    color:#f6c85f;
    font-size:15px;
    font-weight:800;
}

.card-setting-heading small {
    color:#a3a3a3;
    font-size:12px;
}

.card-setting-fields {
    display:grid;
    grid-template-columns:minmax(0, 1fr) 104px;
    gap:8px;
}

.card-setting-fields select,
.card-setting-fields input {
    width:100%;
    min-width:0;
    height:40px;
    padding:7px 10px;
    border:1px solid #4a4a4a;
    border-radius:8px;
    outline:none;
    background:#121212;
    color:#f5f5f5;
    text-align:center;
    font:inherit;
    font-variant-numeric:tabular-nums;
    transition:border-color .2s, box-shadow .2s;
}

.card-setting-fields select:focus,
.card-setting-fields input:focus {
    border-color:#f3b83f;
    box-shadow:0 0 0 3px rgba(243,184,63,.14);
}

.card-setting-fields .action-finder-btn {
    width:100%;
    min-height:40px;
    margin:0;
}

.card-setting-fields .action-finder-btn:disabled {
    cursor:wait;
    opacity:.65;
}

/* Card catalogue: navigation above three compact, page-scoped controls. */
.card-list-toolbar { display:flex; flex-wrap:wrap; gap:10px; margin:0 0 14px; }
.card-settings-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.card-list-page .card-setting-box { min-height:0; padding:12px; border-radius:10px; }
.card-list-page .card-setting-heading { margin-bottom:9px; }
.card-list-page .card-setting-heading label { font-size:14px; }
.card-list-page .card-setting-status:empty { display:none; }
.card-list-page .card-setting-status { min-height:22px; margin-top:6px; padding:4px 6px; }
.card-list-page .card-setting-fields { grid-template-columns:minmax(0,1fr) 90px; gap:7px; }
.card-list-page .card-setting-fields input,
.card-list-page .card-setting-fields select { height:36px; padding:5px 7px; font-size:13px; }
.card-list-page .card-setting-fields .action-finder-btn { min-height:36px; font-size:12px; }
.card-list-page .card-bulk-fields { grid-template-columns:minmax(76px,1fr) auto; }
.card-bulk-buttons { display:flex; gap:5px; }
.card-list-page .card-bulk-buttons .action-finder-btn { width:auto; padding:5px 7px; white-space:nowrap; }
.card-list-page #cards-table .action-row { justify-content:center; align-items:center; gap:10px; flex-wrap:wrap; }
.card-list-page #cards-table .action-finder-btn { min-width:88px; min-height:44px; padding:9px 12px; margin:0; font-size:15px; font-weight:700; }
.card-list-page #cards-table td:last-child { text-align:center; vertical-align:middle; }
.card-list-page .table-wrap { overflow-x:auto; }
.card-list-page .table-wrap table { min-width:680px; }
.card-bulk-dialog { width:min(460px,calc(100% - 28px)); max-height:calc(100vh - 40px); box-sizing:border-box; overflow-y:auto; padding:22px; border:1px solid #444; border-radius:14px; background:#202020; color:#eee; }
.card-bulk-dialog::backdrop { background:rgba(0,0,0,.7); }
.card-bulk-dialog label { display:block; margin:12px 0 6px; }
.card-bulk-dialog input,.card-bulk-dialog select { width:100%; box-sizing:border-box; min-height:42px; border:1px solid #555; border-radius:8px; background:#141414; color:#fff; padding:8px 10px; font:inherit; }
.card-bulk-dialog input:focus-visible,.card-bulk-dialog select:focus-visible { outline:2px solid #f3b83f; outline-offset:2px; }
.card-bulk-dialog small { display:block; color:#bbb; margin-top:10px; }
#card-bulk-error,#card-bulk-delete-warning { color:#fca5a5; line-height:1.8; }
#card-bulk-summary { line-height:1.8; }
@media(max-width:1000px) {
    .card-settings-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    #overall-bulk-box { grid-column:1/-1; }
}
@media(max-width:600px) {
    .card-settings-grid { grid-template-columns:minmax(0,1fr); }
    .card-list-page .card-bulk-fields { grid-template-columns:minmax(0,1fr); }
    .card-bulk-buttons { justify-content:center; }
    .card-list-page .card-bulk-buttons .action-finder-btn { flex:1; }
}

/* FARMER MODAL */

.cards-modal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.78);
    z-index:9999;
    justify-content:center;
    align-items:center;
    padding:40px;
}

.cards-modal-content{
    width:1100px;
    max-width:95vw;
    max-height:90vh;
    overflow-y:auto;
    background:#1a1a1a;
    border:1px solid #333;
    border-radius:14px;
    padding:25px;
    box-shadow:0 20px 50px rgba(0,0,0,.45);
}

/* CARD GRID */

.farmer-card-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
    gap:22px;
    margin-top:15px;
}

/* PLAYER CARD */

.farmer-player-card{
    background:#151515;
    border:1px solid #333;
    border-radius:14px;
    overflow:hidden;
    transition:.25s;
    display:flex;
    flex-direction:column;
}

.farmer-player-card:hover{
    transform:translateY(-4px);
    border-color:#f5c15c;
    box-shadow:0 15px 35px rgba(245,193,92,.18);
}

/* IMAGE */

.player-image{
    background:#111;
    padding:16px;
    display:flex;
    justify-content:center;
    align-items:center;
}

.player-image img{
    width:170px;
    max-width:100%;
    border-radius:10px;
    transition:.25s;
}

.farmer-player-card:hover img{
    transform:scale(1.05);
}

/* SCROLLBAR */

.cards-modal-content::-webkit-scrollbar{
    width:10px;
}

.cards-modal-content::-webkit-scrollbar-thumb{
    background:#444;
    border-radius:20px;
}

.cards-modal-content::-webkit-scrollbar-thumb:hover{
    background:#666;
}

/* MOBILE  */

@media(max-width:700px){
    .cards-modal{
        padding:15px;
    }

    .cards-modal-content{
        padding:18px;
    }

    .farmer-card-grid{
        grid-template-columns:1fr;
    }

    .player-image img{
        width:150px;
    }
}

/* IMAGE PREVIEW */

.player-preview{
    cursor:zoom-in;
    transition:.25s;
}

.player-preview:hover{
    transform:scale(1.06);
    filter:brightness(1.08);
}

/* IMAGE VIEWER */

.image-viewer{
    position:fixed;
    inset:0;
    display:none;
    justify-content:center;
    align-items:center;
    background:rgba(0,0,0,.88);
    z-index:10000;
}

.image-viewer img{
    max-width:90vw;
    max-height:88vh;
    border-radius:12px;
    border:2px solid #f5c15c;
    box-shadow:0 25px 60px rgba(0,0,0,.6);
    animation:imageZoom .2s ease;
}

.image-viewer-close{
    position:absolute;
    top:25px;
    right:35px;
    font-size:42px;
    color:white;
    cursor:pointer;
    transition:.2s;
    user-select:none;
}

.image-viewer-close:hover{
    color:#f5c15c;
    transform:scale(1.1);
}


@keyframes imageZoom{
    from{
        opacity:0;
        transform:scale(.9);
    }

    to{
        opacity:1;
        transform:scale(1);
    }
}

.cards-badge{
    display:inline-block;
    margin-right:8px;
    background:#dc2626;
    color:white;
    border-radius:20px;
    min-width:22px;
    padding:2px 7px;
    font-size:12px;
    font-weight:bold;
}

/* Statistics Cards */

.stats-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:18px;
    margin:25px 0 30px;
}

.stat-box{
    background:#fff;
    border:1px solid #e6e6e6;
    border-radius:14px;
    padding:22px;
    box-shadow:0 4px 18px rgba(0,0,0,.05);
    transition:.2s;
}

.stat-box:hover{
    transform:translateY(-3px);
    box-shadow:0 8px 25px rgba(0,0,0,.08);
}

.stat-title{
    font-size:14px;
    color:#777;
    margin-bottom:12px;
    font-weight:500;
}

.stat-value{
    font-size:32px;
    font-weight:700;
    color:#1f2937;
    line-height:1;
}

.card-setting-status {
    display:flex;
    align-items:center;
    min-height:30px;
    margin-top:8px;
    padding:5px 8px;
    border-radius:7px;
    font-size:12px;
    font-weight:700;
    line-height:1.5;
}

.card-setting-status:empty {
    visibility:hidden;
}

.card-setting-status.is-success {
    color:#86efac;
    background:rgba(34,197,94,.12);
    border:1px solid rgba(34,197,94,.25);
}

.card-setting-status.is-error {
    color:#fca5a5;
    background:rgba(239,68,68,.12);
    border:1px solid rgba(239,68,68,.25);
}

@media(max-width:760px){
    .left-actions{
        grid-template-columns:1fr;
        flex-basis:100%;
    }

    .right-actions{
        width:100%;
        justify-content:space-between;
    }
}

.dashboard-stats-grid{
    grid-template-columns:repeat(5, minmax(0, 1fr));
}

.dashboard-stats-grid:not(.employee-dashboard-stats-grid){
    grid-auto-rows:1fr;
}

.dashboard-stats-grid:not(.employee-dashboard-stats-grid) > .stat-box{
    min-width:0;
    padding:18px;
    align-content:center;
}

.dashboard-stat-number{
    direction:ltr;
    text-align:right;
    font-variant-numeric:tabular-nums;
}

.dashboard-stat-pair{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:8px;
    min-width:0;
}

#dashboard-prices{
    grid-template-columns:.85fr 1.15fr;
}

.dashboard-stat-pair > div{
    min-width:0;
}

.dashboard-stat-pair > div + div{
    border-inline-start:1px dashed #cbd5e1;
    padding-inline-start:8px;
}

.dashboard-stat-pair .stat-title{
    font-size:12px;
    margin-bottom:8px;
    line-height:1.7;
}

.dashboard-stat-pair .stat-title small{
    display:inline-block;
    font-size:11px;
}

.dashboard-stat-pair .stat-value{
    font-size:clamp(14px, 1vw, 20px);
    line-height:1.3;
    overflow-wrap:anywhere;
}

@media(max-width:1250px){
    .dashboard-stats-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
}

@media(max-width:560px){
    .dashboard-stats-grid{
        grid-template-columns:1fr;
    }

    .dashboard-stats-grid:not(.employee-dashboard-stats-grid) > .stat-box{
        padding:12px;
    }
}

.status-active {
    color: #15803d;
}

.status-inactive {
    color: #b91c1c;
}

.inactive-row {
    opacity: 0.7;
}

/* Cards Modal */

.cards-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
    gap:20px;
    margin-top:10px;
}

.card-box{
    background:#fff;
    border:1px solid #e6e6e6;
    border-radius:14px;
    overflow:hidden;
    transition:.25s;
    box-shadow:0 2px 8px rgba(0,0,0,.06);
}

.card-box:hover{
    transform:translateY(-3px);
    box-shadow:0 10px 22px rgba(0,0,0,.12);
}

.card-info{
    padding:15px;
}

.card-box .btn-success{
    width:100%;
    margin-top:5px;
}

.card-table{
    width:100%;
    border-collapse:collapse;
    margin-bottom:15px;
}

.card-table td{
    padding:8px 0;
    border-bottom:1px solid #efefef;
    font-size:14px;
}

.card-table td:last-child{
    text-align:left;
    font-weight:bold;
    color:#efefef;
}

.speed-cell{
    text-align:center;
    min-width:120px;
}

.speed-value{
    font-weight:700;
    font-size:14px;
    margin-bottom:4px;
}

.speed-green{
    color:#16a34a;
}

.speed-yellow{
    color:#d9b906;
}

.speed-red{
    color:#dc2626;
}

.eta-value{
    font-size:14px;
    color:#efefef;
}

.order-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.order-card-header h2 {
    margin: 0 0 7px;
}

.order-card-subtitle {
    margin: 0;
    opacity: 0.65;
    font-size: 14px;
    line-height: 1.8;
}


/* ALERT */

.order-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 12px;
    border: 1px solid;
}

.order-alert-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 800;
}

.order-alert-content {
    display: flex;
    flex-direction: column;
    gap: 4px;

    min-width: 0;
}

.order-alert-content strong {
    font-size: 14px;
}

.order-alert-content span {
    font-size: 13px;
    line-height: 1.8;
}

.order-alert-danger {
    background: rgba(239, 68, 68, 0.07);
    border-color: rgba(239, 68, 68, 0.22);
    color: #b91c1c;
}

.order-alert-danger .order-alert-icon {
    background: rgba(239, 68, 68, 0.12);
}

/* CSV CARD */

.csv-order-card {
    margin-top: 24px;
}

.csv-badge {
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* CSV INFO */

.csv-upload-info {
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.csv-upload-info-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
}

.csv-upload-info p {
    margin: 0 0 12px;
    font-size: 13px;
    opacity: 0.72;
}

.csv-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.csv-columns span {
    padding: 5px 8px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.12);
    font-family: monospace;
    font-size: 11px;
}


/* =========================
   CSV FILE INPUT
========================= */

.csv-file-field {
    position: relative;
}

.csv-file-field input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.csv-file-label {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
    border-radius: 12px;
    border: 1.5px dashed rgba(148, 163, 184, 0.45);
    cursor: pointer;
}

.csv-file-label:hover {
    border-color: rgba(16, 185, 129, 0.7);
    background: rgba(16, 185, 129, 0.04);
}

.csv-file-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    font-size: 11px;
    font-weight: 800;
}

.csv-file-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.csv-file-text strong {
    font-size: 14px;
}

.csv-file-text span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.6;
    font-size: 12px;
}

.csv-file-button {
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.1);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.csv-submit-container {
    margin-top: 18px;
}


/* CSV RESULT */

.csv-result-box {
    padding: 18px;
    margin-bottom: 22px;
    border-radius: 14px;
    border: 1px solid rgba(16, 185, 129, 0.18);

    background: rgba(16, 185, 129, 0.035);
}

.csv-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.csv-result-header > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.csv-result-header strong {
    font-size: 15px;
}

.csv-result-header span {
    font-size: 12px;
    opacity: 0.6;
}

.csv-result-stats {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.csv-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 13px 8px;
    border-radius: 10px;
}

.csv-stat strong {
    font-size: 22px;
    line-height: 1;
}

.csv-stat span {
    font-size: 11px;
    opacity: 0.75;
}

.csv-stat-success {
    color: #047857;
    background: rgba(16, 185, 129, 0.09);
}

.csv-stat-warning {
    color: #b45309;
    background: rgba(245, 158, 11, 0.1);
}

.csv-stat-danger {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.08);
}

/* CSV DETAILS  */

.csv-result-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid
        rgba(148, 163, 184, 0.16);
}

.csv-result-details-title {
    margin-bottom: 3px;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.7;
}

.csv-result-row {
    padding: 11px 12px;
    border-radius: 9px;
    border-right: 3px solid transparent;
}

.csv-result-row-warning {
    background: rgba(245, 158, 11, 0.07);
    border-right-color: #f59e0b;
}

.csv-result-row-danger {
    background: rgba(239, 68, 68, 0.06);
    border-right-color: #ef4444;
}

.csv-result-row-main {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.csv-row-number {
    font-size: 11px;
    font-weight: 700;
}

.csv-row-email {
    direction: ltr;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    opacity: 0.65;
}

.csv-row-error {
    font-size: 12px;
    line-height: 1.7;
}

.csv-more-errors {
    padding-top: 7px;
    text-align: center;
    font-size: 11px;
    opacity: 0.6;
}

/* MOBILE */

@media (max-width: 600px) {
    .csv-result-stats {
        grid-template-columns: 1fr;
    }

    .csv-file-button {
        display: none;
    }

    .csv-file-label {
        align-items: flex-start;
    }

    .order-card-header {
        align-items: center;
    }
}

/* =========================================================
   ADMINS / SUPERVISORS
========================================================= */

.management-body {
    min-height: 100vh;
}

.management-page {
    width: 90%;
    max-width: none;
    box-sizing: border-box;
}

.management-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid #303030;
}

.management-header h1 {
    margin: 5px 0 8px;
    font-size: 30px;
    line-height: 1.3;
}

.management-header p {
    margin: 0;
    color: #999;
    font-size: 14px;
    line-height: 1.8;
}

.management-eyebrow {
    display: inline-block;
    color: #f5c15c;
    font-size: 12px;
    font-weight: 700;
}

.management-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #444;
    border-radius: 9px;
    background: #242424;
    color: #eee;
    text-decoration: none;
    white-space: nowrap;
    transition: 0.2s ease;
}

.management-back-btn:hover {
    border-color: #f5c15c;
    background: #2c2c2c;
    color: #f5c15c;
    transform: translateY(-1px);
}


/* CARDS */

.management-page .management-card {
    padding: 22px;
    overflow: hidden;
}

.management-page .management-card + .management-card {
    margin-top: 24px;
}

.management-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.management-card .management-section-heading h2 {
    margin: 0 0 5px;
    text-align: right;
    font-size: 19px;
}

.management-section-heading p {
    margin: 0;
    color: #888;
    font-size: 13px;
    line-height: 1.7;
}

.management-count {
    padding: 7px 12px;
    border: 1px solid rgba(245, 193, 92, 0.2);
    border-radius: 20px;
    background: rgba(245, 193, 92, 0.08);
    color: #f5c15c;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}


/* CREATE FORMS */

.management-card .management-create-form {
    display: grid;
    align-items: end;
    gap: 14px;
}

.admin-create-form {
    grid-template-columns:
        minmax(180px, 1fr)
        minmax(180px, 1fr)
        minmax(180px, 1fr)
        auto;
}

.supervisor-create-form {
    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));
}

.management-field {
    min-width: 0;
}

.management-field label {
    display: block;
    margin-bottom: 7px;
    color: #bbb;
    font-size: 12px;
    font-weight: 600;
}

.management-field input,
.management-field select {
    height: 44px;
}

.management-ltr-field label {
    direction: ltr;
    text-align: left;
}

.management-ltr-field input,
.management-ltr {
    direction: ltr;
}

.management-submit-btn {
    min-width: 145px;
    height: 44px;
    padding: 0 18px;
    color: #fff;
}


/* TABLE */

.management-table-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #303030;
    border-radius: 12px;
}

.management-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0;
}

.admin-management-table {
    min-width: 1380px;
}

.supervisor-management-table {
    min-width: 900px;
}

.management-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 13px 12px;
    border-bottom: 1px solid #383838;
    background: #252525;
    font-size: 12px;
    white-space: nowrap;
}

.management-table td {
    padding: 12px;
    border-bottom: 1px solid #292929;
    vertical-align: middle;
    font-size: 13px;
}

#farmerPurchaseDetailsModal .management-table th,
#farmerPurchaseDetailsModal .management-table td {
    color: #fff;
}

.management-table tbody tr:last-child td {
    border-bottom: none;
}

.management-table tbody tr:nth-child(even) {
    background: #171717;
}

.management-table tbody tr:hover {
    background: #232323;
}

.management-table tr.inactive-row {
    background: rgba(239, 68, 68, 0.035);
    opacity: 1;
}

.management-table tr.inactive-row td {
    opacity: 0.58;
}

.management-table tr.inactive-row:hover td {
    opacity: 0.85;
}

.management-username,
.management-name {
    color: #f1f1f1;
    font-weight: 600;
}

.management-public-id {
    max-width: 180px;
    overflow: hidden;
    color: #aaa;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.management-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 7px;
    border-radius: 7px;
    background: #292929;
    color: #ddd;
    font-weight: 700;
}


/* STATUS */

.management-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 6px 10px;
    border: 1px solid;
    border-radius: 20px;
    background: rgb(122, 110, 2);
    font-size: 12px;
    font-weight: 700;
}

.management-status.is-active {
    border-color: rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.08);
    color: #4ade80;
}

.management-status.is-inactive {
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
}


/* EDIT FORMS */

.management-card .management-edit-form {
    display: grid;
    align-items: center;
    gap: 7px;
}

.admin-edit-form {
    grid-template-columns:
        minmax(135px, 1fr)
        minmax(120px, 1fr)
        minmax(155px, 1fr)
        auto;
    min-width: 560px;
}

.supervisor-edit-form {
    grid-template-columns: minmax(180px, 1fr) auto;
    min-width: 290px;
}

.management-edit-form input {
    min-width: 0;
    height: 38px;
    padding: 8px 10px;
    font-size: 12px;
}

.management-save-btn {
    height: 38px;
    padding: 0 15px;
    border-radius: 7px;
    font-size: 12px;
    white-space: nowrap;
}

.management-card .management-action-form {
    display: block;
}

.management-toggle-btn {
    min-width: 105px;
    height: 38px;
    padding: 0 13px;
    border: 1px solid;
    border-radius: 7px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s ease;
}

.management-toggle-btn.deactivate {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.management-toggle-btn.deactivate:hover {
    border-color: #ef4444;
    background: #7f1d1d;
    color: #fff;
}

.management-toggle-btn.activate {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.13);
    color: #4ade80;
}

.management-toggle-btn.activate:hover {
    border-color: #22c55e;
    background: #14532d;
    color: #fff;
}

.management-empty {
    padding: 45px !important;
    color: #777;
    text-align: center;
}


/* SCROLLBAR */

.management-table-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.management-table-scroll::-webkit-scrollbar-track {
    background: #161616;
}

.management-table-scroll::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #444;
}

.management-table-scroll::-webkit-scrollbar-thumb:hover {
    background: #666;
}


/* RESPONSIVE */

@media (max-width: 1100px) {

    .admin-create-form {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .admin-create-form .management-submit-btn {
        width: 100%;
    }

}

@media (max-width: 700px) {

    .management-page {
        width: calc(100% - 24px);
        margin-top: 18px;
        padding: 16px;
    }

    .management-header {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 20px;
    }

    .management-header h1 {
        font-size: 25px;
    }

    .management-back-btn {
        width: 100%;
        box-sizing: border-box;
    }

    .management-page .management-card {
        padding: 16px;
    }

    .management-section-heading {
        align-items: flex-start;
    }

    .admin-create-form,
    .supervisor-create-form {
        grid-template-columns: 1fr;
    }

    .management-submit-btn {
        width: 100%;
    }

}

.copy-btn {
    margin-right: 8px;
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    background: #2563eb;
    color: white;
    cursor: pointer;
    font-size: 12px;
}

.copy-btn:hover {
    background: #1d4ed8;
}

.copy-btn:disabled {
    opacity: 0.7;
    cursor: default;
}

.ringoo-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #2f6b45;
    color: #222;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}

.ringoo-filter input {
    width: 17px;
    height: 17px;
    cursor: pointer;
}

.price-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.price-targets label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
}

.price-targets input {
    width: 17px;
    height: 17px;
    cursor: pointer;
}


/* =========================================================
   FARMER INVOICE
========================================================= */

.invoice-top-bar {
    align-items: center;
}

#requestModal .withdrawal-available-balance {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    direction: rtl;
    padding: 12px 0;
    border-block: 1px solid #444;
}

#requestModal .withdrawal-available-balance > span {
    overflow-wrap: anywhere;
    min-width: 0;
}

#requestModal #farmerWalletCopyStatus:empty {
    display: none;
}


/* =========================
   INFO
========================= */

.invoice-info-box {
    margin-bottom: 20px;
}

.invoice-info-box p {
    margin-top: 6px;
    margin-bottom: 6px;
}

.farmer-invoice-page .container {
    box-sizing: border-box;
}

.farmer-invoice-page .farmer-wallet-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 14px;
    margin: 24px 0;
}

.farmer-invoice-page .farmer-wallet-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid #dbe3ed;
    border-radius: 14px;
    background: #f8fafc;
}

.farmer-invoice-page .farmer-wallet-card h3 {
    margin: 0 0 16px;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.farmer-invoice-page .farmer-wallet-value {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #0f172a;
}

.farmer-invoice-page .farmer-wallet-value strong {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(22px, 2vw, 30px);
    font-variant-numeric: tabular-nums;
}

.farmer-invoice-page .farmer-wallet-value > span {
    font-size: 12px;
}

.farmer-invoice-page .farmer-wallet-card p {
    margin: 12px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.8;
}

.farmer-invoice-page .farmer-wallet-card--pending {
    background: #fffbeb;
    border-color: #f2dda2;
}

.farmer-invoice-page .farmer-wallet-breakdown {
    margin: 12px 0 0;
    padding-top: 10px;
    border-top: 1px solid #dbe3ed;
    color: #334155;
    font-size: 13px;
    line-height: 1.8;
}

.farmer-invoice-page .farmer-wallet-breakdown > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 12px;
    padding: 3px 0;
}

.farmer-invoice-page .farmer-wallet-breakdown dd {
    margin: 0;
    font-weight: 700;
    overflow-wrap: anywhere;
    min-width: 0;
}

.farmer-invoice-page .farmer-wallet-card--available {
    background: #ecfdf5;
    border-color: #8adbb7;
}

.farmer-invoice-page .farmer-wallet-card--available h3,
.farmer-invoice-page .farmer-wallet-card--available .farmer-wallet-value {
    color: #065f46;
}

.farmer-invoice-page .farmer-wallet-copy {
    flex-shrink: 0;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #047857;
    border-radius: 9px;
    background: #047857;
    color: #fff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.farmer-invoice-page .farmer-wallet-copy:hover {
    background: #065f46;
}

.farmer-invoice-page .farmer-wallet-copy:focus-visible {
    outline: 3px solid #059669;
    outline-offset: 3px;
}

.farmer-invoice-page .farmer-wallet-copy:disabled {
    opacity: .6;
    cursor: wait;
}

.farmer-invoice-page .farmer-wallet-copy-status {
    display: block;
    min-height: 1.8em;
    margin-top: 4px;
    color: #065f46;
    font-size: 12px;
    line-height: 1.8;
}

@media (max-width: 1000px) {
    .farmer-invoice-page .farmer-wallet-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .farmer-invoice-page .farmer-wallet-card--available {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .farmer-invoice-page .container {
        width: calc(100% - 24px);
        padding: 16px;
        margin: 16px auto;
    }
    .farmer-invoice-page .invoice-top-bar {
        flex-wrap: wrap;
        gap: 12px;
    }
    .farmer-invoice-page .farmer-wallet-summary {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        margin: 18px 0;
    }
    .farmer-invoice-page .farmer-wallet-card {
        padding: 16px;
    }
}


/* =========================
   TABS
========================= */

.invoice-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 0;
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #d8d8d8;
    background: #f3f3f3;
}

.invoice-tab {
    width: 100%;
    border: none;
    border-radius: 0;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    background: #f3f3f3;
    color: #555;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.invoice-tab + .invoice-tab {
    border-right: 1px solid #d8d8d8;
}

.invoice-tab:hover {
    background: #e7e7e7;
}

.invoice-tab.active {
    background: #0d6efd;
    color: #fff;
}


/* =========================
   PANELS
========================= */

.invoice-panel {
    display: none;
}

.invoice-panel.active {
    display: block;
}


/* =========================
   SECTION HEADER
========================= */

.invoice-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.invoice-section-header h3 {
    margin: 0 0 5px 0;
}

.invoice-section-header p {
    margin: 0;
    color: #777;
    font-size: 13px;
}


/* =========================
   TABLE
========================= */

.invoice-table-scroll {
    width: 100%;
    max-height: 65vh;
    overflow: auto;
}

.invoice-table {
    width: 100%;
    min-width: 850px;
}

.invoice-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
}

.invoice-table th,
.invoice-table td {
    vertical-align: middle;
    text-align: center;
}

.invoice-order-id {
    direction: ltr;
    white-space: nowrap;
    font-size: 12px;
}

.invoice-price-list {
    direction: ltr;
    white-space: nowrap;
}

.invoice-date {
    direction: ltr;
    white-space: nowrap;
}

.invoice-total {
    font-weight: 700;
}

.invoice-empty {
    padding: 35px !important;
    text-align: center;
    color: #777;
}


.invoice-table-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.invoice-table-scroll::-webkit-scrollbar-track {
    background: #eeeeee;
    border-radius: 10px;
}

.invoice-table-scroll::-webkit-scrollbar-thumb {
    background: #b5b5b5;
    border-radius: 10px;
}

.invoice-table-scroll::-webkit-scrollbar-thumb:hover {
    background: #999999;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .invoice-tabs {
        margin-top: 15px;
        margin-bottom: 15px;
    }

    .invoice-tab {
        padding: 12px 8px;
        font-size: 13px;
    }

    .invoice-table-scroll {
        max-height: 60vh;
    }

    .invoice-section-header h3 {
        font-size: 16px;
    }

    .invoice-section-header p {
        font-size: 12px;
    }

}


.invoice-tabs-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.invoice-tabs-four .invoice-tab {
    min-width: 0;
    padding-inline: 6px;
}

.invoice-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
}

.invoice-summary-grid .stat-box {
    min-width: 0;
    align-content: center;
}

.invoice-summary-grid .stat-value {
    font-size: clamp(20px, 2vw, 30px);
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.invoice-summary-grid .format-number {
    display: inline-block;
    direction: ltr;
    unicode-bidi: isolate;
}

.invoice-adjustment-stat { border-top-color: #6366f1; }
.invoice-adjustment-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.invoice-adjustment-total { min-width: 0; }
.invoice-stat-inline-detail {
    flex: 1 1 auto;
    min-width: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.8;
}
.invoice-accounting-note, .invoice-cell-detail {
    color: #64748b;
    font-size: 12px;
    line-height: 1.9;
    margin-top: 8px;
}
.invoice-cell-detail { display: block; margin-top: 2px; }
.invoice-accounting-note {
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
}
.invoice-adjustment-kind {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    font-weight: 700;
}
.invoice-adjustment-kind.is-bonus { background: #e0f2fe; color: #075985; }
.invoice-adjustment-kind.is-penalty { background: #fff1f2; color: #9f1239; }
.invoice-adjustments-table .invoice-adjustment-description {
    min-width: 240px;
    max-width: 440px;
    text-align: right;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.8;
}
.invoice-adjustment-description details { margin-top: 8px; color: #64748b; font-size: 12px; }
.invoice-adjustment-description summary { cursor: pointer; color: #4338ca; }
@media (max-width: 768px) {
    .invoice-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .invoice-summary-grid .stat-box { padding: 14px; }
    .invoice-tabs-four .invoice-tab { font-size: 12px; padding: 12px 3px; }
}
@media (max-width: 400px) {
    .invoice-summary-grid { grid-template-columns: minmax(0, 1fr); }
    .invoice-tabs-four .invoice-tab { font-size: 11px; }
}

.invoice-tabs-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 0;
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #d8d8d8;
    background: #f3f3f3;
}

.invoice-tabs-three .invoice-tab {
    width: 100%;
    border: none;
    border-radius: 0;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    background: #f3f3f3;
    color: #555;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.invoice-tabs-three .invoice-tab + .invoice-tab {
    border-right: 1px solid #d8d8d8;
}

.invoice-tabs-three .invoice-tab:hover {
    background: #e7e7e7;
}

.invoice-tabs-three .invoice-tab.active {
    background: #0d6efd;
    color: #fff;
}

@media (max-width: 768px) {
    .invoice-tabs-three {
        margin-top: 15px;
        margin-bottom: 15px;
    }

    .invoice-tabs-three .invoice-tab {
        padding: 12px 5px;
        font-size: 12px;
    }
}

.searchable-select {
    position: relative;
    width: 100%;
}

.searchable-select-input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.searchable-select-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

.searchable-select-options {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    z-index: 1000;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.searchable-select-options.open {
    display: block;
}

.searchable-select-option {
    display: block;
    width: 100%;
    padding: 10px 13px;
    border: none;
    border-bottom: 1px solid #eee;
    border-radius: 0;
    background: #fff;
    color: #222;
    text-align: right;
    cursor: pointer;
}

.searchable-select-option:hover {
    background: #eef5ff;
    color: #0d6efd;
}

.searchable-select-empty {
    display: none;
    padding: 12px;
    color: #777;
    text-align: center;
}

.farmer-dashboard-header{
    margin-bottom:14px;
    padding:22px;
    background:
        linear-gradient(
            135deg,
            #181818 0%,
            #111 100%
        );
    border:1px solid #303030;
    border-radius:16px;
    box-shadow:0 12px 35px rgba(0,0,0,.24);
}

.farmer-header-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:25px;
    padding-bottom:18px;
    border-bottom:1px solid #2d2d2d;
}

.farmer-header-title{
    display:flex;
    flex-direction:column;
    gap:4px;
}

.farmer-header-title span{
    color:#888;
    font-size:12px;
}

.farmer-header-title h2{
    margin:0;
    color:#f5c15c;
    font-size:22px;
}

.farmer-header-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:8px;
}

.farmer-header-actions form{
    display:flex;
    margin:0;
}

.farmer-header-button{
    min-height:40px;
    padding:0 17px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    box-sizing:border-box;
    border:1px solid transparent;
    border-radius:9px;
    font-family:inherit;
    font-size:13px;
    font-weight:600;
    line-height:1;
    text-decoration:none;
    cursor:pointer;
    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .2s ease;
}

.farmer-header-button:hover{
    transform:translateY(-1px);
}

.order-price-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 4px 0 22px;
    padding: 14px;
    border: 1px solid rgba(245, 193, 92, 0.35);
    border-radius: 10px;
    background: rgba(245, 193, 92, 0.07);
}

.order-price-preview[hidden] {
    display: none;
}

.order-price-preview > div {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.order-price-preview span {
    color: #aaa;
    font-size: 12px;
}

.order-price-preview strong {
    direction: ltr;
    color: #f5c15c;
    font-size: 15px;
    text-align: right;
}

.modal-field-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color, #f2f2f2);
    font-weight: 700;
}

.shop-adjustment-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.shop-adjustment-option {
    position: relative;
    cursor: pointer;
}

.shop-adjustment-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.shop-adjustment-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9px;
    color: #f2f2f2;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 700;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.shop-adjustment-option.subtract input:checked + span {
    border-color: #ef5350;
    color: #ffb4b2;
    background: rgba(239, 83, 80, 0.13);
}

.shop-adjustment-option.add input:checked + span {
    border-color: #43a047;
    color: #a8e6ab;
    background: rgba(67, 160, 71, 0.13);
}

@media (max-width: 800px) {
    .order-price-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.farmer-header-button[hidden]{
    display:none;
}

.farmer-header-ready{
    background:#f5c15c;
    border-color:#f5c15c;
    color:#141414;
}

.farmer-header-ready:hover{
    background:#ffda86;
    border-color:#ffda86;
}

.farmer-header-secondary{
    background:#222;
    border-color:#383838;
    color:#ddd;
}

.farmer-header-secondary:hover{
    background:#2c2c2c;
    border-color:#4b4b4b;
    color:#fff;
}

.farmer-header-danger{
    background:transparent;
    border-color:#603535;
    color:#d88989;
}

.farmer-header-danger:hover{
    background:#3b2020;
    border-color:#744141;
    color:#fff;
}

.farmer-header-summary{
    padding-top:18px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:25px;
    flex-wrap:wrap;
}

.farmer-header-volumes{
    display:grid;
    grid-template-columns:repeat(3, minmax(140px, 1fr));
    gap:18px;
    max-width:100%;
    overflow-x:auto;
}
.farmer-header-volumes .farmer-header-coin{
    min-width:0;
    padding-inline-start:18px;
}
@media (max-width:600px){
    .farmer-header-volumes{width:100%; grid-template-columns:repeat(3, minmax(120px, 1fr)); gap:10px;}
    .farmer-header-volumes .farmer-header-coin{padding-inline-start:0;}
    .farmer-header-volumes .farmer-header-coin strong{font-size:18px; white-space:nowrap;}
}

.farmer-header-presence{
    min-width:0;
    display:flex;
    align-items:center;
    gap:13px;
}

.farmer-header-presence div{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:5px;
}

.farmer-header-presence strong{
    color:#eee;
    font-size:15px;
}

.farmer-header-presence div span{
    overflow:hidden;
    color:#929292;
    font-size:13px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.farmer-presence-dot{
    width:11px;
    height:11px;
    min-width:11px;
    border-radius:50%;
    background:#777;
}

.farmer-presence-dot.online{
    background:#42c978;
    box-shadow:0 0 12px rgba(66,201,120,.7);
}

.farmer-presence-dot.away{
    background:#f5c15c;
    box-shadow:0 0 12px rgba(245,193,92,.55);
}

.farmer-presence-dot.offline{
    background:#b14b4b;
    box-shadow:0 0 12px rgba(177,75,75,.45);
}

.farmer-header-coin{
    min-width:190px;
    padding-right:25px;
    display:flex;
    flex-direction:column;
    gap:5px;
    border-right:1px solid #303030;
}

.farmer-header-coin > span{
    color:#888;
    font-size:12px;
}

.farmer-header-coin strong{
    display:flex;
    align-items:baseline;
    gap:6px;
    direction:ltr;
    color:#f5c15c;
    font-size:23px;
}

.farmer-header-coin small{
    color:#777;
    font-size:11px;
    font-weight:500;
}

.farmer-account-info{
    margin-bottom:22px;
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:10px;
}

.farmer-card-time-warning{
    margin:-6px 0 22px;
    padding:16px 20px;
    border:1px solid #fda4af;
    border-radius:12px;
    background:#ffe4e6;
    color:#b91c1c;
    text-align:center;
    font-size:20px;
    line-height:2;
}

.farmer-card-time-warning-title{
    margin-bottom:3px;
    font-size:24px;
    font-weight:800;
}

.farmer-card-time-warning strong{
    color:#991b1b;
    font-weight:900;
}

.farmer-card-market-timer,
.farmer-card-lease-timer{
    direction:ltr;
    display:inline-block;
    min-width:52px;
    color:#dc2626;
    font-weight:800;
    font-variant-numeric:tabular-nums;
}

.farmer-card-lease-paused{
    color:#d97706;
    font-weight:800;
}

.farmer-info-title{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
}

.farmer-info-title > span{
    color:#777;
    font-size:12px;
}

.farmer-bank-edit{
    padding:3px 8px;
    border:1px solid #4b4023;
    border-radius:6px;
    background:#29220f;
    color:#f5c15c;
    font-family:inherit;
    font-size:10px;
    cursor:pointer;
}

.farmer-bank-edit:hover{
    background:#493817;
    border-color:#f5c15c;
}

.farmer-bank-value{
    direction:ltr;
    text-align:right;
    white-space:normal !important;
    overflow-wrap:anywhere;
}

.farmer-bank-modal{
    width:480px;
}

.farmer-bank-modal input{
    direction:ltr;
    text-align:left;
}

.farmer-bank-hint{
    color:#aaa;
    font-size:12px;
    line-height:2;
}

.farmer-bank-actions{
    margin-top:22px;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
}

#bankDetailsSubmit:disabled{
    opacity:.55;
    cursor:wait;
}

.farmer-info-item{
    min-width:0;
    padding:15px 17px;
    display:flex;
    flex-direction:column;
    gap:8px;
    background:#121212;
    border:1px solid #292929;
    border-radius:11px;
}

.farmer-info-item > span{
    color:#777;
    font-size:12px;
}

.farmer-info-item strong{
    overflow:hidden;
    color:#e6e6e6;
    font-size:14px;
    font-weight:600;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.farmer-info-ltr{
    direction:ltr;
    text-align:right;
}

.farmer-ready-modal-content{
    width:460px;
}

.farmer-ready-modal-content .modal-header h2{
    margin:0;
}

.farmer-ready-hint{
    margin:0;
    color:#aaa;
    font-size:13px;
    line-height:2;
    text-align:right;
}

.farmer-ready-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    margin-top:22px;
}

#farmerAvailableCoinInput{
    direction:ltr;
    text-align:left;
}

#farmerReadySubmit:disabled{
    opacity:.55;
    cursor:not-allowed;
}

@media(max-width:900px){
    .farmer-header-row{
        align-items:flex-start;
        flex-direction:column;
    }

    .farmer-header-actions{
        width:100%;
        justify-content:flex-start;
    }

    .farmer-account-info{
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media(max-width:600px){
    .farmer-dashboard-header{
        padding:17px;
    }

    .farmer-header-actions{
        display:grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .farmer-header-actions form{
        width:100%;
    }

    .farmer-header-button{
        width:100%;
        padding:0 12px;
    }

    .farmer-header-summary{
        align-items:flex-start;
        flex-direction:column;
    }

    .farmer-header-presence div span{
        white-space:normal;
        line-height:1.8;
    }

    .farmer-header-coin{
        width:100%;
        min-width:0;
        padding-top:15px;
        padding-right:0;
        border-top:1px solid #303030;
        border-right:0;
    }

    .farmer-account-info{
        grid-template-columns:1fr;
    }

    .farmer-ready-actions{
        align-items:stretch;
        flex-direction:column-reverse;
    }

    .farmer-ready-actions button{
        width:100%;
    }
}

.searchable-select-group{
    padding:8px 13px;
    position:sticky;
    top:0;
    z-index:2;
    background:#e9e9e9;
    color:#666;
    font-size:11px;
    font-weight:700;
    text-align:right;
}

.farmer-select-option{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
}

.farmer-select-option:disabled{
    opacity:.45;
    cursor:not-allowed;
}

.farmer-option-name{
    min-width:0;
    display:flex;
    align-items:center;
    gap:7px;
    font-weight:600;
}

.farmer-option-meta{
    direction:ltr;
    color:#777;
    font-size:11px;
    white-space:nowrap;
}

.farmer-option-star{
    color:#e4a800;
    font-size:16px;
}

.farmer-option-online-dot{
    width:8px;
    height:8px;
    min-width:8px;
    border-radius:50%;
    background:#42c978;
    box-shadow:0 0 7px rgba(66,201,120,.65);
}

.farmer-change-dialog{
    width:min(520px, calc(100% - 30px));
    padding:0;
    overflow:visible;
    background:#181818;
    border:1px solid #333;
    border-radius:14px;
    color:#eee;
}

.farmer-change-dialog > div{
    padding:22px;
}

.farmer-change-dialog::backdrop{
    background:rgba(0,0,0,.75);
}

.button-row .order-priority-btn { min-width: 36px; font-size: 16px; }
.order-priority-btn [data-priority-label][hidden] { display: none; }
#orderPriorityDialog .form-group { margin-bottom: 14px; }
#orderPriorityDialog label { display: block; margin-bottom: 8px; }
#orderPriorityValue { width: 100%; padding: 12px; border: 1px solid #555; border-radius: 9px; background: #242424; color: #eee; font: inherit; }
#orderPriorityValue:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
.order-priority-message { min-height: 1.5em; font-size: 13px; line-height: 1.8; }
.order-priority-message[data-error="true"] { color: #fca5a5; }

.farmer-change-header{
    margin-bottom:20px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:15px;
}

.farmer-change-header h3{
    margin:0 0 6px;
}

.farmer-change-header span{
    color:#888;
    font-size:12px;
}

.farmer-capacity-cell{
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:5px;
}

.farmer-capacity-cell strong{
    color:#f5c15c;
    font-size:18px;
}

.farmer-capacity-cell span{
    color:#888;
    font-size:11px;
}

.farmer-capacity-cell small{
    padding:3px 6px;
    border-radius:5px;
    font-size:10px;
}

.farmer-capacity-auto{
    background:rgba(66,201,120,.12);
    color:#42c978;
}

.farmer-capacity-manual{
    background:rgba(245,193,92,.12);
    color:#f5c15c;
}

.farmer-capacity-field{
    margin-top:12px;
}

.farmer-capacity-field label{
    margin-bottom:7px;
    display:block;
    color:#ccc;
    font-size:13px;
}

.farmer-capacity-field small{
    display:block;
    margin-top:5px;
    color:#777;
    font-size:11px;
}

.farmer-actions-grid{
    min-width:235px;
    display:grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap:6px;
}

#farmersTable th.farmer-sortable{
    position:relative;
    padding-inline-end:24px;
    cursor:pointer;
    user-select:none;
    white-space:nowrap;
}

#farmersTable th.farmer-sortable::after{
    content:"↕";
    position:absolute;
    inset-inline-end:8px;
    opacity:.4;
    font-size:11px;
}

#farmersTable th.farmer-sortable[data-sort-direction="asc"]::after{
    content:"▲";
    opacity:1;
    color:#f5c15c;
}

#farmersTable th.farmer-sortable[data-sort-direction="desc"]::after{
    content:"▼";
    opacity:1;
    color:#f5c15c;
}

.farmer-action-button{
    width:100%;
    min-height:34px;
    padding:6px 7px;
    border:1px solid transparent;
    border-radius:7px;
    font-family:inherit;
    font-size:10px;
    font-weight:600;
    cursor:pointer;
    transition:.2s ease;
}

.farmer-action-button:hover{
    transform:translateY(-1px);
}

.farmer-action-edit{
    background:#2f6b45;
    color:#fff;
}

.farmer-action-price{
    background:#8a681d;
    color:#fff;
}

.farmer-action-note{
    background:#315b7d;
    color:#fff;
}

.farmer-action-disable{
    background:#6f3030;
    color:#fff;
}

.farmer-action-enable{
    background:#2f6b45;
    color:#fff;
}

.farmer-action-delete{
    background:#8b1f2d;
    color:#fff;
}

#farmerNoteText{
    min-height:180px;
    resize:vertical;
}

.card-box-actions{
    display:flex;
    justify-content:center;
    margin-top:12px;
}

.card-box-actions button{
    width:100%;
}

.card-assignment-summary{
    direction:rtl;
    text-align:right !important;
    line-height:1.8;
    color:#f5c15c !important;
}

.admin-card-lease-box{
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:12px;
    padding:15px;
    margin-bottom:20px;
    background:#242424;
    border:1px solid #444;
    border-radius:12px;
    color:#fff;
}

.admin-card-lease-box.active{
    border-color:#16a34a;
    background:rgba(22,163,74,.12);
}

.admin-card-lease-box input{
    width:140px;
    padding:10px 12px;
    border:1px solid #555;
    border-radius:8px;
    background:#151515;
    color:#fff;
    text-align:center;
}

.assignment-mode-options{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}

.assignment-mode-option{
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:15px;
    border:1px solid #ddd;
    border-radius:12px;
    cursor:pointer;
    transition:.2s;
}

.assignment-mode-option:has(input:checked){
    border-color:#16a34a;
    background:rgba(22,163,74,.08);
}

.assignment-mode-option input{
    width:auto;
    margin-top:4px;
}

.assignment-mode-option span{
    display:flex;
    flex-direction:column;
    gap:5px;
}

.assignment-mode-option small{
    color:#777;
    line-height:1.7;
}

.auto-distribution-badge{
    display:inline-flex;
    align-items:center;
    padding:6px 10px;
    border:1px solid #f5c15c;
    border-radius:20px;
    color:#f5c15c;
    background:rgba(245,193,92,.1);
    white-space:nowrap;
}

@media(max-width:700px){
    .assignment-mode-options{
        grid-template-columns:1fr;
    }
}

.add-order-form .assignment-mode-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.add-order-form .order-initial-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.add-order-form .assignment-mode-option {
    display: flex;
    box-sizing: border-box;
    min-width: 0;
    margin-bottom: 0;
}

.add-order-form .assignment-mode-option span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.add-order-form .assignment-mode-option input {
    flex: 0 0 auto;
    accent-color: #16a34a;
}

.add-order-form .assignment-mode-option:has(input:focus-visible) {
    outline: 2px solid #16a34a;
    outline-offset: 3px;
}

@media (max-width: 520px) {
    .add-order-form .assignment-mode-options { gap: 8px; }
    .add-order-form .assignment-mode-option { padding: 10px 8px; gap: 6px; }
    .add-order-form .assignment-mode-option small { font-size: 11px; }
    .add-order-form .assignment-mode-options:not(.order-initial-options) .assignment-mode-option {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .add-order-form .assignment-mode-options:not(.order-initial-options) .assignment-mode-option span {
        width: 100%;
        overflow-wrap: normal;
    }
    .add-order-form .assignment-mode-options:not(.order-initial-options) .assignment-mode-option strong {
        font-size: 12px;
    }
}

.order-farmer-display{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:7px;
}

.reassignment-pending-badge{
    padding:4px 8px;
    border:1px solid #f59e0b;
    border-radius:20px;
    background:rgba(245,158,11,.12);
    color:#f59e0b;
    font-size:11px;
    white-space:nowrap;
}

.admin-notification-toolbar{
    display:flex;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:10px;
    margin:12px 0;
}

.admin-notification-wrap{
    position:relative;
}

.admin-notification-button{
    display:flex;
    align-items:center;
    gap:8px;
    padding:10px 14px;
    border:1px solid #444;
    border-radius:10px;
    background:#222;
    color:#fff;
    cursor:pointer;
}

.admin-notification-button strong{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:22px;
    height:22px;
    padding:0 6px;
    border-radius:20px;
    background:#dc2626;
    color:#fff;
    font-size:12px;
}

.admin-notification-panel{
    display:none;
    position:absolute;
    top:calc(100% + 8px);
    left:0;
    width:390px;
    max-width:90vw;
    max-height:430px;
    overflow-y:auto;
    padding:12px;
    border:1px solid #444;
    border-radius:12px;
    background:#191919;
    box-shadow:0 18px 40px rgba(0,0,0,.45);
    z-index:15000;
}

.admin-notification-panel.open{
    display:block;
}

.farmer-notification-wrap-wide .admin-notification-button{
    min-width:230px;
    justify-content:center;
}

.farmer-notification-panel-wide{
    width:680px;
    max-width:calc(100vw - 28px);
    max-height:min(560px,calc(100vh - 150px));
    overflow:hidden;
}

.farmer-notification-filter-row{
    display:flex;
    align-items:center;
    gap:7px;
    padding:2px 2px 12px;
    overflow-x:auto;
    scrollbar-width:thin;
}

.farmer-auto-exemption-actions{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.farmer-auto-exemption-button{
    padding:6px 12px;
    border:1px solid #b88737;
    border-radius:8px;
    background:#302718;
    color:#ffd68b;
    font:inherit;
    font-size:12px;
    cursor:pointer;
}

.farmer-auto-exemption-button:disabled{
    opacity:.5;
    cursor:wait;
}

.farmer-notification-filter{
    flex:1 0 82px;
    min-width:0;
    padding:9px 10px;
    border:1px solid #3b3b3b;
    border-radius:9px;
    background:#242424;
    color:#cfcfcf;
    font-size:12px;
    font-weight:700;
    direction:ltr;
    cursor:pointer;
    transition:.18s ease;
}

.farmer-notification-filter:hover{
    border-color:#6a5730;
    color:#f5c15c;
}

.farmer-notification-filter.active{
    border-color:#f5c15c;
    background:rgba(245,193,92,.16);
    color:#f5c15c;
    box-shadow:0 0 0 1px rgba(245,193,92,.08) inset;
}

.farmer-notification-filter-body{
    max-height:min(390px,calc(100vh - 270px));
    overflow-y:auto;
    padding-left:3px;
}

.admin-notification-panel-header{
    padding:8px 5px 12px;
    color:#f5c15c;
    font-weight:700;
}

.low-coin-farmer-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:12px;
    margin-bottom:8px;
    border:1px solid #333;
    border-radius:10px;
    background:#222;
}

.low-coin-farmer-item div{
    display:flex;
    flex-direction:column;
    gap:5px;
}

.low-coin-farmer-item small{
    color:#aaa;
}

.low-coin-ready-label{
    padding:4px 8px;
    border-radius:20px;
    background:rgba(22,163,74,.14);
    color:#22c55e;
    font-size:11px;
}

.farmer-notification-group + .farmer-notification-group{
    margin-top:14px;
    padding-top:12px;
    border-top:1px solid #333;
}

.farmer-notification-group-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin:0 2px 8px;
    color:#f5c15c;
    font-size:12px;
    font-weight:700;
}

.farmer-notification-group-header strong{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:24px;
    height:22px;
    padding:0 7px;
    border-radius:20px;
    background:#303030;
    color:#fff;
    font-size:11px;
}

.farmer-notification-group-empty{
    padding:10px 12px;
    border:1px dashed #333;
    border-radius:9px;
    color:#777;
    font-size:11px;
    text-align:center;
}

@media(max-width:700px){
    .farmer-notification-panel-wide{
        left:0;
        width:calc(100vw - 28px);
    }

    .farmer-notification-filter-row{
        padding-bottom:10px;
    }

    .farmer-notification-filter{
        flex-basis:76px;
    }
}

.admin-toast-container{
    position:fixed;
    top:20px;
    right:20px;
    z-index:30000;
    width:min(430px,calc(100vw - 40px));
}

.admin-toast{
    opacity:0;
    transform:translateY(-10px);
    padding:14px 16px;
    margin-bottom:10px;
    border:1px solid #f5c15c;
    border-radius:12px;
    background:#1c1c1c;
    color:#fff;
    line-height:1.8;
    box-shadow:0 14px 35px rgba(0,0,0,.45);
    transition:.25s;
}

.admin-toast.show{
    opacity:1;
    transform:translateY(0);
}

button.auto-distribution-badge{
    font:inherit;
    cursor:pointer;
}

button.auto-distribution-badge:hover{
    background:rgba(245,193,92,.2);
}

.auto-distribution-summary{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    margin-bottom:20px;
}

.auto-distribution-summary div{
    display:flex;
    flex-direction:column;
    gap:7px;
    padding:14px;
    border:1px solid #3a3a3a;
    border-radius:12px;
    background:#222;
    text-align:center;
}

.auto-distribution-summary strong{
    color:#f5c15c;
    font-size:20px;
}

.auto-farmer-name{
    display:flex;
    align-items:center;
    gap:8px;
}

.auto-presence-dot{
    width:9px;
    height:9px;
    border-radius:50%;
    background:#777;
}

.auto-presence-dot.online{
    background:#16a34a;
    box-shadow:0 0 8px rgba(22,163,74,.8);
}

.auto-presence-dot.away{
    background:#f59e0b;
}

@media(max-width:700px){
    .auto-distribution-summary{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

/* FARMER RULES MODAL */

.rules-modal-content{
    width:min(780px, 95vw);
    max-height:90vh;
    padding:0;
    overflow:hidden;
    background:
        linear-gradient(
            145deg,
            #1d1d1d,
            #151515
        );
}

.rules-modal-header{
    margin:0;
    padding:22px 26px;
    border-bottom:1px solid #343434;
    background:rgba(255,255,255,.015);
}

.rules-modal-header > div{
    display:flex;
    flex-direction:column;
    gap:5px;
}

.rules-modal-header h2{
    margin:0;
    color:#f5c15c;
    font-size:22px;
    font-weight:800;
}

.rules-modal-label{
    color:#858585;
    font-size:11px;
    font-weight:600;
}

.rules-content{
    max-height:calc(90vh - 100px);
    padding:25px 30px 35px;
    overflow-y:auto;
    direction:rtl;
    text-align:right;
    font-family:"IRANSans", Tahoma, Arial, sans-serif;
}

.rules-title{
    margin:0 0 22px;
    padding-bottom:15px;
    color:#f5c15c;
    border-bottom:1px solid #333;
    font-size:23px;
    font-weight:900;
    line-height:1.8;
}

.rules-section-title{
    position:relative;
    margin:30px 0 14px;
    padding-right:17px;
    color:#f0f0f0;
    font-size:18px;
    font-weight:800;
    line-height:1.8;
}

.rules-section-title::before{
    content:"";
    position:absolute;
    top:8px;
    right:0;
    width:4px;
    height:22px;
    border-radius:10px;
    background:#f5c15c;
}

.rules-paragraph{
    margin:0 0 15px;
    color:#cfcfcf;
    font-size:15px;
    font-weight:400;
    line-height:2.15;
}

.rules-list{
    margin:10px 0 22px;
    padding:16px 42px 16px 20px;
    border:1px solid #303030;
    border-radius:12px;
    background:#191919;
}

.rules-list li{
    margin:0 0 10px;
    padding-right:4px;
    color:#d7d7d7;
    font-size:15px;
    font-weight:500;
    line-height:2;
}

.rules-list li:last-child{
    margin-bottom:0;
}

.rules-list li::marker{
    color:#f5c15c;
}

.rules-warning{
    margin:22px 0;
    padding:16px 18px;
    border:1px solid rgba(245,193,92,.35);
    border-right:4px solid #f5c15c;
    border-radius:10px;
    background:rgba(245,193,92,.08);
    color:#f3d99d;
    font-size:14px;
    font-weight:700;
    line-height:2;
}

.rules-loading{
    margin:30px 0;
    color:#888;
    font-size:14px;
    text-align:center;
}

.rules-content::-webkit-scrollbar{
    width:8px;
}

.rules-content::-webkit-scrollbar-thumb{
    border-radius:10px;
    background:#444;
}

.rules-content::-webkit-scrollbar-thumb:hover{
    background:#666;
}

@media(max-width:600px){
    .rules-modal-content{
        width:100%;
        max-width:100%;
        max-height:calc(100vh - 30px);
    }

    .rules-modal-header{
        padding:17px;
    }

    .rules-modal-header h2{
        font-size:18px;
    }

    .rules-content{
        max-height:calc(100vh - 115px);
        padding:20px 17px 28px;
    }

    .rules-title{
        font-size:20px;
    }

    .rules-section-title{
        font-size:16px;
    }

    .rules-paragraph,
    .rules-list li{
        font-size:14px;
    }
}

.auto-withdrawal-modal-content {
    width: 560px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.auto-withdrawal-rules {
    margin: 16px 0 20px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #475569;
    font-size: 12.5px;
    line-height: 2;
}

.auto-withdrawal-rules strong {
    color: #1e293b;
    font-size: 13px;
}

.auto-withdrawal-rules ul {
    margin: 8px 0 0;
    padding-right: 20px;
}

.auto-withdrawal-rules li {
    margin-bottom: 4px;
}

#autoWithdrawalTime {
    width: 100%;
    direction: ltr;
    text-align: center;
    font-size: 18px;
}

.auto-withdrawal-accept {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 13px;
    cursor: pointer;
}

.auto-withdrawal-next-run,
.auto-withdrawal-status {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #ecfdf5;
    color: #166534;
    font-size: 13px;
}

.auto-withdrawal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.auto-withdrawal-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Account and compact management pages */
.account-header {
    align-items: flex-start;
}

.account-header .button-container {
    justify-content: flex-end;
}

.account-header form {
    margin: 0;
}

.account-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 22px 0;
}

.account-summary-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 110px;
    padding: 20px;
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff, #f7fafc);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.account-summary-card span,
.account-summary-card small {
    color: #64748b;
}

.account-summary-card strong {
    color: #0f172a;
    font-size: 20px;
    direction: ltr;
    text-align: right;
}

.account-summary-wide {
    grid-column: span 3;
}

.account-form-card {
    margin-bottom: 22px;
}

.account-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.account-form-actions {
    display: flex;
    align-items: flex-end;
}

.account-sections-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.amount-negative {
    color: #b91c1c !important;
    font-weight: 800;
}

.management-row-subtitle {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 11px;
}

.compact-management-toolbar {
    margin: 14px 0;
}

.compact-management-table {
    min-width: 1050px;
}

.auto-reassign-button{
    min-width:96px;
    padding:7px 10px;
    white-space:nowrap;
}

.auto-reassign-button:disabled{
    opacity:.45;
    cursor:not-allowed;
    transform:none;
}

.continue-order-summary{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    margin-bottom:16px;
}

.continue-order-summary div{
    display:flex;
    flex-direction:column;
    gap:7px;
    padding:13px 10px;
    border:1px solid #3a3a3a;
    border-radius:11px;
    background:#222;
    text-align:center;
}

.continue-order-summary span{
    color:#aaa;
    font-size:12px;
}

.continue-order-summary strong{
    color:#f5c15c;
    direction:ltr;
    font-size:17px;
}

.continue-order-note{
    margin:0 0 18px;
    padding:12px 14px;
    border:1px solid #3c4652;
    border-radius:10px;
    background:#202832;
    color:#d7e4f2;
    line-height:1.9;
}

@media(max-width:700px){
    .continue-order-summary{
        grid-template-columns:1fr;
    }
}

.order-farmer-details-scroll {
    overflow-x: hidden;
}

.order-farmer-details-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

.order-farmer-details-table th,
.order-farmer-details-table td {
    color: #fff;
    overflow-wrap: anywhere;
    white-space: normal;
}

.order-farmer-details-table th:nth-child(1) { width: 24%; }
.order-farmer-details-table th:nth-child(2) { width: 22%; }
.order-farmer-details-table th:nth-child(3) { width: 20%; }
.order-farmer-details-table th:nth-child(4),
.order-farmer-details-table th:nth-child(5) { width: 17%; }

.invoice-card-batches { margin-top: 20px; }
.invoice-card-batches h4 { color: #0f172a; margin: 0 0 12px; }
.invoice-batch-note { color: #64748b; font-size: 12px; line-height: 1.9; margin: 0 0 12px; }
.order-card-batches-table th:nth-child(1) { width: 14%; }
.order-card-batches-table th:nth-child(2) { width: 23%; }
.order-card-batches-table th:nth-child(3) { width: 14%; }
.order-card-batches-table th:nth-child(4) { width: 29%; }
.order-card-batches-table th:nth-child(5) { width: 20%; }

#orderFarmerDetailsModal .modal-box {
    max-height: 92vh;
    max-height: 92dvh;
    overflow-y: auto;
}

@media (max-width: 600px) {
    #orderFarmerDetailsModal .modal-box { padding: 14px; }
    #orderFarmerDetailsModal .management-table th,
    #orderFarmerDetailsModal .management-table td { padding: 9px 4px; font-size: 12px; }
}

.management-actions,
.compact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    justify-content: center;
}

.management-actions form {
    margin: 0;
}

.management-actions button {
    white-space: nowrap;
    padding: 8px 10px;
    font-size: 12px;
}

.management-modal {
    z-index: 22000;
}

.modal-box-wide {
    width: min(900px, calc(100vw - 32px));
    max-width: 900px;
}

.modal-form {
    display: grid;
    gap: 14px;
}

.modal-form label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-weight: 700;
}

.modal-form input,
.modal-form select,
.modal-form textarea,
#farmerAdjustmentForm textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    -webkit-text-fill-color: #0f172a;
    caret-color: #0f172a;
}

.modal-form input::placeholder,
.modal-form textarea::placeholder {
    color: #64748b;
    -webkit-text-fill-color: #64748b;
}

.modal-box {
    color: #0f172a;
}

.password-option {
    display: flex !important;
    align-items: center;
    grid-template-columns: none !important;
    flex-direction: row !important;
    gap: 8px !important;
    color: #0f172a !important;
    cursor: pointer;
}

.password-option input {
    width: 17px !important;
    height: 17px;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-text-fill-color: initial;
}

.edit-password-group {
    display: grid;
    gap: 10px;
}

[hidden] {
    display: none !important;
}

#farmerAdjustmentForm label {
    color: #0f172a;
    font-weight: 700;
}

.admin-management-table th:last-child,
.admin-management-table td:last-child,
.supervisor-management-table th:last-child,
.supervisor-management-table td:last-child {
    text-align: center;
}

.modal-description {
    padding: 10px 12px;
    border-radius: 10px;
    color: #475569;
    background: #f1f5f9;
}

/* Finance settings: exchange rate, order range, farmer daily-price range. */
.modal-box.finance-settings-modal {
    display: flex;
    flex-direction: column;
    width: 610px;
    max-width: calc(100vw - 28px);
    max-height: 92vh;
    max-height: 92dvh;
    box-sizing: border-box;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.finance-settings-header {
    flex-shrink: 0;
    margin: 0;
    padding: 22px 24px 18px;
    gap: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.finance-settings-header h3 { color: #0f172a; font-size: 20px; }
.finance-settings-header p { margin: 8px 0 0; color: #64748b; font-size: 13px; }

.finance-close-btn {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
}

.finance-close-btn:hover { background: #fee2e2; color: #991b1b; }
.finance-settings-body { overflow-y: auto; min-height: 0; padding: 20px 24px; background: #f8fafc; }
.finance-settings-section { padding: 16px; margin-bottom: 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; }
.finance-section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.finance-section-heading h4 { margin: 0; color: #1e293b; font-size: 15px; }
.finance-section-number { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 9px; background: #e0f2fe; color: #0369a1; font-weight: 700; }
.finance-section-order .finance-section-number { background: #ede9fe; color: #6d28d9; }
.finance-section-farmer .finance-section-number { background: #dcfce7; color: #166534; }
.finance-unit-badge { margin-inline-start: auto; padding: 4px 8px; border-radius: 6px; background: #f1f5f9; color: #475569; font-size: 11px; white-space: nowrap; }
.finance-range-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.finance-settings-modal label { display: block; margin-bottom: 8px; color: #475569; font-size: 13px; }
.finance-settings-modal input { direction: ltr; text-align: left; margin: 0; background: #fff; color: #0f172a; -webkit-text-fill-color: #0f172a; border-color: #cbd5e1; border-radius: 9px; padding: 11px 12px; }
.finance-settings-modal input::placeholder { color: #94a3b8; -webkit-text-fill-color: #94a3b8; }
.finance-settings-modal input:focus { border-color: #0891b2; box-shadow: 0 0 0 3px rgba(8, 145, 178, .12); }
.finance-section-help { margin: 12px 0 0; color: #64748b; font-size: 12px; line-height: 1.9; }
.finance-updated-at { margin: 0; font-size: 11px; line-height: 1.8; color: #64748b; }
.finance-settings-error { padding: 12px; color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; line-height: 1.8; font-size: 13px; }
.finance-settings-actions { margin: 0; padding: 16px 24px; border-top: 1px solid #e2e8f0; flex-shrink: 0; justify-content: flex-start; background: #fff; }
.finance-settings-actions button { font-size: 13px; }
.finance-settings-actions .btn-secondary { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.finance-settings-actions button:disabled { opacity: .65; cursor: wait; }

@media (max-width: 520px) {
    .finance-settings-header { padding: 16px; }
    .finance-settings-body { padding: 14px; }
    .finance-settings-section { padding: 12px; }
    .finance-range-grid { grid-template-columns: 1fr; gap: 12px; }
    .finance-settings-actions { padding: 14px; }
    .finance-section-heading { gap: 7px; flex-wrap: wrap; }
    .finance-section-heading h4 { font-size: 14px; }
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-height: 70vh;
    overflow: auto;
}

.details-grid > div {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    overflow-wrap: anywhere;
}

.details-grid span {
    color: #64748b;
    font-size: 12px;
}

.details-grid strong {
    color: #0f172a;
}

.farmer-action-info {
    background: #475569;
}

.farmer-action-cards {
    background: #0369a1;
    color: #fff;
}

.farmer-action-adjustment {
    background: #7c3aed;
}

.farmer-active-cards-modal {
    max-width: 1180px;
    width: min(1180px, calc(100vw - 32px));
}

.farmer-active-cards-summary {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.farmer-active-card-count {
    padding: 7px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
}

.farmer-active-card-count.active {
    color: #166534;
    background: #dcfce7;
}

.farmer-active-card-count.grace {
    color: #9a3412;
    background: #ffedd5;
}

.farmer-active-cards-table {
    min-width: 980px;
}

.farmer-active-card-grace-row td {
    background: #fff7ed;
    color: #9a3412;
}

#farmerAdjustmentForm {
    display: grid;
    gap: 10px;
}

@media (max-width: 950px) {
    .account-summary-grid,
    .account-form-grid,
    .account-sections-grid,
    .details-grid {
        grid-template-columns: 1fr 1fr;
    }

    .account-summary-wide {
        grid-column: span 1;
    }
}

@media (max-width: 620px) {
    .account-summary-grid,
    .account-form-grid,
    .account-sections-grid,
    .details-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   MANAGEMENT DASHBOARD SIDEBAR
   Scoped to dashboard.html so other pages keep their layout.
========================================================= */

.dashboard-page {
    min-width: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 88% 8%, rgba(245, 193, 92, .08), transparent 28%),
        #0d0d0d;
}

.dashboard-shell {
    display: flex;
    min-width: 0;
    min-height: 100vh;
    align-items: flex-start;
    direction: rtl;
}

.dashboard-main.container {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin: 24px 24px 24px 28px;
    padding: 25px;
}

.dashboard-sidebar {
    position: sticky;
    top: 0;
    z-index: 10000;
    display: flex;
    flex: 0 0 270px;
    width: 270px;
    height: 100vh;
    box-sizing: border-box;
    flex-direction: column;
    padding: 22px 17px 18px;
    overflow-x: visible;
    overflow-y: auto;
    color: #e8edf5;
    background:
        linear-gradient(155deg, rgba(245, 193, 92, .08), transparent 27%),
        linear-gradient(180deg, #191b21 0%, #101116 100%);
    border-left: 1px solid rgba(245, 193, 92, .22);
    box-shadow: -15px 0 45px rgba(0, 0, 0, .28);
}

.dashboard-sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #f5c15c 50%, transparent);
}

.dashboard-sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 26px;
    padding: 16px 14px;
    border: 1px solid rgba(245, 193, 92, .2);
    border-radius: 16px;
    background:
        linear-gradient(120deg, rgba(245, 193, 92, .1), rgba(255, 255, 255, .025));
    box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
}

.dashboard-sidebar-avatar {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border: 1px solid rgba(245, 193, 92, .24);
    border-radius: 13px;
    color: #f5c15c;
    background: rgba(245, 193, 92, .14);
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 800;
}

.dashboard-sidebar-user > div {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 2px;
}

.dashboard-sidebar-user small {
    color: #9ba4b3;
    font-size: 11px;
}

.dashboard-sidebar-user strong {
    overflow: hidden;
    color: #e8edf5;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    text-align: right;
}

.dashboard-sidebar-user i {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: #31c977;
    box-shadow: 0 0 0 4px rgba(49, 201, 119, .11);
}

.dashboard-sidebar-section-title {
    display: block;
    padding: 0 7px 11px;
    color: #6f7888;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2px;
}

.dashboard-page .dashboard-sidebar-actions {
    display: grid;
    align-items: stretch;
    gap: 11px;
    margin: 0;
}

.dashboard-page .dashboard-sidebar-link {
    display: grid;
    min-height: 52px;
    box-sizing: border-box;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 13px;
    color: #cbd2dd;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    transition: 160ms ease;
}

.dashboard-page .dashboard-sidebar-link:hover {
    border-color: rgba(245, 193, 92, .2);
    color: #fff;
    background: rgba(255, 255, 255, .06);
    transform: translateX(-3px);
}

.dashboard-page .dashboard-sidebar-link-primary {
    border-color: rgba(245, 193, 92, .25);
    color: #fff1ca;
    background: linear-gradient(90deg, rgba(245, 193, 92, .15), rgba(245, 193, 92, .04));
}

.dashboard-sidebar-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    color: #f5c15c;
    background: rgba(245, 193, 92, .09);
    font-family: Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
}

.dashboard-sidebar-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-sidebar-link b {
    color: #606979;
    font-family: Arial, sans-serif;
    font-size: 19px;
    font-weight: 400;
}

.dashboard-sidebar .site-notification-center {
    display: block;
    width: 100%;
}

.dashboard-sidebar .site-notification-trigger {
    width: 100%;
    min-height: 52px;
    box-sizing: border-box;
    justify-content: flex-start;
    padding: 10px 13px;
    border-color: rgba(96, 165, 250, .2);
    border-radius: 13px;
    color: #d9e7fb;
    background: rgba(59, 130, 246, .08);
    box-shadow: none;
    font-size: 14px;
}

.dashboard-sidebar .site-notification-trigger:hover,
.dashboard-sidebar .site-notification-trigger[aria-expanded="true"] {
    border-color: rgba(96, 165, 250, .42);
    color: #fff;
    background: rgba(59, 130, 246, .15);
    transform: translateX(-3px);
}

.dashboard-sidebar .site-notification-panel {
    position: fixed;
    top: 190px;
    right: 283px;
}

.dashboard-sidebar-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 17px 7px 0;
    color: #687181;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.dashboard-sidebar-footer span {
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    border-radius: 50%;
    background: #f5c15c;
}

.dashboard-sidebar-footer p {
    margin: 0;
    font-size: 9px;
}

.dashboard-sidebar-toggle,
.dashboard-sidebar-close,
.dashboard-sidebar-overlay {
    display: none;
}

@media (max-width: 1180px) and (min-width: 981px) {
    .dashboard-sidebar {
        flex-basis: 238px;
        width: 238px;
        padding-inline: 13px;
    }

    .dashboard-main.container {
        margin-inline: 18px;
    }

    .dashboard-sidebar .site-notification-panel {
        right: 251px;
    }
}

@media (max-width: 980px) {
    .dashboard-shell {
        display: block;
    }

    .dashboard-main.container {
        width: calc(100% - 24px);
        margin: 72px 12px 18px;
        padding: 18px;
        box-sizing: border-box;
    }

    .dashboard-sidebar {
        position: fixed;
        top: 0;
        right: -330px;
        z-index: 18000;
        width: min(310px, 86vw);
        height: 100dvh;
        padding-top: 18px;
        transition: right 220ms ease;
    }

    .dashboard-sidebar.is-open {
        right: 0;
    }

    .dashboard-sidebar-toggle {
        display: inline-flex;
        position: fixed;
        top: 14px;
        right: 14px;
        z-index: 17000;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
        border: 1px solid rgba(245, 193, 92, .35);
        border-radius: 12px;
        background: #191b21;
        box-shadow: 0 8px 25px rgba(0, 0, 0, .35);
        cursor: pointer;
    }

    .dashboard-sidebar-toggle span {
        width: 19px;
        height: 2px;
        border-radius: 4px;
        background: #f5c15c;
    }

    .dashboard-sidebar-close {
        display: grid;
        width: 30px;
        height: 30px;
        margin-right: auto;
        place-items: center;
        border: 1px solid rgba(255, 255, 255, .09);
        border-radius: 9px;
        color: #aab2c0;
        background: rgba(255, 255, 255, .04);
        font: 22px/1 Arial, sans-serif;
        cursor: pointer;
    }

    .dashboard-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 17500;
        visibility: hidden;
        opacity: 0;
        background: rgba(0, 0, 0, .66);
        backdrop-filter: blur(3px);
        transition: opacity 200ms ease, visibility 200ms ease;
    }

    .dashboard-sidebar-overlay.is-visible {
        visibility: visible;
        opacity: 1;
    }

    body.dashboard-sidebar-open {
        overflow: hidden;
    }

    .dashboard-sidebar .site-notification-panel {
        position: fixed;
        top: 70px;
        right: 13px;
        left: 13px;
        width: auto;
        max-height: calc(100dvh - 84px);
    }
}

@media (max-width: 560px) {
    .dashboard-main.container {
        padding: 14px;
    }

    .dashboard-main > h1 {
        font-size: 23px;
    }
}

/* Compact persistent admin/farmer notification center */
.site-notification-center {
    position: relative;
    display: inline-flex;
    direction: rtl;
    z-index: 30000;
}

.site-notification-center [hidden] {
    display: none !important;
}

.site-notification-csrf {
    display: none;
}

.site-notification-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid #dbe3ee;
    border-radius: 11px;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    color: #0f172a;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.08);
    transition: 160ms ease;
}

.site-notification-trigger:hover,
.site-notification-trigger[aria-expanded="true"] {
    border-color: #60a5fa;
    background: #eff6ff;
    color: #1d4ed8;
    transform: translateY(-1px);
}

.site-notification-bell {
    font-size: 18px;
    line-height: 1;
}

.site-notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    line-height: 1;
    box-shadow: 0 0 0 2px #fff;
}

.site-notification-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(380px, calc(100vw - 28px));
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 24px 65px rgba(15, 23, 42, 0.22);
    animation: notificationPanelIn 140ms ease-out;
}

@keyframes notificationPanelIn {
    from { opacity: 0; transform: translateY(-5px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.site-notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 15px;
    border-bottom: 1px solid #edf2f7;
    background: linear-gradient(135deg, #f8fafc, #eff6ff);
}

.site-notification-header > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.site-notification-header strong {
    color: #0f172a;
    font-size: 15px;
}

.site-notification-header span {
    color: #64748b;
    font-size: 11px;
}

.site-notification-header button,
.site-notification-more {
    border: 0;
    background: transparent;
    color: #2563eb;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.site-notification-header button:disabled {
    color: #94a3b8;
    cursor: default;
}

.site-notification-list {
    max-height: min(405px, calc(100vh - 210px));
    padding: 7px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #f8fafc;
}

.site-notification-item {
    position: relative;
    margin-bottom: 6px;
    padding: 11px 12px;
    border: 1px solid #e6ebf2;
    border-radius: 12px;
    outline: none;
    background: #fff;
    cursor: pointer;
    transition: 140ms ease;
}

.site-notification-item:last-child {
    margin-bottom: 0;
}

.site-notification-item:hover,
.site-notification-item:focus-visible {
    border-color: #93c5fd;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.09);
    transform: translateY(-1px);
}

.site-notification-item.unread {
    padding-right: 18px;
    border-color: #bfdbfe;
    background: #f5f9ff;
}

.site-notification-item.unread::before {
    position: absolute;
    top: 15px;
    right: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 3px #dbeafe;
    content: "";
}

.site-notification-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.site-notification-item-top strong {
    min-width: 0;
    overflow: hidden;
    color: #172033;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-notification-read-status {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: #eef2f7;
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
}

.site-notification-item.unread .site-notification-read-status {
    background: #dbeafe;
    color: #1d4ed8;
}

.site-notification-preview {
    display: -webkit-box;
    margin: 7px 0 8px;
    overflow: hidden;
    color: #475569;
    font-size: 11px;
    line-height: 1.75;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.site-notification-item footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #94a3b8;
    font-size: 9px;
}

.site-notification-open-hint {
    flex: 0 0 auto;
    color: #2563eb;
    font-size: 10px;
    font-weight: 800;
}

.site-notification-state {
    padding: 32px 16px;
    color: #64748b;
    font-size: 12px;
    text-align: center;
}

.site-notification-more {
    display: block;
    width: 100%;
    padding: 11px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.site-notification-more:hover {
    background: #eff6ff;
}

.site-notification-detail-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(3px);
    z-index: 50000;
}

.site-notification-detail-card {
    width: min(520px, 100%);
    max-height: min(680px, calc(100vh - 36px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.38);
    animation: notificationDetailIn 170ms ease-out;
}

@keyframes notificationDetailIn {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.site-notification-detail-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.site-notification-detail-card > header > div {
    min-width: 0;
}

.site-notification-detail-card > header span {
    display: block;
    margin-bottom: 4px;
    color: #2563eb;
    font-size: 10px;
    font-weight: 900;
}

.site-notification-detail-card h3 {
    margin: 0;
    color: #0f172a;
    font-size: 17px;
    overflow-wrap: anywhere;
}

.site-notification-detail-card > header button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: #475569;
    font: inherit;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .09);
}

.site-notification-detail-message {
    max-height: min(470px, calc(100vh - 210px));
    padding: 20px;
    overflow-y: auto;
    color: #273449;
    font-size: 14px;
    line-height: 2;
    text-align: right;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.site-notification-detail-card > footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 12px 18px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 10px;
}

body.site-notification-modal-open {
    overflow: hidden;
}

@media (max-width: 620px) {
    .site-notification-center {
        position: static;
    }

    .site-notification-panel {
        position: fixed;
        top: 68px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    .site-notification-list {
        max-height: calc(100vh - 195px);
    }

    .site-notification-detail-backdrop {
        align-items: flex-end;
        padding: 10px;
    }

    .site-notification-detail-card {
        width: 100%;
        max-height: calc(100vh - 20px);
        border-radius: 18px;
    }
}

/* Public customer order portal */
.public-order-page {
    min-height: 100vh;
    margin: 0;
    direction: ltr;
    text-align: left;
    color: #e5e7eb;
    background:
        radial-gradient(circle at 15% 0%, rgba(34, 197, 94, 0.14), transparent 32rem),
        radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.12), transparent 34rem),
        #070b12;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.public-order-page *,
.public-order-page *::before,
.public-order-page *::after {
    box-sizing: border-box;
}

.public-order-page [hidden] {
    display: none !important;
}

.public-order-shell {
    width: min(100% - 32px, 900px);
    margin: 0 auto;
    padding: 48px 0;
}

.public-order-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
}

.public-order-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 32px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.public-order-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #4ade80;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.public-order-header h1,
.public-section-heading h2,
.public-info-box h2,
.public-shot-box h2 {
    margin: 0;
    color: #f8fafc;
}

.public-order-header h1 {
    font-size: clamp(26px, 5vw, 38px);
    line-height: 1.12;
}

.public-order-header p,
.public-section-heading p,
.public-checking-panel p,
.public-info-box p,
.public-shot-box > p {
    margin: 8px 0 0;
    color: #94a3b8;
    line-height: 1.6;
}

.public-status-badge {
    flex: 0 0 auto;
    padding: 8px 13px;
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 999px;
    color: #86efac;
    background: rgba(34, 197, 94, 0.1);
    font-size: 13px;
    font-weight: 800;
    text-transform: capitalize;
}

.public-credential-panel,
.public-tracking-panel {
    padding: 32px;
}

.public-section-heading {
    margin-bottom: 22px;
}

.public-section-heading h2,
.public-info-box h2,
.public-shot-box h2 {
    font-size: 18px;
}

.public-credential-form,
.public-credential-form > div {
    display: grid;
    gap: 18px;
}

.public-credential-form label {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
}

.public-credential-form input,
.public-credential-form textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #334155;
    border-radius: 11px;
    outline: none;
    color: #f8fafc;
    background: #0b1220;
    font: inherit;
    resize: vertical;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.public-credential-form input:focus,
.public-credential-form textarea:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.13);
}

.public-primary-button {
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
    padding: 11px 18px;
    border: 0;
    border-radius: 11px;
    color: #052e16;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    box-shadow: 0 9px 28px rgba(34, 197, 94, 0.18);
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.public-primary-button:hover {
    filter: brightness(1.06);
}

.public-form-message {
    min-height: 22px;
    margin-top: 14px;
    color: #cbd5e1;
    font-size: 14px;
}

.public-form-message.error {
    color: #fca5a5;
}

.public-form-message.success {
    color: #86efac;
}

.public-checking-panel {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 32px;
    padding: 20px;
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 15px;
    background: rgba(30, 64, 175, 0.1);
}

.public-checking-panel strong {
    color: #dbeafe;
}

.public-checking-panel p {
    margin-top: 4px;
}

.public-spinner {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 3px solid rgba(147, 197, 253, 0.25);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: public-order-spin 0.8s linear infinite;
}

@keyframes public-order-spin {
    to { transform: rotate(360deg); }
}

.public-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.public-stat-grid > div,
.public-info-box,
.public-shot-box {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 15px;
    background: rgba(2, 6, 23, 0.34);
}

.public-stat-grid > div {
    display: grid;
    gap: 7px;
    padding: 18px;
}

.public-stat-grid span,
.public-progress-head {
    color: #94a3b8;
    font-size: 13px;
}

.public-stat-grid strong {
    color: #f8fafc;
    font-size: 21px;
    text-transform: capitalize;
}

.public-info-box,
.public-shot-box {
    padding: 20px;
}

.public-status-description {
    display: grid;
    gap: 14px;
    margin-top: 13px;
}

.public-status-description > p {
    margin: 0;
    color: #94a3b8;
    line-height: 1.7;
}

.public-completed-description {
    display: grid;
    gap: 14px;
}

.public-completed-description[hidden],
.public-status-description > p[hidden] {
    display: none;
}

.public-completion-success {
    padding: 17px 19px;
    border: 1px solid rgba(134, 239, 172, .38);
    border-radius: 13px;
    color: #f0fdf4;
    background: linear-gradient(135deg, #166534, #15803d);
    box-shadow: 0 12px 32px rgba(22, 101, 52, .22);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.6;
}

.public-security-notice {
    padding: 21px;
    border: 1px solid rgba(251, 113, 133, .42);
    border-radius: 15px;
    color: #fff1f2;
    background:
        linear-gradient(145deg, rgba(190, 24, 93, .38), rgba(131, 24, 67, .58));
    box-shadow: 0 14px 36px rgba(131, 24, 67, .2);
}

.public-security-notice h3 {
    margin: 0 0 13px;
    color: #fecdd3;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: .01em;
}

.public-security-notice p {
    margin: 0;
    color: #fff1f2;
    font-size: 17px;
    line-height: 1.82;
}

.public-security-notice p + p {
    margin-top: 12px;
}

.public-security-notice strong {
    color: #fff;
    font-weight: 900;
}

.public-shot-box {
    margin-top: 18px;
}

.public-shot-box img {
    display: block;
    width: 100%;
    max-height: 240px;
    margin-top: 15px;
    border-radius: 11px;
    object-fit: contain;
    background: #020617;
}

.public-progress-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 22px;
}

.public-progress-head strong {
    color: #86efac;
}

.public-progress-bar {
    height: 9px;
    margin-top: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #1e293b;
}

.public-progress-bar > div {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    transition: width 0.35s ease;
}

@media (max-width: 620px) {
    .public-order-shell {
        width: min(100% - 20px, 900px);
        padding: 20px 0;
    }

    .public-order-card {
        border-radius: 18px;
    }

    .public-order-header,
    .public-credential-panel,
    .public-tracking-panel {
        padding: 22px;
    }

    .public-order-header {
        flex-direction: column;
    }

    .public-checking-panel {
        margin: 22px;
    }

    .public-stat-grid {
        grid-template-columns: 1fr;
    }

    .public-completion-success {
        padding: 15px;
        font-size: 16px;
    }

    .public-security-notice {
        padding: 17px;
    }

    .public-security-notice h3 {
        font-size: 20px;
    }

    .public-security-notice p {
        font-size: 16px;
    }
}

/* Independent admin commission deposits and accounting */
.notification-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 21px;
    height: 21px;
    margin-right: 5px;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.receipt-review-button {
    position: relative;
}

.wallet-network-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.wallet-network-card {
    display: grid;
    gap: 13px;
    padding: 18px;
    border: 1px solid #bbf7d0;
    border-radius: 15px;
    background: linear-gradient(145deg, #f0fdf4, #ffffff);
}

.wallet-network-card > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wallet-network-card > div span {
    color: #64748b;
    font-weight: 700;
}

.wallet-network-card > div strong {
    color: #166534;
    font-size: 19px;
}

.wallet-network-card code,
.wallet-address-cell {
    direction: ltr;
    text-align: left;
    overflow-wrap: anywhere;
    word-break: break-all;
}

.wallet-network-card code {
    min-height: 48px;
    padding: 12px;
    border-radius: 10px;
    background: #0f172a;
    color: #dcfce7;
    font-family: Consolas, monospace;
    font-size: 13px;
    line-height: 1.8;
}

.deposit-warning,
.deposit-unavailable {
    padding: 13px 15px;
    border-radius: 11px;
    line-height: 1.8;
}

.deposit-warning {
    margin: 12px 0;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.deposit-unavailable {
    margin-top: 18px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.deposit-form {
    margin-top: 17px;
}

.deposit-modal-box {
    max-height: 92vh;
    overflow-y: auto;
}

.deposit-rejection-list,
.receipt-review-list {
    display: grid;
    gap: 13px;
}

.deposit-rejection-list article {
    padding: 14px 16px;
    border-right: 4px solid #dc2626;
    border-radius: 12px;
    background: #fef2f2;
}

.deposit-rejection-list article > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.deposit-rejection-list span {
    color: #64748b;
    font-size: 12px;
}

.deposit-rejection-list p {
    margin: 9px 0 0;
    color: #7f1d1d;
}

.receipt-review-modal {
    max-height: 90vh;
    overflow-y: auto;
}

.receipt-review-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) 190px;
    gap: 15px;
    padding: 15px;
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    background: #f8fafc;
}

.receipt-thumbnail-button {
    padding: 0;
    border: 0;
    border-radius: 11px;
    background: #0f172a;
    overflow: hidden;
    cursor: zoom-in;
}

.receipt-thumbnail-button img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: contain;
}

.receipt-review-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.receipt-review-details > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 9px;
    border-radius: 9px;
    background: #fff;
    overflow-wrap: anywhere;
}

.receipt-review-details span {
    color: #64748b;
    font-size: 11px;
}

.receipt-review-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 9px;
}

.receipt-review-actions label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.receipt-review-actions input,
.receipt-review-actions textarea {
    width: 100%;
    box-sizing: border-box;
}

.receipt-review-actions textarea {
    min-height: 62px;
    resize: vertical;
}

#commissionReceiptViewer {
    z-index: 30000;
}

#commissionReceiptViewer .image-viewer-close {
    border: 0;
    background: transparent;
}

.accounting-filter-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 13px;
    align-items: end;
}

.accounting-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.commission-accounting-filters {
    align-items: center;
    flex-wrap: wrap;
}

.archive-filters .btn-normal.active,
.commission-accounting-filters .archive-filter-btn.active {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.commission-accounting-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
}

.commission-accounting-search input {
    width: min(280px, 34vw);
    min-width: 220px;
    height: 40px;
    padding: 8px 12px;
}

.commission-custom-date-filter input:not([type="hidden"]) {
    width: 150px;
}

.jalali-datetime-trigger {
    min-width: 205px;
    min-height: 40px;
    padding: 8px 12px;
    color: #e7edf7;
    background: #17283f;
    border: 1px solid #3c5678;
    border-radius: 8px;
    font: inherit;
    text-align: right;
    cursor: pointer;
}

.jalali-datetime-trigger:hover,
.jalali-datetime-trigger:focus-visible {
    border-color: #65b8ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(101, 184, 255, .18);
}

.jalali-datetime-picker[hidden] {
    display: none;
}

.jalali-datetime-picker {
    position: fixed;
    z-index: 2000;
    top: 50%;
    left: 50%;
    width: min(360px, calc(100vw - 28px));
    padding: 16px;
    color: #edf5ff;
    background: #101d2e;
    border: 1px solid #41658f;
    border-radius: 14px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .48);
    transform: translate(-50%, -50%);
}

.jalali-picker-header,
.jalali-picker-actions,
.jalali-picker-time {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jalali-picker-header {
    justify-content: space-between;
    margin-bottom: 14px;
}

.jalali-picker-header strong {
    font-weight: 700;
}

.jalali-picker-header button,
.jalali-picker-actions button {
    padding: 7px 11px;
    color: #eef7ff;
    background: #223b5c;
    border: 1px solid #5278a4;
    border-radius: 7px;
    font: inherit;
    cursor: pointer;
}

.jalali-picker-weekdays,
.jalali-picker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.jalali-picker-weekdays {
    margin-bottom: 6px;
    color: #9ab3d0;
    font-size: .82rem;
}

.jalali-picker-days {
    direction: rtl;
}

.jalali-picker-day {
    min-height: 36px;
    padding: 5px 2px;
    color: #e7f0fb;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    cursor: pointer;
}

.jalali-picker-day:hover,
.jalali-picker-day:focus-visible {
    background: #223b5c;
    border-color: #5d94c8;
    outline: none;
}

.jalali-picker-day.selected {
    color: #061422;
    background: #69baff;
    border-color: #9bd5ff;
    font-weight: 700;
}

.jalali-picker-time {
    justify-content: center;
    margin: 15px 0;
}

.jalali-picker-time select {
    min-width: 72px;
    padding: 8px;
    color: #edf5ff;
    background: #17283f;
    border: 1px solid #41658f;
    border-radius: 7px;
    font: inherit;
}

.jalali-picker-actions {
    justify-content: flex-end;
}

.jalali-picker-actions .btn-success {
    color: #061422;
    background: #69baff;
    border-color: #9bd5ff;
}

.accounting-filter-form label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #334155;
    font-weight: 700;
}

.accounting-filter-form input,
.accounting-filter-form select {
    width: 100%;
    box-sizing: border-box;
}

.accounting-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 18px;
}

.accounting-pagination a {
    padding: 8px 14px;
    border-radius: 9px;
    background: #0f172a;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 950px) {
    .receipt-review-card,
    .accounting-filter-form {
        grid-template-columns: 1fr 1fr;
    }

    .accounting-summary-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .wallet-network-grid,
    .receipt-review-card,
    .receipt-review-details,
    .accounting-filter-form {
        grid-template-columns: 1fr;
    }

    .accounting-summary-grid {
        grid-template-columns: 1fr;
    }

    .commission-accounting-search,
    .commission-custom-date-filter,
    .commission-accounting-search input,
    .commission-custom-date-filter input:not([type="hidden"]) {
        width: 100%;
        min-width: 0;
    }

    .jalali-datetime-trigger {
        width: 100%;
    }
}

/* Dashboard batch actions: keep selection and the action menu together. */
:is(.order-bulk-toolbar, .order-bulk-dialog, .order-row-menu-panel) {
    --bulk-surface: #191c25;
    --bulk-border: #3a4151;
    --bulk-text: #edf1f8;
    --bulk-muted: #a6b0c2;
    --bulk-accent: #f5c15c;
    --bulk-soft: #282d3a;
    --bulk-danger: #ffacac;
    --bulk-success: #8ce0b6;
    color: var(--bulk-text);
}
html[data-theme="light"] :is(.order-bulk-toolbar, .order-bulk-dialog, .order-row-menu-panel) {
    --bulk-surface: #f5efe6;
    --bulk-border: #abc1d9;
    --bulk-text: #202d38;
    --bulk-muted: #526471;
    --bulk-accent: #245d86;
    --bulk-soft: #e1eaf0;
    --bulk-danger: #a12c38;
    --bulk-success: #12614d;
}
.order-bulk-toolbar { display: flex; align-items: center; gap: 10px; position: relative; }
.order-bulk-select-all, .order-bulk-menu summary {
    display: flex; align-items: center; gap: 10px; box-sizing: border-box;
    min-height: 44px; padding: 10px 14px; border: 1px solid var(--bulk-border);
    border-radius: 12px; background: var(--bulk-surface); color: var(--bulk-text);
    font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.order-bulk-select-all input { margin: 0; accent-color: var(--bulk-accent); width: 16px; height: 16px; }
.order-bulk-menu { position: relative; }
.order-bulk-menu summary { list-style: none; border-color: var(--bulk-accent); }
.order-bulk-menu summary::-webkit-details-marker { display: none; }
.order-bulk-menu summary[aria-disabled="true"] { opacity: .55; cursor: default; }
.order-bulk-count { min-width: 22px; padding: 2px 6px; border-radius: 6px; text-align: center; background: var(--bulk-soft); font-weight: 700; }
.order-bulk-chevron { color: var(--bulk-accent); transition: transform .16s; }
.order-bulk-menu[open] .order-bulk-chevron { transform: rotate(180deg); }
.order-bulk-panel {
    position: absolute; inset-inline-start: 0; top: calc(100% + 8px); z-index: 15000;
    width: min(310px, 85vw); padding: 9px; border: 1px solid var(--bulk-border);
    border-radius: 15px; background: var(--bulk-surface); box-shadow: 0 18px 45px #0005;
}
.order-bulk-panel button {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 10px;
    border: 0; border-radius: 9px; background: transparent; color: var(--bulk-text);
    font: inherit; font-size: 13px; text-align: start; cursor: pointer;
}
.order-bulk-panel button:hover, .order-bulk-panel button:focus-visible { background: var(--bulk-soft); }
.order-bulk-panel button > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--bulk-soft); font-size: 16px; }
.order-bulk-panel button.order-bulk-danger { color: var(--bulk-danger); }
.order-bulk-menu-heading { margin: 4px 9px 6px; font-size: 11px; color: var(--bulk-muted); }
.order-bulk-divider { padding-top: 10px; border-top: 1px solid var(--bulk-border); margin-top: 8px; }
.order-bulk-dialog {
    width: min(760px, 92vw); max-height: 90vh; box-sizing: border-box;
    padding: 24px; border: 1px solid var(--bulk-border); border-radius: 20px;
    background: var(--bulk-surface); box-shadow: 0 28px 90px #0007; overflow-y: auto;
}
.order-bulk-dialog::backdrop { background: #060a12b8; backdrop-filter: blur(3px); }
.order-bulk-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.order-bulk-dialog h3 { color: var(--bulk-text); margin: 5px 0 10px; font-size: 20px; }
.order-bulk-eyebrow { margin: 0; color: var(--bulk-accent); font-size: 11px; letter-spacing: .2px; }
.order-bulk-close { border: 1px solid var(--bulk-border); background: var(--bulk-soft); color: var(--bulk-text); border-radius: 10px; width: 35px; height: 35px; cursor: pointer; }
.order-bulk-description { color: var(--bulk-muted); font-size: 12px; line-height: 1.9; }
.order-bulk-config { padding: 14px; border: 1px solid var(--bulk-border); border-radius: 12px; background: var(--bulk-soft); margin-bottom: 14px; }
.order-bulk-config[hidden] { display: none; }
.order-bulk-config label { display: block; font-size: 13px; margin-bottom: 8px; }
.order-bulk-config input, .order-bulk-config select { background: var(--bulk-surface); color: var(--bulk-text); border-color: var(--bulk-border); font: inherit; font-size: 13px; }
.order-bulk-config input { margin-bottom: 8px; }
.order-bulk-progress { margin: 14px 0 10px; font-size: 12px; font-weight: 600; color: var(--bulk-accent); }
.order-bulk-result-wrap { max-height: 36vh; overflow: auto; border: 1px solid var(--bulk-border); border-radius: 12px; }
.order-bulk-results { width: 100%; min-width: 0; border-collapse: collapse; text-align: start; }
.order-bulk-results th, .order-bulk-results td { padding: 11px 13px; border: 0; border-bottom: 1px solid var(--bulk-border); text-align: start; vertical-align: top; color: var(--bulk-text); font-size: 12px; }
.order-bulk-results th { position: sticky; top: 0; background: var(--bulk-soft); z-index: 1; }
.order-bulk-results td:first-child { width: 45%; }
.order-bulk-results strong, .order-bulk-results small { display: block; overflow-wrap: anywhere; }
.order-bulk-results strong { margin-bottom: 5px; }
.order-bulk-results small { color: var(--bulk-muted); font-size: 10px; text-align: start; }
.order-bulk-results td[data-result="success"] { color: var(--bulk-success); }
.order-bulk-results td[data-result="error"], .order-bulk-error { color: var(--bulk-danger); }
.order-bulk-results td[data-result="pending"], .order-bulk-results td[data-result="unknown"] { color: var(--bulk-accent); }
.order-bulk-results tr:last-child td { border-bottom: 0; }
.order-bulk-error { min-height: 1em; font-size: 12px; }
.order-bulk-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 15px; }
.order-row[data-bulk-busy="true"] .action-btn { pointer-events: none; opacity: .45; }
.order-row-actions {
    display: grid; direction: rtl;
    grid-template-columns: repeat(2, 52px) 36px; grid-template-rows: repeat(2, 36px);
    width: max-content; margin-inline: auto; gap: 6px;
}
.order-row-actions .action-btn { flex: 0 0 36px; width: 36px; height: 36px; margin: 0; padding: 0; }
.order-row-actions > .action-btn:not(.order-row-menu-trigger) { width: 52px; }
.order-row-actions .view-btn { grid-column: 1; grid-row: 1; }
.order-row-actions .gallery-btn { grid-column: 2; grid-row: 1; }
.order-row-actions .change-btn { grid-column: 1; grid-row: 2; }
.order-row-actions .order-priority-btn { grid-column: 2; grid-row: 2; }
.order-row-actions .order-row-menu-trigger { grid-column: 3; grid-row: 1 / 3; height: 100%; }
.order-row-actions .order-priority-btn { position: relative; overflow: visible; }
.order-row-actions .order-priority-btn [data-priority-label] {
    position: absolute; inset-block-start: -5px; inset-inline-end: -5px;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 3px; box-sizing: border-box;
    border: 1px solid #d5ab45; border-radius: 6px;
    background: #ffdf7e; color: #352508; font: 700 12px/1 sans-serif;
    pointer-events: none;
}
.order-row-menu-trigger { font-size: 23px !important; font-weight: 700; cursor: pointer; }
.order-row-menu-panel {
    position: fixed; inset: auto; margin: 0; padding: 8px; box-sizing: border-box;
    width: 275px; max-width: calc(100vw - 20px); max-height: calc(100vh - 20px);
    overflow-y: auto; border: 1px solid var(--bulk-border); border-radius: 14px;
    background: var(--bulk-surface); color: var(--bulk-text); box-shadow: 0 18px 50px #0006;
    text-align: start; direction: rtl;
}
.order-row-menu-panel:popover-open { display: flex; flex-direction: column; gap: 3px; }
.order-row-menu-panel .action-btn {
    display: flex; align-items: center; justify-content: flex-start; gap: 11px;
    width: 100%; min-height: 40px; height: auto; box-sizing: border-box;
    padding: 10px 12px; margin: 0; border: 0; border-radius: 8px;
    background: transparent; color: var(--bulk-text); text-decoration: none;
    font: inherit; font-size: 14px; text-align: start; cursor: pointer;
}
.order-row-menu-panel .action-btn::after { content: attr(title); font-size: 12px; line-height: 1.7; }
.order-row-menu-panel .order-assignment-lock::after { content: none; }
.order-row-menu-panel .action-btn:hover, .order-row-menu-panel .action-btn:focus-visible {
    background: var(--bulk-soft); transform: none; box-shadow: none;
}
.order-row-menu-panel .action-btn:focus-visible { outline: 2px solid var(--bulk-accent); outline-offset: -2px; }
.order-row-menu-panel .action-btn.delete-btn { color: var(--bulk-danger); }
.order-row-menu-heading { margin: 4px 12px 7px; color: var(--bulk-muted); font-size: 11px; }
.order-row-menu-divider { border-top: 1px solid var(--bulk-border); margin: 4px 7px; }
.order-bulk-toolbar :focus-visible, .order-bulk-dialog :focus-visible { outline: 2px solid var(--bulk-accent); outline-offset: 3px; }
.order-bulk-dialog button:disabled { opacity: .5; cursor: wait; }
@media (max-width: 600px) {
    .order-bulk-toolbar { width: 100%; }
    .order-bulk-menu { flex: 1; }
    .order-bulk-menu summary { justify-content: center; }
    .order-bulk-panel { inset-inline-start: auto; inset-inline-end: 0; }
    .order-bulk-dialog { padding: 16px; }
    .order-bulk-dialog h3 { font-size: 17px; }
    .order-bulk-results th, .order-bulk-results td { padding: 10px 8px; }
}

/* Super Farmer creation: scoped to the admin add-farmer form. */
#superFarmerField.super-farmer-option {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin: 10px 0 14px; padding: 14px 16px; direction: rtl;
    border: 1px solid #38574e; border-radius: 12px; background: #1c302a;
    color: #e4f7ed; cursor: pointer; text-align: right;
    transition: border-color .18s, background .18s;
}
#superFarmerField[hidden] { display: none; }

#addFarmerModal .modal-box {
    max-height: calc(100vh - 32px);
    box-sizing: border-box;
    overflow-y: auto;
}

#superFarmerPortalField {
    margin: 12px 0;
    padding: 12px;
    background: #f3f5f7;
    border: 1px solid #dce1e7;
    border-radius: 10px;
}

#superFarmerPortalField > label { color: #374151; }
#superFarmerPortalField > small { color: #5b6472; line-height: 1.8; }
#superFarmerField:hover { border-color: #4caa82; }
#superFarmerField:has(input:checked) { border-color: #43bd86; background: #204234; }
#superFarmerField .super-farmer-option-copy { display: grid; gap: 5px; }
#superFarmerField strong { font-size: 14px; line-height: 1.7; }
#superFarmerField small { color: #a9c8b9; font-size: 11px; line-height: 1.7; }
#superFarmerCreate {
    appearance: none; -webkit-appearance: none; position: relative; direction: ltr;
    flex: 0 0 44px; width: 44px; height: 24px; min-height: 0;
    margin: 0; padding: 0; border: 1px solid #718079; border-radius: 999px;
    background: #46554d; cursor: pointer; transition: background .18s;
}
#superFarmerCreate::after {
    content: ''; position: absolute; left: 3px; top: 3px;
    width: 16px; height: 16px; border-radius: 50%; background: #fff;
    transition: transform .18s;
}
#superFarmerCreate:checked { background: #218253; border-color: #45c28b; }
#superFarmerCreate:checked::after { transform: translateX(20px); }
#superFarmerCreate:focus-visible { outline: 3px solid #74d6af; outline-offset: 4px; }
html[data-theme="light"] #superFarmerField { background: #f3f7ef; color: #183d31; border-color: #b6ccbd; }
html[data-theme="light"] #superFarmerField small { color: #486b5a; }
html[data-theme="light"] #superFarmerField:has(input:checked) { background: #e0f1e5; border-color: #328362; }
@media (prefers-reduced-motion: reduce) {
    #superFarmerField, #superFarmerCreate, #superFarmerCreate::after { transition: none; }
}
