.cashbox-page {
    padding: 22px;
    background: #f6f8fb;
    min-height: calc(100vh - 80px);
}

.cashbox-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 22px;
}

.cashbox-eyebrow {
    font-size: 12px;
    font-weight: 800;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 4px;
}

.cashbox-header h3 {
    margin: 0;
    font-size: 26px;
    font-weight: 900;
    color: #101827;
}

.cashbox-header p {
    margin: 6px 0 0;
    color: #64748b;
}

.cashbox-actions {
    display: flex;
    gap: 10px;
}

.cashbox-primary-btn,
.cashbox-soft-btn {
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: .2s ease;
    cursor: pointer;
}

.cashbox-primary-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
}

.cashbox-primary-btn:hover {
    transform: translateY(-1px);
    color: #fff;
}

.cashbox-soft-btn {
    background: #fff;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.cashbox-soft-btn:hover {
    background: #f8fafc;
    color: #111827;
}

.cashbox-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.cashbox-stat-card {
    background: #fff;
    border: 1px solid #e7ecf3;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}

.cashbox-stat-card span {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 8px;
}

.cashbox-stat-card strong {
    font-size: 28px;
    font-weight: 900;
    color: #0f172a;
}

.cashbox-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    align-items: center;
}

.cashbox-search {
    flex: 1;
    position: relative;
}

.cashbox-search i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    inset-inline-start: 14px;
    color: #94a3b8;
}

.cashbox-search input,
.cashbox-toolbar select {
    width: 100%;
    height: 46px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    padding: 0 42px 0 14px;
    outline: none;
}

.cashbox-toolbar select {
    max-width: 180px;
    padding: 0 12px;
}

.cashbox-table-card {
    background: #fff;
    border: 1px solid #e7ecf3;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .05);
}

.cashbox-table {
    margin: 0;
}

.cashbox-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
    padding: 14px;
    border-bottom: 1px solid #e7ecf3;
}

.cashbox-table tbody td {
    padding: 14px;
    color: #334155;
    vertical-align: middle;
}

.cashbox-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.cashbox-badge.cash {
    background: #ecfdf5;
    color: #047857;
}

.cashbox-badge.bank {
    background: #eff6ff;
    color: #1d4ed8;
}

.cashbox-status {
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.cashbox-status.active {
    background: #ecfdf5;
    color: #047857;
}

.cashbox-status.inactive {
    background: #fef2f2;
    color: #b91c1c;
}

.cashbox-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.cashbox-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: .2s ease;
    text-decoration: none;
}

.cashbox-icon-btn:hover {
    background: #f8fafc;
    color: #0f172a;
}

.cashbox-form-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 18px;
    align-items: start;
}

.cashbox-form-main {
    display: grid;
    gap: 16px;
}

.cashbox-section,
.cashbox-side-card {
    background: #fff;
    border: 1px solid #e7ecf3;
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .05);
}

.cashbox-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eef2f7;
}

.cashbox-section-title > i {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.cashbox-section-title h5 {
    margin: 0;
    font-size: 17px;
    font-weight: 900;
    color: #0f172a;
}

.cashbox-section-title span {
    color: #64748b;
    font-size: 13px;
}

.cashbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.cashbox-col-2 {
    grid-column: span 2;
}

.cashbox-field label {
    display: block;
    font-size: 13px;
    font-weight: 900;
    color: #334155;
    margin-bottom: 7px;
}

.cashbox-field label span {
    color: #dc2626;
}

.cashbox-field input,
.cashbox-field select,
.cashbox-field textarea {
    width: 100%;
    border: 1px solid #dbe3ef;
    background: #fff;
    border-radius: 14px;
    padding: 11px 13px;
    outline: none;
    color: #0f172a;
    transition: .2s ease;
}

.cashbox-field input:focus,
.cashbox-field select:focus,
.cashbox-field textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .08);
}

.cashbox-field input[readonly] {
    background: #f8fafc;
    color: #64748b;
}

.cashbox-field small {
    display: block;
    color: #94a3b8;
    margin-top: 6px;
    font-size: 12px;
}

.cashbox-checkbox-field {
    display: flex;
    align-items: end;
}

.cashbox-checkbox-field label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    width: 100%;
    background: #f8fafc;
}

.cashbox-checkbox-field input {
    width: auto;
}

.cashbox-form-side {
    position: sticky;
    top: 90px;
}

.cashbox-side-card {
    text-align: center;
}

.cashbox-side-icon {
    width: 70px;
    height: 70px;
    border-radius: 22px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 18px 36px rgba(37, 99, 235, .22);
}

.cashbox-side-card h5 {
    font-weight: 900;
    margin-bottom: 8px;
}

.cashbox-side-card p {
    color: #64748b;
    font-size: 14px;
}

.cashbox-rule-list {
    text-align: start;
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.cashbox-rule-list div {
    display: flex;
    gap: 10px;
    color: #475569;
    font-size: 13px;
}

.cashbox-rule-list i {
    color: #16a34a;
}

.cashbox-alert {
    padding: 13px 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-weight: 800;
}

.cashbox-alert.success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #bbf7d0;
}

.cashbox-alert.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

@media (max-width: 1100px) {
    .cashbox-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .cashbox-form-layout {
        grid-template-columns: 1fr;
    }

    .cashbox-form-side {
        position: static;
    }
}

@media (max-width: 700px) {
    .cashbox-header,
    .cashbox-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .cashbox-toolbar select {
        max-width: none;
    }

    .cashbox-grid,
    .cashbox-stats {
        grid-template-columns: 1fr;
    }

    .cashbox-col-2 {
        grid-column: span 1;
    }
}

/* 🔥 كارد الصلاحيات */
.cashbox-access-card {
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    border: 1px solid #eef1f5;
    box-shadow: 0 10px 25px rgba(0,0,0,.05);
}

/* header */
.access-header {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.access-header i {
    font-size: 20px;
    color: #6366f1;
}

.access-header h6 {
    margin: 0;
    font-weight: 700;
}

.access-header span {
    font-size: 12px;
    color: #888;
}

/* list */
.access-list {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 10px;
}

/* row */
.access-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-radius: 10px;
    transition: .2s;
}

.access-row:hover {
    background: #f8fafc;
}

/* username */
.access-row span {
    font-weight: 600;
    font-size: 13px;
}

/* checkboxes */
.access-row label {
    font-size: 12px;
    margin-left: 5px;
}

/* زر */
.btn-save {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg,#6366f1,#4f46e5);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}