/* [KM-UI-NORDIC-NEW-C1A1] Logic: 北歐主題 元件樣式規格 (符合 300 行守則) */

/* Pagination V2 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 2rem;
    padding: 15px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(188, 108, 37, 0.03);
}

.page-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-upload,
.btn-create,
.btn-logout,
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    line-height: 1;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-btn:hover:not(:disabled) {
    background: var(--accent-color);
    color: white;
}

/* Top Bar / Upload Area */
.top-bar {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.drop-zone {
    flex: 1;
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: #fdfcfb;
    margin-right: 2rem;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent-color);
    background: rgba(188, 108, 37, 0.05);
}

.drop-zone i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.btn-upload {
    padding: 0.75rem 1.75rem;
    border-radius: 12px;
    border: none;
    background: var(--primary-gradient);
    color: #4a3728; /* Contrast wood color */
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(188, 108, 37, 0.15);
}

/* Table Container */
.dashboard-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(188, 108, 37, 0.05);
    overflow: hidden;
}

.table-wrapper {
    flex: 1;
    overflow-y: auto;
    border-radius: 12px;
    background: #fdfcfb;
    border: 1px solid #f0ede9;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 1.05rem;
}

th {
    background: #f8f5f2;
    color: var(--text-muted);
    font-weight: 600;
    padding: 10px 15px;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid #f0ede9;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0ede9;
    transition: background 0.2s;
}

.category-row {
    background: #f8f5f2;
    font-weight: 700;
    color: var(--text-main);
}

/* Status Badge */
.badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}
.badge.normal { background: rgba(188, 108, 37, 0.08); color: var(--accent-color); }
.badge.warning { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.badge.quarantine { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.badge.muted { background: rgba(100, 116, 139, 0.1); color: #64748b; }
.rfq-type-badge { white-space: nowrap; }
.rfq-type-labor { background: rgba(14, 165, 233, 0.1); color: #0369a1; }
.rfq-type-material { background: rgba(22, 163, 74, 0.1); color: #15803d; }
.rfq-type-combined { background: rgba(188, 108, 37, 0.1); color: var(--accent-color); }
.lock-badge { background: rgba(79, 70, 229, 0.1); color: #4338ca; }

/* [V24A4-1E-SD-4] RFQ package table column balance */
.rfq-package-table {
    table-layout: fixed;
}

.rfq-package-table th,
.rfq-package-table td {
    vertical-align: middle;
}

.rfq-package-name-col { width: 34%; }
.rfq-package-type-col { width: 110px; text-align: center; }
.rfq-package-version-col { width: 92px; text-align: center; }
.rfq-package-count-col { width: 76px; text-align: center; }
.rfq-package-status-col { width: 88px; text-align: center; }
.rfq-package-created-col { width: 116px; white-space: nowrap; }
.rfq-package-actions-col { width: 260px; text-align: center; }

.rfq-package-name-cell {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rfq-package-nowrap {
    text-align: center;
    white-space: nowrap;
}

.rfq-package-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.segmented-control {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: #f8f5f2;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}

.segmented-control button {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}

.segmented-control button.active {
    background: #fff;
    color: var(--accent-color);
    box-shadow: 0 1px 4px rgba(188, 108, 37, 0.12);
}

.segmented-control button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.quote-delta-line {
    margin-top: 2px;
    font-size: 0.68rem;
    text-decoration: none;
    white-space: nowrap;
}

.quote-delta-over { color: #dc2626; }
.quote-delta-under { color: #16a34a; }
.quote-delta-equal { color: #475569; }
.quote-delta-na { color: #94a3b8; }

/* [V24A1-1C] 報價回覆工作區 */
.quote-workspace {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.quote-control-bar {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) 320px auto;
    gap: 14px;
    align-items: end;
    padding: 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: #fff;
}

.quote-control-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    position: relative;
}

.quote-package-select,
.quote-search-input {
    min-height: 40px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: #fff;
    color: var(--text-main);
    padding: 8px 10px;
}

.quote-search-field {
    width: 320px;
}

.quote-package-search-popup {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
    padding: 6px;
}

.quote-package-search-row {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto auto auto;
    align-items: center;
    gap: 8px;
    padding: 8px;
    text-align: left;
    font-size: 0.74rem;
}

.quote-package-search-row:hover:not(:disabled),
.quote-package-search-row:focus-visible:not(:disabled),
.quote-package-search-row.active:not(:disabled) {
    background: #f8f5f2;
    outline: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.quote-package-search-row:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.quote-package-search-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quote-package-search-row span {
    color: var(--text-muted);
    white-space: nowrap;
}

.quote-package-search-empty,
.quote-package-search-hint {
    padding: 10px;
    color: var(--text-muted);
    font-size: 0.74rem;
    text-align: center;
}

.quote-control-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.quote-primary-action {
    color: #047857;
}

.quote-info-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    gap: 8px;
    padding: 0.9rem;
    border: 1px solid #f0ede9;
    border-radius: 10px;
    background: #fdfcfb;
}

.quote-info-strip div {
    min-width: 0;
}

.quote-info-strip span {
    display: block;
    color: var(--text-muted);
    font-size: 0.68rem;
    margin-bottom: 4px;
}

.quote-info-strip strong {
    display: block;
    font-size: 0.86rem;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quote-loading,
.quote-empty-panel {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    border: 1px dashed var(--glass-border);
    border-radius: 10px;
    background: #fff;
}

.quote-matrix-region {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: var(--quote-matrix-region-height);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.quote-matrix-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #f0ede9;
    background: #fdfcfb;
}

.quote-matrix-meta > div {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.quote-meta-text {
    color: var(--text-muted);
    font-size: 0.74rem;
}

.quote-lock-actions {
    flex-shrink: 0;
}

.quote-matrix-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

.quote-matrix-region.vendor-scrollable .quote-matrix-scroll {
    overflow-x: auto;
}

.quote-compare-table {
    width: 100%;
    min-width: var(--quote-table-min-3-vendors);
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.78rem;
}

.quote-matrix-region.vendor-scrollable .quote-compare-table {
    min-width: var(--quote-table-min-4-vendors);
}

.quote-compare-table th,
.quote-compare-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #f0ede9;
    background: #fff;
    vertical-align: top;
}

.quote-compare-table thead th {
    position: sticky;
    top: 0;
    z-index: 8;
    background: #f8f5f2;
}

.quote-compare-table .sticky-col {
    position: sticky;
    z-index: 7;
}

.quote-compare-table thead .sticky-col {
    z-index: 12;
}

.col-item { left: 0; width: 96px; min-width: 96px; }
.col-description { left: 96px; width: 320px; min-width: 320px; }
.col-unit { left: 416px; width: 64px; min-width: 64px; text-align: center; }
.col-qty { left: 480px; width: 84px; min-width: 84px; text-align: right; }
.col-budget { left: 564px; width: 116px; min-width: 116px; text-align: right; border-right: 2px solid #eadfd5; }

.vendor-quote-col {
    width: var(--quote-vendor-col-width);
    min-width: var(--quote-vendor-col-width);
    text-align: right;
}

.vendor-header {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.vendor-header-inline {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
}

.vendor-header strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
}

.vendor-header-inline .vendor-name {
    min-width: 0;
    max-width: 110px;
}

.vendor-header span {
    color: var(--text-muted);
    font-size: 0.66rem;
}

.vendor-header-inline .vendor-version {
    flex: 0 0 auto;
}

.vendor-lock-btn {
    padding: 3px 7px;
    font-size: 0.66rem;
}

.quote-description-cell {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
}

.quote-price-link {
    border: 0;
    background: transparent;
    color: var(--accent-color);
    cursor: pointer;
    text-decoration: underline;
    font-weight: 700;
    padding: 0;
    text-align: right;
}

.quote-vendor-price {
    color: #047857;
}

.quote-empty-value {
    color: #cbd5e1;
}

.quote-total-row td {
    background: #f8f5f2;
    font-weight: 800;
}

.quote-vendor-total {
    color: #047857;
    font-weight: 800;
}

/* Breakdown Panel */
#breakdown-panel {
    position: fixed;
    top: 0;
    right: -800px;
    width: 800px;
    height: 100vh;
    background: #fff;
    border-left: 1px solid var(--glass-border);
    padding: 1.5rem;
    box-shadow: -10px 0 30px rgba(188, 108, 37, 0.05);
    transition: right 0.3s ease;
    z-index: 100;
    display: flex;
    flex-direction: column;
}
#breakdown-panel.active { right: 0; }

.stat-card {
    background: #f8f5f2;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-main);
}

/* Login Card [KM-UI-NORDIC-MOD-L1B2] */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-card {
    background: #fff;
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    width: 400px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(188, 108, 37, 0.1);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.login-field input,
.admin-input,
.admin-form-grid input,
.admin-form-grid select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: #fff;
    color: var(--text-main);
}

.login-password-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.login-password-wrap input {
    border: 0;
    border-radius: 0;
    flex: 1;
}

.login-password-toggle {
    width: 42px;
    height: 40px;
    border: 0;
    border-left: 1px solid var(--glass-border);
    background: #f8f5f2;
    color: var(--accent-color);
    cursor: pointer;
}

.login-remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.login-submit {
    width: 100%;
    padding: 12px;
}

.login-error {
    color: #ef4444;
    font-size: 0.8rem;
    text-align: center;
}

.logo-login {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* [V27B] Permission Management */
.admin-page-header,
.admin-toolbar,
.admin-panel,
.admin-detail-panel,
.admin-modal {
    background: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.admin-page-header {
    padding: 1rem 1.2rem;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-toolbar {
    display: flex;
    align-items: end;
    gap: 12px;
    padding: 1rem;
    margin-bottom: 14px;
}

.admin-tenant-workspace {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    margin-bottom: 14px;
}

.admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 14px;
    align-items: start;
}

.admin-account-workspace {
    align-items: start;
}

.admin-panel,
.admin-detail-panel {
    padding: 1rem;
    min-width: 0;
}

.admin-section-title {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 10px;
}

.admin-tenant-list {
    max-height: 420px;
    overflow-y: auto;
}

.admin-tenant-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #f0ede9;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease;
}

.admin-tenant-row + .admin-tenant-row {
    margin-top: 8px;
}

.admin-tenant-row.active,
.admin-tenant-row:hover {
    background: rgba(188, 108, 37, 0.06);
    border-color: rgba(188, 108, 37, 0.22);
}

.admin-tenant-row strong,
.admin-tenant-row span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-tenant-row strong {
    color: var(--text-main);
    font-size: 0.84rem;
}

.admin-tenant-row span {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.admin-summary-grid div,
.admin-stat-strip div {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #f0ede9;
    border-radius: 8px;
    background: #fdfcfb;
}

.admin-summary-grid span,
.admin-stat-strip span {
    display: block;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
}

.admin-summary-grid strong,
.admin-stat-strip strong {
    display: block;
    color: var(--text-main);
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.admin-actions-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-top: 12px;
}

.admin-detail-title {
    margin-top: 18px;
}

.admin-table-scroll {
    max-height: 540px;
}

.admin-expiry-panel,
.admin-fixed-block {
    margin-bottom: 14px;
}

.admin-warning-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 168px;
    overflow-y: auto;
}

.admin-warning-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1.2fr) minmax(0, 1fr) 140px 90px auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid #f0ede9;
    border-radius: 8px;
    background: #fdfcfb;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.admin-warning-row strong {
    color: var(--text-main);
}

.admin-warning-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-warning-single {
    grid-template-columns: 160px minmax(0, 1fr);
}

.admin-table-tenant-rows {
    max-height: 520px;
}

.admin-table-account-rows-super {
    max-height: 220px;
}

.admin-table-account-rows-tenant {
    max-height: 520px;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.admin-account-table {
    table-layout: fixed;
    font-size: 0.82rem;
}

.admin-account-table th,
.admin-account-table td {
    vertical-align: middle;
}

.admin-account-table tr.active td {
    background: rgba(188, 108, 37, 0.07);
}

.admin-role-chip {
    display: inline-flex;
    align-items: center;
    margin: 2px 4px 2px 0;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(79, 70, 229, 0.08);
    color: #4338ca;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

.admin-action-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.admin-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.admin-role-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.admin-role-select {
    width: 100%;
    min-height: 110px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px;
    color: var(--text-main);
    background: #fff;
    font-size: 0.82rem;
}

.admin-role-options label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: #fdfcfb;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-main);
}

.admin-full-btn {
    width: 100%;
    margin-top: 8px;
}

.admin-detail-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
    border: 1px solid #f0ede9;
    border-radius: 8px;
    background: #fdfcfb;
}

.admin-detail-card span {
    display: block;
    color: var(--text-muted);
    font-size: 0.68rem;
}

.admin-detail-card strong {
    display: block;
    color: var(--text-main);
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-empty-detail {
    color: var(--text-muted);
    padding: 1rem;
    text-align: center;
    border: 1px dashed var(--glass-border);
    border-radius: 8px;
}

.admin-audit-panel {
    margin-top: 14px;
}

.admin-audit-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
}

.admin-audit-row {
    display: grid;
    grid-template-columns: 150px 1fr 80px 1fr;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fdfcfb;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.admin-audit-row strong {
    color: var(--text-main);
}

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(18, 24, 38, 0.38);
}

.admin-action-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(18, 24, 38, 0.46);
}

.admin-action-modal {
    width: min(520px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.admin-action-message {
    margin: 0 0 14px;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.86rem;
}

.admin-action-reason-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.admin-action-reason-label textarea {
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-main);
    background: #fff;
    resize: vertical;
}

.admin-modal {
    width: min(720px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.admin-modal-wide {
    width: min(980px, calc(100vw - 48px));
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.admin-modal-header h3 {
    margin: 0;
    font-size: 1rem;
}

.admin-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.admin-modal-grid label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.admin-modal-grid input,
.admin-modal-grid select,
.admin-modal-grid textarea,
.admin-input,
.admin-form-grid input,
.admin-form-grid select {
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--text-main);
    background: #fff;
}

.admin-modal-grid textarea {
    min-height: 72px;
    resize: vertical;
}

.admin-modal-full {
    grid-column: 1 / -1;
}

.admin-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.admin-quota-warning {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(188, 108, 37, 0.18);
    border-radius: 8px;
    background: rgba(188, 108, 37, 0.06);
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .admin-tenant-workspace,
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .admin-page-header,
    .admin-toolbar,
    .admin-header-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-summary-grid,
    .admin-stat-strip,
    .admin-modal-grid {
        grid-template-columns: 1fr;
    }
}

/* Toast [DSD-V15-UI-TOAST] */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    min-width: 300px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    box-shadow: 0 10px 25px -5px rgba(188, 108, 37, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
}
