/* Shared controls */

.btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: var(--v-radius-sm);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none;
    transition:
        color var(--v-transition),
        background-color var(--v-transition),
        border-color var(--v-transition),
        box-shadow var(--v-transition);
}

.btn-lg {
    min-height: 48px;
    padding-inline: 20px;
    border-radius: var(--v-radius-md);
    font-size: 0.9rem;
}

.btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn:hover {
    transform: none;
}

.btn-primary {
    color: #fff;
    background: var(--v-primary);
    border-color: var(--v-primary);
    box-shadow: none;
}

.btn-primary:hover {
    color: #fff;
    background: var(--v-primary-hover);
    border-color: var(--v-primary-hover);
}

.btn-ghost {
    color: var(--v-navy-800);
    background: #fff;
    border-color: var(--v-border);
}

.btn-ghost:hover {
    color: var(--v-primary-hover);
    background: var(--v-bg-subtle);
    border-color: #adc4d8;
}

.btn-soft {
    color: var(--v-primary-hover);
    background: var(--v-primary-soft);
    border-color: #c6dfed;
}

.btn-soft:hover {
    background: #dceef7;
    border-color: #9ec9dd;
}

.btn.danger-button,
.danger-button {
    color: var(--v-danger);
    background: var(--v-danger-bg);
    border-color: #f1c3c8;
}

.btn.disabled,
.btn[aria-disabled="true"],
.btn:disabled {
    opacity: 0.52;
    pointer-events: none;
}

.btn.is-submitting {
    position: relative;
    padding-inline-start: 38px;
    pointer-events: none;
}

.btn.is-submitting::before {
    content: "";
    position: absolute;
    inset-inline-start: 14px;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-inline-start-color: transparent;
    border-radius: 50%;
    animation: uiSpin 650ms linear infinite;
}

.chip {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 2px 9px;
    color: #52677e;
    background: #f3f6f9;
    border: 1px solid #dbe4ec;
    border-radius: 999px;
    font-size: 0.71rem;
    font-weight: 500;
    line-height: 1.4;
}

.chip.accent {
    color: #0d6795;
    background: #edf7fb;
    border-color: #c9e5f1;
}

.chip.success {
    color: var(--v-success);
    background: var(--v-success-bg);
    border-color: #c6eadc;
}

.chip.warning,
.chip.warn {
    color: var(--v-warning);
    background: var(--v-warning-bg);
    border-color: #edd9a5;
}

.chip.danger {
    color: var(--v-danger);
    background: var(--v-danger-bg);
    border-color: #f1c3c8;
}

.glass-card,
.bento-card,
.metric-card,
.price-card,
.news-card,
.timeline-card,
.search-card,
.panel-card,
.action-card,
.admin-panel {
    color: var(--v-text);
    background: var(--v-surface);
    border: 1px solid var(--v-border);
    border-radius: var(--v-radius-lg);
    box-shadow: var(--v-shadow-soft);
    backdrop-filter: none;
}

.bento-card,
.price-card,
.news-card,
.timeline-card,
.search-card,
.panel-card,
.action-card,
.admin-panel {
    padding: 20px;
    transition:
        border-color var(--v-transition),
        box-shadow var(--v-transition);
}

.bento-card:hover,
.price-card:hover,
.news-card:hover,
.panel-card:hover,
.action-card:hover,
.admin-panel:hover {
    transform: none;
    border-color: #b8cbdc;
    box-shadow: var(--v-shadow-strong);
}

.table-shell {
    width: 100%;
    overflow: auto;
    overscroll-behavior-inline: contain;
    color: var(--v-text);
    background: #fff;
    border: 1px solid var(--v-border);
    border-radius: var(--v-radius-lg);
    box-shadow: none;
    scrollbar-color: #b5c3d1 #f1f5f8;
}

.data-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--v-text);
    background: #fff;
    font-size: 0.79rem;
}

.data-table th,
.data-table td {
    padding: 11px 13px;
    color: #26374a;
    background: #fff;
    border-block-end: 1px solid #e6ecf2;
    text-align: start;
    vertical-align: middle;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: #50657b;
    background: #f5f8fb;
    font-size: 0.73rem;
    font-weight: 700;
    white-space: nowrap;
}

.data-table tbody tr:last-child td {
    border-block-end: 0;
}

.data-table tbody tr:hover td {
    background: #f7fbfd;
}

.data-table small {
    display: block;
    margin-top: 3px;
    color: var(--v-muted);
}

.data-table code,
.mono,
.hash-value {
    direction: ltr;
    unicode-bidi: isolate;
    font-family: Consolas, "Courier New", monospace;
}

.empty-panel,
.empty-state,
.download-empty,
.usr-empty {
    min-height: 120px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    padding: 24px;
    color: var(--v-muted);
    background: var(--v-bg-subtle);
    border: 1px dashed var(--v-border-strong);
    border-radius: var(--v-radius-lg);
    line-height: 1.85;
    text-align: center;
}

.empty-panel::before,
.empty-state::before,
.download-empty::before {
    content: "";
    width: 34px;
    height: 28px;
    display: block;
    border: 2px solid #9cb0c3;
    border-top-width: 7px;
    border-radius: 4px;
    opacity: 0.7;
}

.admin-alert,
.v360-alert,
.auth-message-card,
.validation-summary-errors {
    padding: 11px 13px;
    color: #305370;
    background: #eef7fc;
    border: 1px solid #c5dfed;
    border-radius: var(--v-radius-md);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.8;
}

.admin-alert.success {
    color: var(--v-success);
    background: var(--v-success-bg);
    border-color: #c6eadc;
}

.admin-alert.warning {
    color: var(--v-warning);
    background: var(--v-warning-bg);
    border-color: #edd9a5;
}

.admin-alert.danger,
.auth-validation,
.field-validation-error,
.text-danger {
    color: var(--v-danger);
}

.admin-alert.danger {
    background: var(--v-danger-bg);
    border-color: #f1c3c8;
}

.auth-validation:empty,
.field-validation-valid {
    display: none;
}

.pagination,
[aria-label="Pagination"],
[aria-label="صفحه‌بندی"] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

dialog,
.modal-content {
    width: min(560px, calc(100vw - 28px));
    color: var(--v-text);
    background: #fff;
    border: 1px solid var(--v-border);
    border-radius: var(--v-radius-lg);
    box-shadow: 0 22px 60px rgba(9, 25, 42, 0.2);
}

dialog::backdrop,
.modal-backdrop {
    background: rgba(7, 21, 37, 0.48);
}

[aria-busy="true"]:not(.btn),
.is-loading:not(.btn) {
    cursor: progress;
}

.skeleton {
    min-height: 14px;
    color: transparent;
    background: #e8eef4;
    border-radius: 4px;
    animation: uiSkeleton 1.25s ease-in-out infinite alternate;
}

/* Shared forms */

.command-form,
.modern-form {
    display: grid;
    gap: 16px;
}

.form-grid,
.modern-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.command-form label,
.form-grid label,
.modern-form label,
.full-field,
.customer-toolbar label {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.command-form label > span,
.form-grid label > span,
.modern-form label > span,
.full-field > span,
.customer-toolbar label > span {
    color: #40566d;
    font-size: 0.75rem;
    font-weight: 550;
}

.command-form input:not([type="checkbox"]):not([type="radio"]),
.command-form select,
.command-form textarea,
.form-grid input:not([type="checkbox"]):not([type="radio"]),
.form-grid select,
.form-grid textarea,
.modern-form input:not([type="checkbox"]):not([type="radio"]),
.modern-form select,
.modern-form textarea,
.full-field input:not([type="checkbox"]):not([type="radio"]),
.full-field select,
.full-field textarea,
.customer-toolbar input:not([type="checkbox"]):not([type="radio"]),
.customer-toolbar select,
.customer-toolbar textarea {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    color: var(--v-text);
    background: #fff;
    border: 1px solid #cbd7e3;
    border-radius: var(--v-radius-sm);
    outline: 0;
    box-shadow: none;
    transition:
        border-color var(--v-transition),
        box-shadow var(--v-transition);
}

.command-form textarea,
.form-grid textarea,
.modern-form textarea,
.full-field textarea,
.customer-toolbar textarea {
    min-height: 104px;
    padding-block: 10px;
    resize: vertical;
}

.command-form input:focus,
.command-form select:focus,
.command-form textarea:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.modern-form input:focus,
.modern-form select:focus,
.modern-form textarea:focus,
.full-field input:focus,
.full-field select:focus,
.full-field textarea:focus,
.customer-toolbar input:focus,
.customer-toolbar select:focus,
.customer-toolbar textarea:focus {
    border-color: #6599ec;
    box-shadow: 0 0 0 3px rgba(11, 100, 246, 0.12);
}

input[type="file"] {
    min-height: 46px;
    padding: 7px;
}

input[type="file"]::file-selector-button {
    min-height: 30px;
    margin-inline-end: 9px;
    padding-inline: 12px;
    color: var(--v-primary);
    background: var(--v-primary-soft);
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 650;
}

.field-validation-error {
    min-height: 20px;
    color: var(--v-danger);
    font-size: 0.7rem;
}

.data-table td[colspan] {
    padding-block: 28px;
    color: var(--v-muted);
    text-align: center;
}

.section-spaced {
    margin-top: 16px;
}

.actions-spaced {
    margin-top: 14px;
}
