/* حسابداری فروش فروشگاه — پنل جمع‌وجور */
.sacct-body { background: #eef2f7; }

.sacct-header {
    background: linear-gradient(135deg, #14532d 0%, #166534 45%, #15803d 100%);
}
.sacct-header__tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,.2);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: .04em;
    margin-bottom: 2px;
}

.sacct-banner {
    background: linear-gradient(90deg, #ecfdf5, #f0fdf4);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    font-size: 0.82rem;
    color: #14532d;
}
.sacct-banner__tag {
    background: #166534;
    color: #fff;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}
.sacct-banner small { opacity: .75; }

.sacct-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.sacct-nav__btn {
    padding: 8px 14px;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all .15s;
}
.sacct-nav__btn:hover { border-color: #16a34a; color: #166534; }
.sacct-nav__btn--active {
    background: #166534;
    border-color: #166534;
    color: #fff;
    font-weight: 600;
}

.sacct-period {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.sacct-period label { font-size: 0.75rem; color: #64748b; }
.sacct-period input {
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.78rem;
}

.sacct-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.sacct-kpi {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.sacct-kpi__label { font-size: 0.72rem; color: #64748b; margin-bottom: 4px; }
.sacct-kpi__val { font-size: 1.15rem; font-weight: 700; color: #0f172a; }
.sacct-kpi--green .sacct-kpi__val { color: #15803d; }
.sacct-kpi--amber .sacct-kpi__val { color: #b45309; }
.sacct-kpi--red .sacct-kpi__val { color: #dc2626; }

.sacct-panel {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.sacct-panel h3 {
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: #1e293b;
}

.sacct-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.sacct-table th,
.sacct-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    text-align: right;
}
.sacct-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
}
.sacct-table tr:hover td { background: #f8fafc; }
.sacct-table .num { direction: ltr; text-align: left; font-variant-numeric: tabular-nums; }

.sacct-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
}
.sacct-badge--pending { background: #fef3c7; color: #92400e; }
.sacct-badge--posted { background: #dbeafe; color: #1e40af; }
.sacct-badge--confirmed { background: #dcfce7; color: #166534; }
.sacct-badge--failed { background: #fee2e2; color: #991b1b; }

.sacct-btn {
    padding: 5px 12px;
    border-radius: 8px;
    border: none;
    font-family: inherit;
    font-size: 0.72rem;
    cursor: pointer;
    background: #166534;
    color: #fff;
    font-weight: 600;
}
.sacct-btn:hover { background: #14532d; }
.sacct-btn:disabled { opacity: .5; cursor: not-allowed; }
.sacct-btn--ghost {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.sacct-detail {
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
}
.sacct-detail h4 { margin: 0 0 8px; font-size: 0.85rem; }

.sacct-pl-section { margin-bottom: 16px; }
.sacct-pl-section h4 {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0 0 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid #e2e8f0;
}
.sacct-pl-total {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    background: #ecfdf5;
    border-radius: 10px;
    font-weight: 700;
    margin-top: 12px;
}
.sacct-pl-total--net { background: #166534; color: #fff; font-size: 1rem; }

.sacct-empty {
    text-align: center;
    padding: 32px;
    color: #94a3b8;
    font-size: 0.85rem;
}

.sacct-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.sacct-config-item label {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    margin-bottom: 4px;
}
.sacct-config-item input[type="number"],
.sacct-config-item input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
}

@media (max-width: 640px) {
    .sacct-table { font-size: 0.7rem; }
    .sacct-table th:nth-child(n+4),
    .sacct-table td:nth-child(n+4) { display: none; }
}

.sacct-hint {
    color: #64748b;
    font-size: 13px;
    margin: 0 0 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.sacct-link-btn {
    background: none;
    border: none;
    color: #15803d;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
    font-size: inherit;
    padding: 0 2px;
}

.sacct-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}
.sacct-type--asset { background: #dbeafe; color: #1d4ed8; }
.sacct-type--revenue { background: #dcfce7; color: #15803d; }
.sacct-type--expense { background: #fee2e2; color: #b91c1c; }
.sacct-type--liability { background: #fef3c7; color: #b45309; }

/* ABC graph */
.sacct-abc__toolbar { display:flex; flex-wrap:wrap; gap:10px; align-items:end; margin:12px 0 16px; }
.sacct-abc__toolbar label { display:flex; flex-direction:column; gap:4px; font-size:12px; color:#64748b; }
.sacct-abc__toolbar input { padding:8px 10px; border:1px solid #e2e8f0; border-radius:6px; }
.sacct-abc__layout { display:grid; grid-template-columns:1.2fr .8fr; gap:16px; }
.sacct-abc__svg { width:100%; height:auto; background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; }
@media (max-width:900px){ .sacct-abc__layout { grid-template-columns:1fr; } }
