/* ============================================================
   namaapp.css — styles that would otherwise be inline
   The Content-Security-Policy allows styles only from files served by the app (style-src 'self'),
   so views must not use style="" attributes or <style> blocks: put the rule here and use a class.
   ============================================================ */

/* Hidden until a script reveals it. Deliberately not !important, so jQuery .show()/.toggle() still
   work; .show() falls back to display: block, so on flex/grid elements (.row, .d-flex) toggle this
   class instead of calling .show(). */
.is-hidden {
    display: none;
}

/* --- Layout --- */
.brand-text {
    font-size: 18px;
    font-weight: 600;
}

.brand-text-dark {
    color: #556ee6;
}

.brand-text-light {
    color: #fff;
}

.logout-form {
    display: inline;
}

.logout-button {
    border: none;
    background: none;
    width: 100%;
    text-align: right;
}

#toast-container {
    z-index: 1090;
}

/* --- Error / access-denied pages --- */
.status-icon {
    font-size: 72px;
}

/* --- Karpooshe import --- */
.karpooshe-dropzone {
    border: 2px dashed var(--bs-border-color, #ced4da);
    border-radius: 0.5rem;
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.karpooshe-dropzone:hover,
.karpooshe-dropzone.is-dragover {
    border-color: var(--bs-primary, #556ee6);
    background-color: rgba(85, 110, 230, 0.05);
}

.karpooshe-dropzone.is-disabled {
    pointer-events: none;
    opacity: 0.6;
}

.karpooshe-dropzone .dropzone-icon {
    font-size: 3rem;
    color: var(--bs-primary, #556ee6);
    line-height: 1;
}

.karpooshe-column-name {
    font-family: SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8125rem;
}

.karpooshe-file-name {
    text-align: right;
}

.karpooshe-progress {
    height: 8px;
}

/* Starting width only: the upload script sets the live width through .css(). */
.karpooshe-progress .progress-bar {
    width: 0%;
}

/* --- Karpooshe comparison report --- */
/* Separates one group's مبلغ from the next group's تعداد. A physical right border rather than
   border-inline-start: number cells are direction: ltr, which would flip a logical border onto
   the wrong side of the cell. The page is always RTL, so a group always starts on its right edge. */
#comparisonTable .group-start {
    border-right: 2px solid #74788d !important;
}

#comparisonTable thead th {
    white-space: normal;
    min-width: 7rem;
}

/* Header colors follow the report's specified layout. !important outranks .table-light. */
#comparisonTable thead th.col-key { background-color: #D9D9D9 !important; }
#comparisonTable thead th.col-made { background-color: #DDEBF7 !important; }
#comparisonTable thead th.col-sent { background-color: #FCE4D6 !important; }
#comparisonTable thead th.col-karpooshe { background-color: #E2EFDA !important; }
#comparisonTable thead th.col-approved { background-color: #DAE3F3 !important; }
#comparisonTable thead th.col-rejected { background-color: #F8CBCB !important; }
#comparisonTable thead th.col-pending { background-color: #EDE4F3 !important; }

#comparisonTable tbody td.num {
    direction: ltr;
}
