:root {
    --primary: #111827;
    --brand-primary: #111827;
    --primary-color: #111827;

    --secondary: #4F46E5;
    --brand-secondary: #4F46E5;
    --accent-color: #4F46E5;

    --brand-light: #F8FAFC;
    --background-color: #F8FAFC;

    --dark: #111827;
    --brand-dark: #111827;
    --text-color: #111827;

    --white: #ffffff;
    --surface: #ffffff;
    --surface-soft: #F8FAFC;
    --surface-muted: #F1F5F9;

    --border-color: #E2E8F0;
    --border-soft: #EEF2F7;
    --muted-color: #64748B;

    --success-color: #16A34A;
    --warning-color: #F59E0B;
    --danger-color: #DC2626;
    --info-color: #0284C7;

    --sidebar-width: 292px;

    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --shadow-sm: 0 8px 24px rgba(15, 23, 42, .06);
    --shadow-md: 0 16px 45px rgba(15, 23, 42, .09);
    --shadow-lg: 0 24px 80px rgba(15, 23, 42, .14);
}

/* =========================================================
   Base
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    margin: 0;
    color: var(--brand-dark);
    background:
        radial-gradient(circle at top left, rgba(79, 70, 229, .08), transparent 34%),
        radial-gradient(circle at bottom right, rgba(79, 70, 229, .06), transparent 32%),
        var(--brand-light);
    font-family: "Cairo", "Tahoma", sans-serif;
    font-size: 15px;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--brand-secondary);
}

img {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

[dir="ltr"],
.dir-ltr {
    direction: ltr;
    text-align: left;
}

.text-primary-ui {
    color: var(--brand-secondary) !important;
}

/* =========================================================
   App Layout
========================================================= */

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    position: fixed;
    inset-block: 0;
    right: 0;
    z-index: 20;
    width: var(--sidebar-width);
    padding: 24px 18px;
    overflow-y: auto;
    color: #fff;
    background:
        radial-gradient(circle at 20% 0%, rgba(79, 70, 229, .34), transparent 28%),
        linear-gradient(180deg, var(--brand-primary) 0%, #0b1020 100%);
    border-left: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px 24px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.sidebar-logo-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 16px;
    padding: 7px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .14);
}

.brand-mark {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    box-shadow: 0 14px 35px rgba(79, 70, 229, .35);
    font-size: 16px;
    font-weight: 900;
}

.brand-title {
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.25;
}

.brand-subtitle {
    margin-top: 4px;
    color: rgba(255, 255, 255, .60);
    font-size: 12px;
    font-weight: 700;
}

.sidebar-nav {
    margin-top: 22px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 13px 14px;
    margin-bottom: 8px;
    border-radius: 16px;
    color: rgba(255, 255, 255, .68);
    font-weight: 800;
    transition: .18s ease;
}

.sidebar-nav a i {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.sidebar-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.sidebar-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 3px 0 0 var(--brand-secondary);
}

.main-content {
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    margin-right: var(--sidebar-width);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    min-height: 96px;
    padding: 22px 34px;
    background: rgba(248, 250, 252, .88);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, .8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.topbar h1 {
    margin: 0;
    color: var(--brand-dark);
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -.3px;
}

.topbar p {
    margin: 7px 0 0;
    color: var(--muted-color);
    font-size: 14px;
    font-weight: 700;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-info {
    min-width: 140px;
    text-align: left;
}

.user-info strong,
.user-info span {
    display: block;
}

.user-info strong {
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 900;
}

.user-info span {
    margin-top: 2px;
    color: var(--muted-color);
    font-size: 12px;
    font-weight: 700;
}

.content-area {
    padding: 34px;
}

/* =========================================================
   Shared UI
========================================================= */

.ui-card,
.table-card,
.settings-panel,
.settings-menu,
.auth-card,
.dashboard-card,
.metric-card {
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: var(--shadow-sm);
}

.ui-card {
    padding: 28px;
    border-radius: var(--radius-xl);
}

.section-header,
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.section-header {
    margin-bottom: 26px;
}

.section-title,
.panel-header h2,
.dashboard-card-header h3 {
    margin: 0;
    color: var(--brand-dark);
    font-weight: 900;
    letter-spacing: -.3px;
}

.section-title,
.panel-header h2 {
    font-size: 24px;
}

.section-subtitle,
.panel-header p {
    margin-top: 8px;
    color: var(--muted-color);
    font-weight: 700;
    line-height: 1.8;
}

.btn {
    border-radius: 14px;
    font-weight: 900;
}

.btn-ui {
    padding: 11px 20px;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    box-shadow: 0 12px 28px rgba(79, 70, 229, .24);
}

.btn-ui:hover,
.btn-ui:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(79, 70, 229, .30);
}

.btn-soft {
    padding: 10px 16px;
    border: 1px solid #E2E8F0;
    color: var(--brand-dark);
    background: #EEF2F7;
}

.btn-soft:hover {
    color: var(--brand-dark);
    background: #E2E8F0;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F1F5F9;
    color: var(--brand-dark);
    transition: .18s ease;
}

.btn-icon:hover {
    color: var(--brand-secondary);
    background: rgba(79, 70, 229, .10);
}

.btn-icon-danger:hover {
    color: var(--danger-color);
    background: #FEE2E2;
}

.btn-icon:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.action-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.empty-state {
    padding: 36px 18px;
    border-radius: 22px;
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
    color: var(--muted-color);
    text-align: center;
    font-size: 14px;
    font-weight: 800;
}

.info-box {
    height: 100%;
    padding: 18px;
    border-radius: 20px;
    background: #F8FAFC;
    border: 1px solid rgba(226, 232, 240, .95);
}

.info-box span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted-color);
    font-size: 12px;
    font-weight: 800;
}

.info-box strong {
    display: block;
    color: var(--dark);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.7;
}

/* =========================================================
   Forms
========================================================= */

.form-label {
    margin-bottom: 8px;
    color: #334155;
    font-weight: 900;
}

.form-control,
.form-select {
    min-height: 48px;
    border: 1px solid #DDE4EE;
    border-radius: 16px;
    background-color: #fff;
    color: var(--brand-dark);
    font-weight: 700;
    padding: 11px 14px;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: #A5B4FC;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .12);
}

.form-control::placeholder {
    color: #94A3B8;
    font-weight: 600;
}

.field-error {
    min-height: 18px;
    margin-top: 6px;
    color: var(--danger-color);
    font-size: 13px;
    font-weight: 800;
}

.form-hint,
.form-text {
    margin-top: 8px;
    color: var(--muted-color);
    font-size: 13px;
    font-weight: 700;
}

.is-invalid {
    border-color: var(--danger-color) !important;
}

.filter-bar,
.form-section {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
}

.filter-bar {
    border-radius: 24px;
    padding: 18px;
    margin-bottom: 22px;
}

.form-section {
    border-radius: 26px;
    padding: 22px;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--brand-dark);
    font-size: 17px;
    font-weight: 900;
    margin-bottom: 22px;
}

.form-section-title i {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(79, 70, 229, .10);
    color: var(--brand-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.form-switch-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 22px;
    padding: 18px;
}

.switch-ui {
    position: relative;
    flex: 0 0 58px;
    width: 58px;
    height: 32px;
}

.switch-ui input {
    display: none;
}

.switch-ui span {
    position: absolute;
    inset: 0;
    cursor: pointer;
    border-radius: 999px;
    background: #CBD5E1;
    transition: .18s ease;
}

.switch-ui span::before {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    right: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 5px 14px rgba(15, 23, 42, .18);
    transition: .18s ease;
}

.switch-ui input:checked + span {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
}

.switch-ui input:checked + span::before {
    right: 29px;
}

/* Select2 */

.select2-container {
    width: 100% !important;
    direction: rtl;
}

.select2-container--bootstrap-5 .select2-selection {
    min-height: 46px;
    border-radius: 14px;
    border-color: #E5E7EB;
    padding: .35rem .75rem;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--secondary);
    box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .12);
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    border-radius: 999px;
    background: var(--brand-light);
    border-color: #E5E7EB;
    color: var(--dark);
    padding-inline: 8px;
}

.select2-dropdown {
    direction: rtl;
    text-align: right;
}

/* =========================================================
   Tables / Badges / Pagination
========================================================= */

.table-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
}

.table {
    margin: 0;
}

.table thead th {
    background: #F8FAFC;
    color: #475569;
    border-bottom: 1px solid #E2E8F0;
    padding: 15px 16px;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.table tbody td {
    vertical-align: middle;
    padding: 15px 16px;
    color: var(--brand-dark);
    border-bottom: 1px solid #F1F5F9;
    font-weight: 700;
}

.table-title {
    color: var(--brand-dark);
    font-weight: 900;
    margin-bottom: 4px;
}

.table-subtitle {
    color: var(--muted-color);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.7;
}

.table-loading {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .74);
    backdrop-filter: blur(4px);
}

.table-loading > div {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
}

.badge-ui,
.code-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    white-space: nowrap;
}

.badge-ui {
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12px;
}

.code-badge {
    direction: ltr;
    background: #F1F5F9;
    color: var(--brand-dark);
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 5px 9px;
    font-size: 12px;
}

.badge-success {
    color: #166534;
    background: #DCFCE7;
}

.badge-warning {
    color: #92400E;
    background: #FEF3C7;
}

.badge-danger {
    color: #991B1B;
    background: #FEE2E2;
}

.badge-muted {
    color: #475569;
    background: #F1F5F9;
}

.ajax-pagination {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-info {
    color: var(--muted-color);
    font-size: 13px;
    font-weight: 800;
}

.pagination-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* =========================================================
   Auth / Login
========================================================= */

.login-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding: 32px;
    background:
        radial-gradient(circle at top right, rgba(79, 70, 229, .14), transparent 34%),
        radial-gradient(circle at bottom left, rgba(79, 70, 229, .10), transparent 34%),
        var(--brand-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-bg-shape {
    position: absolute;
    border-radius: 999px;
    filter: blur(4px);
    pointer-events: none;
}

.shape-one {
    width: 340px;
    height: 340px;
    right: -120px;
    top: -120px;
    background: rgba(79, 70, 229, .10);
}

.shape-two {
    width: 420px;
    height: 420px;
    left: -160px;
    bottom: -160px;
    background: rgba(79, 70, 229, .09);
}

.login-shell {
    position: relative;
    z-index: 2;
    width: min(1120px, 100%);
    min-height: 660px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: rgba(255, 255, 255, .74);
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 38px;
    overflow: hidden;
    box-shadow: 0 28px 90px rgba(15, 23, 42, .14);
    backdrop-filter: blur(18px);
}

.login-brand-panel {
    position: relative;
    overflow: hidden;
    padding: 46px;
    color: #fff;
    background:
        radial-gradient(circle at 20% 20%, rgba(79, 70, 229, .32), transparent 34%),
        linear-gradient(145deg, var(--brand-primary) 0%, #1f2670 100%);
}

.login-brand-panel::before {
    content: "";
    position: absolute;
    inset: auto -90px -120px auto;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    border: 42px solid rgba(255, 255, 255, .06);
}

.login-brand-panel::after {
    content: "";
    position: absolute;
    right: 46px;
    bottom: 46px;
    width: 180px;
    height: 180px;
    border-radius: 44px;
    background: rgba(79, 70, 229, .24);
    transform: rotate(12deg);
}

.login-brand-content {
    position: relative;
    z-index: 2;
    max-width: 480px;
}

.login-logo-wrap {
    width: 112px;
    height: 112px;
    border-radius: 32px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .16);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 34px;
}

.login-logo-wrap img {
    max-width: 88px;
    max-height: 88px;
    object-fit: contain;
}

.login-brand-panel h1 {
    margin: 0 0 18px;
    font-size: 44px;
    font-weight: 900;
    letter-spacing: -.5px;
}

.login-brand-panel p {
    margin: 0;
    color: rgba(255, 255, 255, .76);
    font-size: 18px;
    font-weight: 700;
    line-height: 2;
}

.login-feature-list {
    margin-top: 42px;
    display: grid;
    gap: 16px;
}

.login-feature-list div {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, .88);
    font-weight: 800;
}

.login-feature-list i {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 70, 229, .18);
    color: #fff;
}

.login-form-panel {
    padding: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form-card {
    width: 100%;
    max-width: 430px;
}

.login-form-header {
    margin-bottom: 30px;
}

.login-eyebrow,
.dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(79, 70, 229, .10);
    color: var(--brand-secondary);
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 14px;
}

.login-form-header h2 {
    margin: 0;
    color: var(--brand-dark);
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -.4px;
}

.login-form-header p {
    margin: 10px 0 0;
    color: var(--muted-color);
    font-weight: 700;
    line-height: 1.8;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    right: 15px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: #64748B;
}

.input-icon .form-control {
    padding-right: 44px;
}

.login-check {
    color: #475569;
    font-weight: 800;
}

.login-submit-btn {
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-support {
    margin-top: 24px;
    text-align: center;
    color: var(--muted-color);
    font-weight: 700;
}

.login-support span {
    color: var(--brand-dark);
    font-weight: 900;
}

/* =========================================================
   Settings
========================================================= */

.settings-layout {
    direction: ltr;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.settings-side,
.settings-content {
    direction: rtl;
}

.settings-side {
    position: sticky;
    top: 122px;
}

.settings-brand-preview {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 30px;
    border-radius: 30px;
    margin-bottom: 18px;
    background:
        radial-gradient(circle at 16% 10%, rgba(79, 70, 229, .34), transparent 34%),
        linear-gradient(145deg, var(--brand-primary) 0%, #1f2670 100%);
    box-shadow: var(--shadow-md);
}

.settings-brand-preview::after {
    content: "";
    position: absolute;
    left: -45px;
    bottom: -45px;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    border: 28px solid rgba(255, 255, 255, .06);
}

.settings-logo-preview-wide,
.preview-logo-box {
    position: relative;
    z-index: 1;
    border-radius: 24px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .16);
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-logo-preview-wide {
    width: 100%;
    min-height: 92px;
    padding: 18px;
    margin-bottom: 22px;
}

.settings-logo-preview-wide img {
    max-width: 100%;
    max-height: 68px;
    object-fit: contain;
}

.preview-logo-box {
    width: 78px;
    height: 78px;
    margin-bottom: 22px;
}

.preview-logo-box img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.preview-logo-box span {
    width: 56px;
    height: 56px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
    font-weight: 900;
}

.settings-brand-preview h3,
.settings-brand-preview p {
    position: relative;
    z-index: 1;
}

.settings-brand-preview h3 {
    margin: 0 0 10px;
    font-size: 25px;
    font-weight: 900;
}

.settings-brand-preview p {
    margin: 0;
    color: rgba(255, 255, 255, .72);
    line-height: 1.9;
    font-size: 14px;
    font-weight: 700;
}

.settings-menu {
    padding: 10px;
    border-radius: 26px;
}

.settings-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    color: #475569;
    padding: 13px 15px;
    border-radius: 18px;
    font-weight: 900;
    transition: .18s ease;
}

.settings-menu a i {
    color: #64748B;
}

.settings-menu a:hover,
.settings-menu a.active {
    background: rgba(79, 70, 229, .10);
    color: var(--brand-secondary);
}

.settings-menu a:hover i,
.settings-menu a.active i {
    color: var(--brand-secondary);
}

.settings-panel {
    padding: 30px;
    border-radius: 30px;
    margin-bottom: 24px;
}

.panel-header {
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid #EDF2F7;
}

.panel-badge {
    background: rgba(79, 70, 229, .10);
    color: var(--brand-secondary);
    border: 1px solid rgba(79, 70, 229, .16);
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 12px;
    font-weight: 900;
}

.upload-box {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 104px;
    padding: 16px;
    border-radius: 22px;
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
}

.upload-box img {
    width: 76px;
    height: 76px;
    object-fit: contain;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #E2E8F0;
    padding: 8px;
}

.upload-box .logo-preview-wide {
    width: 170px;
    height: 76px;
    object-fit: contain;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #E2E8F0;
    padding: 10px;
}

.color-field {
    min-height: 50px;
    border-radius: 17px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #DDE4EE;
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-field input[type="color"] {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

.color-field span {
    direction: ltr;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
}

.pro-color-field {
    height: 52px;
    padding: 6px;
    gap: 8px;
}

.pro-color-field input[type="color"] {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
}

.pro-color-field .js-color-code {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--brand-dark);
    font-weight: 900;
    font-size: 14px;
    text-align: left;
    direction: ltr;
    padding: 0 6px;
}

.pro-color-field .js-color-code:focus {
    box-shadow: none;
}

.pro-color-field .js-color-code.is-invalid {
    color: var(--danger-color);
}

.settings-actions {
    position: sticky;
    bottom: 20px;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    padding: 16px;
    border-radius: 26px;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: var(--shadow-md);
}

/* =========================================================
   Permissions
========================================================= */

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

.permission-module-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 24px;
    padding: 18px;
}

.permission-module-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #E2E8F0;
}

.permission-module-header h3 {
    margin: 0;
    color: var(--brand-dark);
    font-size: 18px;
    font-weight: 900;
}

.permission-module-header span {
    display: block;
    margin-top: 4px;
    color: var(--muted-color);
    font-size: 12px;
    font-weight: 800;
}

.permission-check-all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    color: var(--brand-secondary);
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.permission-list {
    display: grid;
    gap: 10px;
}

.permission-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 12px;
    cursor: pointer;
    transition: .18s ease;
}

.permission-item:hover {
    border-color: rgba(79, 70, 229, .20);
    background: rgba(79, 70, 229, .05);
}

.permission-item input {
    margin-top: 4px;
}

.permission-item strong {
    display: block;
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 900;
}

.permission-item small {
    display: block;
    direction: ltr;
    text-align: left;
    color: var(--muted-color);
    font-size: 12px;
    font-weight: 800;
    margin-top: 3px;
}

/* =========================================================
   Dashboard Shared
========================================================= */

.dashboard-cache-note {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(79, 70, 229, .08);
    border: 1px solid rgba(79, 70, 229, .14);
    color: var(--dark);
}

.dashboard-cache-note-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #fff;
    color: var(--secondary);
    font-size: 18px;
}

.dashboard-cache-note-content {
    flex: 1;
    min-width: 0;
}

.dashboard-cache-note strong {
    display: block;
    margin-bottom: 2px;
    font-size: 13px;
    font-weight: 900;
}

.dashboard-cache-note span {
    display: block;
    color: #64748B;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.7;
}

.dashboard-cache-note-close {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #fff;
    color: #64748B;
    font-size: 13px;
    cursor: pointer;
    transition: .2s ease;
}

.dashboard-cache-note-close:hover {
    color: #fff;
    background: var(--secondary);
}

.dashboard-hero-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 34px 36px;
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, .16), transparent 34%),
        radial-gradient(circle at bottom left, rgba(255, 255, 255, .12), transparent 32%),
        linear-gradient(135deg, #111827 0%, #312E81 48%, #4F46E5 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
}

.dashboard-hero-card::before,
.dashboard-hero-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.dashboard-hero-card::before {
    width: 210px;
    height: 210px;
    right: -80px;
    top: -80px;
    background: rgba(255, 255, 255, .10);
}

.dashboard-hero-card::after {
    width: 230px;
    height: 230px;
    left: -90px;
    bottom: -100px;
}

.dashboard-hero-card > * {
    position: relative;
    z-index: 1;
}

.dashboard-hero-kicker,
.dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #E0E7FF;
    font-size: 12px;
    font-weight: 900;
}

.dashboard-hero-card h2,
.dashboard-hero-title {
    margin: 0 0 10px;
    color: #fff;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.5;
}

.dashboard-hero-card p,
.dashboard-hero-text {
    max-width: 760px;
    margin: 0;
    color: #E0E7FF;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.9;
}

.dashboard-hero-meta {
    flex: 0 0 190px;
    min-height: 120px;
    padding: 22px;
    border-radius: 24px;
    display: grid;
    place-content: center;
    text-align: center;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .16);
    backdrop-filter: blur(10px);
}

.dashboard-hero-meta span,
.dashboard-hero-grid span {
    display: block;
    margin-bottom: 6px;
    color: #E0E7FF;
    font-size: 12px;
    font-weight: 800;
}

.dashboard-hero-meta strong,
.dashboard-hero-grid strong {
    display: block;
    color: #fff;
    font-weight: 900;
}

.dashboard-hero-meta strong {
    font-size: 20px;
}

.dashboard-hero-content {
    position: relative;
    z-index: 2;
    flex: 1;
    min-width: 0;
}

.dashboard-hero-icon {
    flex: 0 0 92px;
    width: 92px;
    height: 92px;
    border-radius: 26px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 46px;
}

.dashboard-hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 620px;
    margin-top: 22px;
}

.dashboard-hero-grid > div {
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .16);
    backdrop-filter: blur(8px);
}

.dashboard-hero-grid strong {
    font-size: 17px;
    direction: rtl;
}

/* KPI / Mini / Panels */

.premium-kpi-card,
.mini-stat-card,
.premium-panel {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}

.premium-kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 142px;
    padding: 24px;
    border-radius: 26px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: .2s ease;
}

.premium-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 60px rgba(15, 23, 42, .10);
}

.premium-kpi-card::before {
    content: "";
    position: absolute;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    right: -35px;
    top: -35px;
    background: rgba(79, 70, 229, .07);
}

.premium-kpi-icon,
.mini-stat-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    background: rgba(79, 70, 229, .08);
    color: var(--secondary);
}

.premium-kpi-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    font-size: 23px;
}

.premium-kpi-content {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.premium-kpi-content span,
.premium-kpi-label {
    display: block;
    margin-bottom: 7px;
    color: #64748B;
    font-size: 13px;
    font-weight: 900;
}

.premium-kpi-content strong,
.premium-kpi-value {
    display: block;
    color: var(--dark);
    font-size: 23px;
    font-weight: 900;
    line-height: 1.4;
}

.premium-kpi-content small,
.premium-kpi-hint {
    display: block;
    margin-top: 5px;
    color: #64748B;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.6;
}

.mini-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.mini-stat-card {
    min-height: 74px;
    padding: 16px 18px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mini-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    font-size: 19px;
}

.mini-stat-card span {
    color: #64748B;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.6;
}

.mini-stat-card strong {
    display: block;
    color: var(--dark);
    font-size: 20px;
    font-weight: 900;
    white-space: nowrap;
}

.premium-panel {
    padding: 26px;
    border-radius: 28px;
}

.premium-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.premium-panel-header h3 {
    margin: 0 0 6px;
    color: var(--dark);
    font-size: 22px;
    font-weight: 900;
    line-height: 1.4;
}

.premium-panel-header p {
    margin: 0;
    color: #64748B;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.7;
}

.premium-table-list,
.ranked-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.premium-list-row,
.ranked-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 74px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #F8FAFC;
    border: 1px solid rgba(226, 232, 240, .9);
}

.premium-list-row {
    justify-content: space-between;
}

.premium-list-main,
.ranked-content {
    min-width: 0;
}

.premium-list-title,
.ranked-content strong,
.premium-list-row strong {
    display: block;
    color: var(--dark);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.7;
}

.premium-list-title:hover {
    color: var(--secondary);
}

.premium-list-subtitle,
.ranked-content span,
.premium-list-row span {
    display: block;
    color: #64748B;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.7;
}

.premium-list-side {
    flex: 0 0 auto;
    min-width: 130px;
    text-align: left;
}

.premium-list-side strong,
.ranked-value {
    color: var(--dark);
    font-size: 14px;
    font-weight: 900;
    direction: rtl;
}

.ranked-number {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(79, 70, 229, .10);
    color: var(--secondary);
    font-size: 15px;
    font-weight: 900;
}

.ranked-content {
    flex: 1;
}

.ranked-value {
    flex: 0 0 auto;
}

/* Salon Dashboard Scope */

.dashboard-premium {
    display: block;
}

.dashboard-premium .dashboard-hero-card {
    min-height: 250px;
    padding: 34px;
    border-radius: 30px;
    align-items: center;
}

.dashboard-premium .dashboard-hero-title {
    font-size: 34px;
    line-height: 1.35;
}

.dashboard-premium .dashboard-hero-text {
    max-width: 620px;
    margin-bottom: 22px;
    font-weight: 800;
}

.dashboard-premium > .row:first-of-type .col-xl-3 .premium-kpi-card {
    height: auto !important;
    min-height: 180px;
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
}

.dashboard-premium .premium-kpi-card .premium-kpi-icon {
    margin-inline-start: auto;
}

.dashboard-premium .premium-kpi-value {
    font-size: 30px;
    line-height: 1.2;
}

.dashboard-premium .mini-stats-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-premium .mini-stat-card {
    min-height: 92px;
    justify-content: flex-start;
    padding: 18px;
}

.dashboard-premium .premium-panel .section-header {
    margin-bottom: 20px;
}

/* Skeleton */

.dashboard-skeleton-card,
.dashboard-skeleton-mini,
.dashboard-skeleton-panel {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, .95);
}

.dashboard-skeleton-card {
    height: 142px;
}

.dashboard-skeleton-card.hero {
    height: 190px;
}

.dashboard-skeleton-mini {
    height: 74px;
}

.dashboard-skeleton-panel {
    height: 320px;
}

.dashboard-skeleton-card::after,
.dashboard-skeleton-mini::after,
.dashboard-skeleton-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(100%);
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, .12), transparent);
    animation: dashboardSkeleton 1.25s infinite;
}

@keyframes dashboardSkeleton {
    100% {
        transform: translateX(-100%);
    }
}

/* =========================================================
   Account / Subscription Pages
========================================================= */

.subscription-expired-page {
    max-width: 780px;
    margin: 0 auto;
}

.subscription-expired-card {
    padding: 44px 34px;
    border-radius: 30px;
}

.subscription-expired-icon {
    width: 82px;
    height: 82px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    margin: 0 auto 24px;
    background: rgba(220, 38, 38, .08);
    color: var(--danger-color);
    font-size: 34px;
}

.subscription-expired-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 12px;
}

.subscription-expired-text {
    max-width: 560px;
    margin: 0 auto 28px;
    color: #64748B;
    font-weight: 700;
    line-height: 1.9;
}

.subscription-expired-info,
.account-subscription-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.subscription-expired-info {
    margin: 28px auto;
    max-width: 620px;
}

.subscription-expired-info > div,
.account-subscription-grid > div {
    padding: 16px;
    border-radius: 20px;
    background: #F8FAFC;
    border: 1px solid rgba(226, 232, 240, .9);
    text-align: right;
}

.subscription-expired-info span,
.account-subscription-grid span,
.account-subscription-label {
    display: block;
    color: #64748B;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
}

.subscription-expired-info strong,
.account-subscription-grid strong {
    display: block;
    color: var(--dark);
    font-size: 15px;
    font-weight: 900;
}

.subscription-expired-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.account-subscription-card {
    padding: 22px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(79, 70, 229, .10), transparent 36%),
        #fff;
    border: 1px solid rgba(226, 232, 240, .95);
}

.account-subscription-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.account-subscription-label {
    font-size: 13px;
}

.account-subscription-head h3 {
    color: var(--dark);
    font-size: 22px;
    font-weight: 900;
    margin: 0;
}

.account-subscription-message {
    color: #64748B;
    font-weight: 700;
    line-height: 1.9;
    margin-bottom: 20px;
}

/* =========================================================
   Legacy Dashboard / Setup Cards
========================================================= */

.dashboard-hero {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    padding: 34px;
    margin-bottom: 28px;
    border-radius: 34px;
    color: #fff;
    background:
        radial-gradient(circle at 18% 15%, rgba(79, 70, 229, .32), transparent 30%),
        linear-gradient(135deg, var(--brand-primary) 0%, #1f2670 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .16);
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    left: -80px;
    bottom: -110px;
    width: 310px;
    height: 310px;
    border-radius: 999px;
    border: 42px solid rgba(255, 255, 255, .06);
}

.dashboard-hero > * {
    position: relative;
    z-index: 2;
}

.dashboard-hero .dashboard-eyebrow {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.dashboard-hero h2 {
    margin: 0;
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -.5px;
}

.dashboard-hero p {
    max-width: 620px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, .72);
    font-size: 16px;
    line-height: 2;
    font-weight: 700;
}

.dashboard-hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-hero-primary {
    padding: 11px 18px;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    box-shadow: 0 14px 35px rgba(79, 70, 229, .24);
}

.btn-hero-primary:hover {
    color: #fff;
    transform: translateY(-1px);
}

.metric-card {
    min-height: 152px;
    padding: 24px;
    border-radius: 30px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    left: -34px;
    bottom: -42px;
    width: 130px;
    height: 130px;
    border-radius: 999px;
    background: rgba(79, 70, 229, .08);
}

.metric-icon {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    font-size: 22px;
}

.metric-card span,
.metric-card strong,
.metric-card small {
    display: block;
}

.metric-card span {
    color: #64748B;
    font-weight: 900;
    margin-bottom: 8px;
}

.metric-card strong {
    color: var(--brand-dark);
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 4px;
}

.metric-card small {
    color: #94A3B8;
    font-weight: 800;
}

.metric-success .metric-icon {
    background: linear-gradient(135deg, #16A34A, #22C55E);
}

.metric-warning .metric-icon {
    background: linear-gradient(135deg, #F59E0B, #F97316);
}

.metric-danger .metric-icon {
    background: linear-gradient(135deg, #DC2626, #FB7185);
}

.metric-info .metric-icon {
    background: linear-gradient(135deg, #0284C7, #06B6D4);
}

.dashboard-card {
    min-height: 100%;
    padding: 28px;
    border-radius: 32px;
}

.dashboard-card-header {
    margin-bottom: 24px;
}

.dashboard-card-header h3 {
    font-size: 22px;
}

.dashboard-card-header p {
    margin: 8px 0 0;
    color: #64748B;
    font-weight: 700;
    line-height: 1.8;
}

.setup-list {
    display: grid;
    gap: 14px;
}

.setup-item,
.quick-action {
    color: inherit;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    transition: .18s ease;
}

.setup-item {
    display: flex;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
}

.setup-item:hover,
.quick-action:hover {
    color: inherit;
    transform: translateY(-2px);
    background: rgba(79, 70, 229, .08);
    border-color: rgba(79, 70, 229, .20);
}

.setup-item > span {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(79, 70, 229, .10);
    color: var(--brand-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.setup-item.done > span {
    color: #166534;
    background: #DCFCE7;
}

.setup-item h4 {
    margin: 0;
    color: var(--brand-dark);
    font-size: 16px;
    font-weight: 900;
}

.setup-item p {
    margin: 6px 0 0;
    color: #64748B;
    font-weight: 700;
    line-height: 1.7;
}

.brand-summary {
    text-align: center;
}

.brand-summary-logo {
    width: 116px;
    height: 116px;
    margin: 0 auto 18px;
    border-radius: 34px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-summary-logo img {
    max-width: 86px;
    max-height: 86px;
    object-fit: contain;
}

.brand-summary-logo span {
    width: 74px;
    height: 74px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.brand-summary h4 {
    margin: 0;
    color: var(--brand-dark);
    font-size: 22px;
    font-weight: 900;
}

.brand-summary p {
    margin: 10px 0 18px;
    color: #64748B;
    line-height: 1.8;
    font-weight: 700;
}

.brand-colors {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.brand-colors span {
    width: 34px;
    height: 34px;
    border-radius: 13px;
    border: 1px solid #E2E8F0;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.quick-action {
    min-height: 116px;
    padding: 20px;
    border-radius: 24px;
    display: flex;
    gap: 14px;
}

.quick-action i {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.quick-action strong {
    display: block;
    font-weight: 900;
    margin-bottom: 6px;
}

.quick-action span {
    color: #64748B;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}

.subscription-card {
    text-align: center;
}

.subscription-icon {
    width: 74px;
    height: 74px;
    border-radius: 26px;
    margin: 0 auto 18px;
    background: rgba(79, 70, 229, .12);
    color: var(--brand-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.subscription-card h3 {
    font-weight: 900;
    margin-bottom: 12px;
}

.subscription-card p {
    color: #64748B;
    font-weight: 700;
    line-height: 1.8;
}

.subscription-note {
    margin-top: 18px;
    background: #F8FAFC;
    border-radius: 20px;
    padding: 16px;
    color: #475569;
    font-weight: 800;
    line-height: 1.8;
}

/* =========================================================
   SweetAlert2
========================================================= */

.app-toast,
.app-confirm {
    font-family: "Cairo", "Tahoma", sans-serif !important;
    box-shadow: var(--shadow-md) !important;
}

.app-toast {
    border-radius: 18px !important;
}

.app-confirm {
    border-radius: 28px !important;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 1399.98px) {
    .mini-stats-grid,
    .dashboard-premium .mini-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1200px) {
    .settings-layout {
        grid-template-columns: 300px minmax(0, 1fr);
    }
}

@media (max-width: 1199.98px) {
    .dashboard-hero-icon {
        display: none;
    }

    .dashboard-premium > .row:first-of-type .col-xl-3 .premium-kpi-card {
        min-height: 160px;
    }
}

@media (max-width: 991.98px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: static;
        width: 100%;
        max-height: none;
        border-left: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
    }

    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .sidebar-nav a {
        margin-bottom: 0;
    }

    .main-content {
        width: 100%;
        margin-right: 0;
    }

    .topbar {
        position: static;
        display: block;
        padding: 20px 22px;
    }

    .topbar-user {
        margin-top: 18px;
        justify-content: space-between;
    }

    .content-area {
        padding: 22px;
    }

    .settings-layout {
        direction: rtl;
        grid-template-columns: 1fr;
    }

    .settings-side {
        position: static;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        min-height: 380px;
    }

    .dashboard-hero,
    .dashboard-hero-card {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-hero-actions {
        margin-top: 22px;
    }

    .dashboard-hero-meta {
        flex: none;
        min-height: 96px;
    }

    .dashboard-hero-card,
    .dashboard-premium .dashboard-hero-card {
        min-height: auto;
        padding: 28px;
    }

    .dashboard-hero-grid,
    .dashboard-premium .dashboard-hero-grid {
        grid-template-columns: 1fr;
    }

    .mini-stats-grid,
    .dashboard-premium .mini-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .premium-panel-header,
    .section-header,
    .panel-header {
        flex-direction: column;
    }

    .quick-actions-grid,
    .permissions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: 14px;
    }

    .sidebar {
        padding: 20px 14px;
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .content-area {
        padding: 16px;
    }

    .ui-card,
    .settings-panel,
    .auth-card,
    .dashboard-card,
    .premium-panel {
        padding: 20px;
        border-radius: 24px;
    }

    .topbar h1 {
        font-size: 22px;
    }

    .dashboard-cache-note {
        align-items: flex-start;
    }

    .dashboard-hero,
    .dashboard-hero-card,
    .dashboard-premium .dashboard-hero-card {
        padding: 24px 20px;
        border-radius: 22px;
    }

    .dashboard-hero h2,
    .dashboard-hero-card h2,
    .dashboard-hero-title,
    .dashboard-premium .dashboard-hero-title {
        font-size: 24px;
    }

    .dashboard-hero p,
    .dashboard-hero-card p,
    .dashboard-hero-text {
        font-size: 13px;
    }

    .premium-kpi-card {
        min-height: auto;
        padding: 20px;
    }

    .mini-stats-grid,
    .dashboard-premium .mini-stats-grid {
        grid-template-columns: 1fr;
    }

    .mini-stat-card {
        min-height: 68px;
    }

    .premium-list-row,
    .ranked-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .premium-list-side,
    .ranked-value,
    .premium-list-row .text-end {
        width: 100%;
        min-width: 0;
        text-align: right !important;
    }

    .subscription-expired-card {
        padding: 32px 20px;
    }

    .subscription-expired-title {
        font-size: 22px;
    }

    .subscription-expired-info,
    .account-subscription-grid {
        grid-template-columns: 1fr;
    }

    .subscription-expired-actions,
    .account-subscription-head {
        flex-direction: column;
    }

    .subscription-expired-actions .btn,
    .subscription-expired-actions form,
    .subscription-expired-actions form .btn {
        width: 100%;
    }

    .login-page {
        padding: 16px;
    }

    .login-brand-panel,
    .login-form-panel {
        padding: 28px;
    }

    .login-brand-panel h1 {
        font-size: 32px;
    }

    .upload-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions .btn {
        width: 100%;
    }

    .table-responsive {
        border-radius: 20px;
    }
}

@media (max-width: 575.98px) {
    .topbar-user {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-info {
        text-align: right;
    }

    .content-area {
        padding: 14px;
    }

    .ui-card,
    .premium-panel,
    .settings-panel {
        padding: 18px;
        border-radius: 22px;
    }

    .section-title {
        font-size: 21px;
    }

    .login-shell {
        border-radius: 26px;
    }

    .login-brand-panel {
        min-height: auto;
    }

    .login-feature-list {
        margin-top: 28px;
    }
}

/* =========================================================
   Invoice Form Design Fix
   Add this block at the end of public/assets/css/app.css
========================================================= */

.invoice-form-card {
    padding: 30px;
}

.invoice-form-card .section-header {
    align-items: center;
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.invoice-form-card .form-section {
    padding: 24px;
    border-radius: 28px;
    background: rgba(248, 250, 252, 0.86);
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.invoice-form-card .form-section + .form-section {
    margin-top: 22px !important;
}

.invoice-form-card .form-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    color: var(--dark);
    font-size: 18px;
    font-weight: 900;
}

.invoice-form-card .form-section-title i {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(79, 70, 229, 0.10);
    color: var(--secondary);
    font-size: 18px;
}

.invoice-fields-row > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.invoice-field-head {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.invoice-field-head .form-label,
.invoice-form-card .form-label {
    color: #334155;
    font-size: 13px;
    font-weight: 900;
}

.invoice-form-card .form-label {
    min-height: 24px;
    margin-bottom: 8px;
}

.invoice-field-head .form-label {
    min-height: auto;
    margin-bottom: 0;
}

.invoice-field-head .btn {
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 12px;
    white-space: nowrap;
}

.invoice-form-card .form-control,
.invoice-form-card .form-select,
.invoice-form-card .select2-container--bootstrap-5 .select2-selection {
    min-height: 52px;
    border-radius: 16px;
    border-color: #dde4ee;
    background-color: #fff;
}

.invoice-form-card .select2-container--bootstrap-5 .select2-selection {
    display: flex;
    align-items: center;
    padding-block: 0.42rem;
}

.invoice-form-card .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 1.6;
    padding-inline-start: 0;
    padding-inline-end: 0;
}

.invoice-form-card .select2-container--bootstrap-5 .select2-selection--multiple {
    align-items: flex-start;
    min-height: 56px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.invoice-form-card .field-error {
    min-height: 18px;
    margin-top: 6px;
    margin-bottom: 0;
}

.invoice-services-select + .select2-container .select2-selection--multiple {
    min-height: 58px;
}

.invoice-summary-row {
    margin-top: 22px !important;
}

.invoice-summary-card,
.invoice-discount-card {
    min-height: 116px;
    padding: 18px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.invoice-summary-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.invoice-discount-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.invoice-discount-card .form-control {
    min-height: 50px;
    font-size: 16px;
    font-weight: 900;
    direction: ltr;
    text-align: left;
}

.invoice-summary-card .table-subtitle {
    margin-bottom: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.invoice-summary-card .h5,
.invoice-summary-card .h4 {
    color: var(--dark);
    line-height: 1.4;
}

.invoice-summary-card-total {
    background:
        radial-gradient(circle at top left, rgba(79, 70, 229, 0.08), transparent 42%),
        #fff;
}

.invoice-summary-card-total i {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: rgba(79, 70, 229, 0.09);
    font-size: 20px !important;
}

.invoice-form-card textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.invoice-form-card .form-actions {
    padding-top: 4px;
}

@media (max-width: 1199.98px) {
    .invoice-form-card {
        padding: 26px;
    }
}

@media (max-width: 991.98px) {
    .invoice-form-card .section-header {
        align-items: flex-start;
    }

    .invoice-form-card .section-header .btn {
        margin-top: 8px;
    }

    .invoice-form-card .form-section {
        padding: 22px;
        border-radius: 24px;
    }
}

@media (max-width: 767.98px) {
    .invoice-form-card {
        padding: 18px;
        border-radius: 24px;
    }

    .invoice-form-card .section-header {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .invoice-form-card .section-header .btn,
    .invoice-form-card .form-actions .btn {
        width: 100%;
    }

    .invoice-field-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .invoice-field-head .btn {
        width: 100%;
        justify-content: center;
    }

    .invoice-form-card .form-actions {
        flex-direction: column-reverse;
    }

    .invoice-summary-card,
    .invoice-discount-card {
        min-height: auto;
    }
}

.barber-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.report-stat-card {
    position: relative;
    overflow: hidden;
    min-height: 124px;
    padding: 22px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(79, 70, 229, 0.10), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.report-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.11);
    border-color: rgba(79, 70, 229, 0.22);
}

.report-stat-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 18px;
    bottom: 18px;
    width: 5px;
    border-radius: 999px;
    background: var(--primary, #4f46e5);
}

.report-stat-card::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    inset-inline-end: -45px;
    bottom: -55px;
    background: rgba(79, 70, 229, 0.07);
}

.report-stat-icon {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 70, 229, 0.10);
    color: var(--primary, #4f46e5);
    font-size: 24px;
    position: relative;
    z-index: 1;
}

.report-stat-content {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.report-stat-label {
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 9px;
}

.report-stat-value {
    color: #0f172a;
    font-size: 25px;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.stat-invoices::before,
.stat-invoices .report-stat-icon {
    background-color: rgba(79, 70, 229, 0.10);
    color: #4f46e5;
}

.stat-invoices::before {
    background: #4f46e5;
}

.stat-services::before {
    background: #0ea5e9;
}

.stat-services .report-stat-icon {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
}

.stat-collected::before {
    background: #16a34a;
}

.stat-collected .report-stat-icon {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.stat-withdrawals::before {
    background: #f97316;
}

.stat-withdrawals .report-stat-icon {
    background: rgba(249, 115, 22, 0.12);
    color: #ea580c;
}

.stat-deductions::before {
    background: #dc2626;
}

.stat-deductions .report-stat-icon {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.stat-absence::before {
    background: #7c3aed;
}

.stat-absence .report-stat-icon {
    background: rgba(124, 58, 237, 0.12);
    color: #6d28d9;
}

.stat-half-day::before {
    background: #0891b2;
}

.stat-half-day .report-stat-icon {
    background: rgba(8, 145, 178, 0.12);
    color: #0e7490;
}

@media (max-width: 1199px) {
    .barber-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .barber-stats-grid {
        grid-template-columns: 1fr;
    }

    .report-stat-card {
        min-height: 110px;
        padding: 18px;
    }

    .report-stat-value {
        font-size: 22px;
    }
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sidebar-brand-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-close-btn {
    display: none;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    align-items: center;
    justify-content: center;
}

.sidebar-section {
    padding-top: 14px;
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-section:first-child {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.sidebar-section-title {
    color: rgba(255, 255, 255, 0.48);
    font-size: 12px;
    font-weight: 800;
    padding: 0 16px 8px;
}

.sidebar-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 10px 8px;
}

.sidebar-nav .quick-action-link {
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    justify-content: flex-start;
    font-size: 13px;
}

.sidebar-nav .quick-action-link i {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.10);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-nav .quick-action-link:hover,
.sidebar-nav .quick-action-link.active {
    background: var(--secondary, #4F46E5);
    color: #fff;
}

.topbar-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-nav-btn {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 16px;
    background: #eef2ff;
    color: var(--primary, #111827);
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.mobile-quick-bar {
    display: none;
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 991px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        right: 0;
        width: 310px;
        max-width: calc(100vw - 34px);
        height: 100vh;
        z-index: 1050;
        transform: translateX(110%);
        transition: transform .25s ease;
        overflow-y: auto;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1040;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-close-btn {
        display: inline-flex;
    }

    .mobile-nav-btn {
        display: inline-flex;
    }

    .main-content {
        width: 100%;
        margin: 0;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: rgba(248, 250, 252, 0.96);
        backdrop-filter: blur(14px);
    }

    .topbar-user .user-info {
        display: none;
    }

    .mobile-quick-bar {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 12px 18px;
        background: rgba(248, 250, 252, 0.96);
        border-bottom: 1px solid #e5e7eb;
        scrollbar-width: none;
    }

    .mobile-quick-bar::-webkit-scrollbar {
        display: none;
    }

    .mobile-quick-bar a {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        min-height: 42px;
        padding: 0 14px;
        border-radius: 999px;
        background: #fff;
        border: 1px solid #e2e8f0;
        color: #0f172a;
        text-decoration: none;
        font-size: 13px;
        font-weight: 800;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    }

    .mobile-quick-bar a.active,
    .mobile-quick-bar a:hover,
    .mobile-quick-bar a:focus {
        background: var(--secondary, #4F46E5);
        border-color: var(--secondary, #4F46E5);
        color: #fff;
    }

    .mobile-quick-bar a.active i,
    .mobile-quick-bar a:hover i,
    .mobile-quick-bar a:focus i {
        color: #fff;
    }

    .mobile-quick-bar a:active {
        transform: scale(0.96);
    }
}

/* =========================================================
   Premium Scrollbars
   ========================================================= */

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(79, 70, 229, 0.65) transparent;
}

/* Chrome / Edge / Safari */
::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        var(--secondary, #4F46E5) 0%,
        var(--primary, #111827) 100%
    );
    border-radius: 999px;
    border: 0;
    box-shadow: none;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        var(--primary, #111827) 0%,
        var(--secondary, #4F46E5) 100%
    );
}

::-webkit-scrollbar-corner {
    background: transparent;
}


/* =========================================================
   Sidebar Scrollbar
   ========================================================= */

.sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.38) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 7px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.45) 0%,
        rgba(255, 255, 255, 0.18) 100%
    );
    border-radius: 999px;
    border: 0;
    box-shadow: none;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.65) 0%,
        rgba(255, 255, 255, 0.30) 100%
    );
}


/* =========================================================
   Tables / Horizontal Scroll
   ========================================================= */

.table-responsive {
    scrollbar-width: thin;
    scrollbar-color: rgba(79, 70, 229, 0.55) transparent;
}

.table-responsive::-webkit-scrollbar {
    height: 7px;
}

.table-responsive::-webkit-scrollbar-track {
    background: transparent;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(
        90deg,
        var(--secondary, #4F46E5) 0%,
        var(--primary, #111827) 100%
    );
    border-radius: 999px;
    border: 0;
    box-shadow: none;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        90deg,
        var(--primary, #111827) 0%,
        var(--secondary, #4F46E5) 100%
    );
}


/* =========================================================
   Mobile Quick Bar Scrollbar
   نخليه مخفي عشان الشكل يبقى أنضف على الموبايل
   ========================================================= */

.mobile-quick-bar {
    scrollbar-width: none;
}

.mobile-quick-bar::-webkit-scrollbar {
    display: none;
}