/* ============================================================
   NAJ SMS — Common Stylesheet
   ============================================================ */

:root {
    /* ── Primary Color ─────────────────────────────────────── */
    --primary:          #0d7e8f;
    --primary-light:    #3ab5c6;
    --primary-mid:      #0b6e7d;
    --primary-dark:     #096070;
    --primary-deep:     #075460;
    --primary-text:     #0a6b79;
    --primary-bg:       #e8f7f9;
    --primary-bg-mid:   #c5eaf0;   /* for active icon tile backgrounds */
    --primary-border:   #b8e5eb;
    --primary-rgb:      13, 126, 143;   /* rgba(var(--primary-rgb), X) */

    /* ── Dark / Surface ────────────────────────────────────── */
    --dark:             #074f5a;
    --dark-mid:         #0a6675;
    --dark-light:       #0d7080;
    --dark-hover:       #1a8fa0;
    --dark-deep:        #053d47;

    /* ── Neutrals ──────────────────────────────────────────── */
    --white:            #ffffff;
    --cream:            #f7feff;
    --gray-50:          #fafafa;
    --gray-75:          #f5fafb;
    --gray-100:         #f0f9fa;
    --gray-200:         #e0f0f3;
    --gray-300:         #c8dde1;
    --gray-400:         #a0bdc3;
    --gray-500:         #6b9299;
    --gray-600:         #444444;
    --gray-700:         #222222;
    --gray-900:         #000000;
    --placeholder:      #8aacb2;

    /* ── Text ──────────────────────────────────────────────── */
    --text-dark:        #000000;
    --text-muted:       #444444;
    --text-white-muted: rgba(255,255,255,0.5);

    /* ── Borders ───────────────────────────────────────────── */
    --border:           var(--gray-300);
    --border-light:     var(--gray-200);

    /* ── Status: Success ────────────────────────────────────── */
    --success-bg:       #f0fdf4;
    --success-border:   #bbf7d0;
    --success-text:     #15803d;

    /* ── Status: Error ──────────────────────────────────────── */
    --error:            #dc2626;
    --error-dark:       #b91c1c;
    --error-bg:         #fef2f2;
    --error-border:     #fecaca;

    /* ── Status: Warning ───────────────────────────────────── */
    --warning-bg:       #fffbeb;
    --warning-border:   #fde68a;
    --warning-text:     #92400e;
    --warning-icon:     #d97706;

    /* ── Status: Info ───────────────────────────────────────── */
    --blue-bg:          #eff6ff;
    --blue-text:        #1d4ed8;
    --blue-border:      #bfdbfe;

    /* ── Shadows ────────────────────────────────────────────── */
    --shadow-sm:        0 1px 4px rgba(0,0,0,0.05);
    --shadow-card:      0 24px 64px rgba(0,0,0,0.40), 0 2px 8px rgba(0,0,0,0.15);
    --shadow-text:      0 2px 12px rgba(0,0,0,0.30);
    --shadow-hover:     0 6px 20px rgba(var(--primary-rgb), 0.35);
    --focus-ring:       0 0 0 3px rgba(var(--primary-rgb), 0.18);

    /* ── Overlay / Backdrop ─────────────────────────────────── */
    --overlay-rgb:      15, 10, 40;
    --backdrop-bg:      rgba(15,10,40,0.40);
    --modal-shadow:     0 24px 80px rgba(var(--overlay-rgb), 0.15), 0 4px 16px rgba(var(--primary-rgb), 0.10);
    --fab-shadow:       0 4px 20px rgba(var(--primary-rgb), 0.45), var(--shadow-sm);
    --fab-shadow-hover: 0 8px 28px rgba(var(--primary-rgb), 0.45), var(--shadow-sm);

    /* ── Design tokens ──────────────────────────────────────── */
    --radius:           8px;
    --radius-lg:        14px;
    --transition:       0.25s ease;
    --transition-fast:  0.15s;

    /* ── Sidebar ────────────────────────────────────────────── */
    --sidebar-width:    240px;
}

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

body {
    font-family: 'Figtree', 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background: #f4f6f9;
    line-height: 1.6;
}

.app-main { min-height: 100vh; }

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

.auth-page {
    min-height: 100vh;
    background: linear-gradient(160deg, var(--dark) 0%, var(--dark-mid) 55%, var(--dark-deep) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.auth-page::before,
.auth-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.auth-page::before {
    width: 600px; height: 600px;
    top: -150px; left: -150px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.20) 0%, transparent 70%);
}
.auth-page::after {
    width: 500px; height: 500px;
    bottom: -120px; right: -100px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
}

.auth-center { width: 100%; max-width: 440px; position: relative; z-index: 1; }
.auth-box    { width: 100%; }

.auth-brand {
    display: block;
    text-align: center;
    margin-bottom: 2rem;
    text-decoration: none;
}

.auth-brand-text {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-shadow: var(--shadow-text);
}
.auth-brand-text span { color: var(--primary-light); }

.auth-brand-tagline {
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-white-muted);
    margin-top: 5px;
}

.auth-brand-bar {
    width: 48px; height: 2px;
    background: linear-gradient(90deg, var(--primary-deep), var(--primary-light));
    margin: 10px auto 0;
    border-radius: 2px;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--primary-border);
    padding: 2.25rem 2rem;
}

.auth-card-title   { font-size: 1.15rem; font-weight: 700; color: var(--text-dark); margin-bottom: 0.25rem; }
.auth-card-subtitle { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1.75rem; }

/* ── Form Elements ──────────────────────────────────────── */

.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    letter-spacing: 0.03em;
}

.form-input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--gray-400);
    border-radius: var(--radius);
    font-size: 0.92rem;
    color: var(--text-dark);
    background: var(--gray-50);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    outline: none;
    appearance: none;
}
.form-input:focus          { border-color: var(--primary); background: var(--white); box-shadow: var(--focus-ring); }
.form-input::placeholder   { color: var(--placeholder); }

.form-error { font-size: 0.78rem; color: var(--error); margin-top: 0.3rem; }

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-dark);
}
.form-check input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }

/* ── Shop Selector Toggle ─────────────────────────────── */
.shop-selector { display: flex; gap: 12px; margin-bottom: 28px; }
.shop-selector input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.shop-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    border: 2px solid var(--primary-border);
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--white);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
    user-select: none;
    letter-spacing: 0.02em;
}
.shop-btn:hover { background: var(--primary-bg); border-color: var(--primary); }
.shop-selector input[type="radio"]:checked + .shop-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-color: var(--primary-deep);
    box-shadow: var(--shadow-hover);
}

/* ── Customer Form ─────────────────────────────────────── */

.cf-page { padding: 28px 20px 60px; }

.cf-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    padding: 26px 32px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.cf-header-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}
.cf-header-title { color: var(--white); font-size: 1.2rem; font-weight: 700; margin: 0; line-height: 1.3; }
.cf-header-sub { color: rgba(255,255,255,0.55); font-size: 0.8rem; margin-top: 3px; }

.cf-body { padding: 26px 32px 32px; }

.cf-shop-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.cf-section { margin-top: 26px; }
.cf-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary-text);
    padding-bottom: 11px;
    border-bottom: 1.5px solid var(--primary-bg);
    margin-bottom: 20px;
}
.cf-section-accent { width: 3px; height: 14px; background: var(--primary); border-radius: 2px; flex-shrink: 0; }

.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.cf-col-full { grid-column: 1 / -1; }

.cf-field { margin-bottom: 18px; }
.cf-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.cf-required { color: var(--error); margin-left: 1px; }

.cf-radio-group { display: flex; gap: 20px; flex-wrap: wrap; padding: 4px 0; }
.cf-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-dark);
    cursor: pointer;
}
.cf-radio-label input[type="radio"] { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }

/* ── Gender Selector ───────────────────────────────────── */
.gender-selector { display: flex; gap: 10px; flex-wrap: wrap; padding: 2px 0; }
.gender-selector input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.gender-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border: 1.5px solid var(--primary-border);
    border-radius: 50px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--white);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform 0.1s ease;
    user-select: none;
    letter-spacing: 0.02em;
}
.gender-btn:hover { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.gender-btn-icon { display: flex; align-items: center; }

/* Male: blue accent */
.gender-selector input[type="radio"]#gender_male:checked + .gender-btn--male,
.gender-selector input[type="radio"]#edit_gender_male:checked + .gender-btn--male {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    border-color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(59,130,246,0.35);
}
/* Female: pink accent */
.gender-selector input[type="radio"]#gender_female:checked + .gender-btn--female,
.gender-selector input[type="radio"]#edit_gender_female:checked + .gender-btn--female {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    color: #fff;
    border-color: #be185d;
    box-shadow: 0 4px 12px rgba(236,72,153,0.35);
}
/* Other: purple accent */
.gender-selector input[type="radio"]#gender_other:checked + .gender-btn--other,
.gender-selector input[type="radio"]#edit_gender_other:checked + .gender-btn--other {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: #fff;
    border-color: #6d28d9;
    box-shadow: 0 4px 12px rgba(139,92,246,0.35);
}

.cf-input-wrap { position: relative; }
.cf-input-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
    display: flex;
    align-items: center;
}
.cf-input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    outline: none;
    font-family: inherit;
    appearance: none;
}
.cf-input:focus { border-color: var(--primary); background: var(--white); box-shadow: var(--focus-ring); }
.cf-input.cf-input-error { border-color: var(--error-border); background: var(--error-bg); }
.cf-input.cf-input-error:focus { border-color: var(--error); box-shadow: 0 0 0 3px rgba(220,38,38,0.12); }
.cf-input::placeholder { color: var(--placeholder); }
.cf-input.cf-no-icon { padding-left: 12px; }
textarea.cf-input { padding-top: 10px; resize: vertical; }

.cf-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 22px;
    margin-top: 10px;
    border-top: 1.5px solid var(--border-light);
}
.cf-btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: box-shadow var(--transition), transform var(--transition-fast);
}
.cf-btn-submit:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.cf-btn-submit:active { transform: translateY(0); }

/* ── Buttons ──────────────────────────────────────────── */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.72rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1.5px solid var(--primary-deep);
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
    margin-top: 1.5rem;
}
.btn-primary:hover  { background: linear-gradient(135deg, var(--dark-light) 0%, var(--dark-hover) 100%); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

/* ── Auth misc ──────────────────────────────────────────── */

.auth-footer { text-align: center; margin-top: 1.25rem; font-size: 0.82rem; color: var(--text-dark); }
.auth-footer a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

.link-muted { font-size: 0.8rem; color: var(--text-muted); text-decoration: none; }
.link-muted:hover { color: var(--primary); text-decoration: underline; }

.alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
    border-radius: var(--radius);
    padding: 0.65rem 0.9rem;
    font-size: 0.83rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 480px) {
    .auth-card      { padding: 1.75rem 1.25rem; }
    .auth-brand-text { font-size: 1.4rem; }
}

/* ============================================================
   Role & Permission — Shared helpers (used by new design)
   ============================================================ */

.rp-alert {
    padding: 10px 16px; border-radius: var(--radius);
    font-size: 13.5px; font-weight: 500;
    display: flex; align-items: center; gap: 8px;
}
.rp-alert-success { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.rp-alert-error   { background: var(--error-bg);   color: var(--error-dark);   border: 1px solid var(--error-border); }

.rp-perm-sections { display: flex; flex-direction: column; gap: 18px; max-height: 420px; overflow-y: auto; padding-right: 6px; }
.rp-perm-group {}
.rp-perm-group-title {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--primary);
    padding-bottom: 7px;
    margin-bottom: 8px;
    border-bottom: 1.5px solid var(--gray-200);
}
.rp-perm-items { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rp-perm-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border-radius: 8px;
    border: 1.5px solid var(--gray-200);
    background: var(--gray-50);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-size: 12.5px;
    color: var(--text-dark);
    line-height: 1.3;
}
.rp-perm-check:hover { border-color: var(--primary-light); background: var(--primary-bg); }
.rp-perm-check:has(input:checked) { border-color: var(--primary); background: var(--primary-bg); }
.rp-perm-check input { accent-color: var(--primary); width: 14px; height: 14px; flex-shrink: 0; cursor: pointer; }
.rp-perm-label { flex: 1; }

/* ============================================================
   Roles Page — Table Card Design
   ============================================================ */

.rl-page {
    padding: 28px 20px 60px;
}

/* Card */
.rl-card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 24px;
}

/* Card header */
.rl-card-header {
    background: #f8f9fb;
    padding: 18px 24px;
    border-bottom: 1px solid #e3e6f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rl-card-title {
    font-size: 18px;
    font-weight: 500;
    color: #4a4d57;
    margin: 0;
}

.rl-btn-add {
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
    font-family: inherit;
}
.rl-btn-add::before { content: none; }
.rl-btn-add:hover   { background-color: var(--primary-dark); }

.rl-btn-pdf {
    background-color: #fff;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    font-family: inherit;
}
.rl-btn-pdf:hover {
    background-color: var(--primary);
    color: #fff;
}

/* Pagination arrows */
/* Customer filter bar */
.cust-filter-bar {
    padding: 14px 24px 6px;
    border-bottom: 1px solid #e3e6f0;
}
.cust-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}
.cust-filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 130px;
    min-width: 110px;
    max-width: 180px;
}
.cust-filter-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cust-filter-input,
.cust-filter-select {
    height: 32px;
    padding: 0 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-dark);
    background: #fff;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.cust-filter-input:focus,
.cust-filter-select:focus { border-color: var(--primary); box-shadow: var(--focus-ring); }
.cust-filter-input::placeholder { color: var(--placeholder); }
.cust-filter-actions {
    display: flex;
    gap: 6px;
    align-self: flex-end;
    flex-shrink: 0;
}
.cust-filter-submit {
    height: 32px;
    padding: 0 16px;
    border: none;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background-color 0.15s;
}
.cust-filter-submit:hover { background: var(--primary-dark); }
.cust-filter-clear {
    height: 32px;
    padding: 0 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: #6b7280;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.15s;
}
.cust-filter-clear:hover { border-color: var(--primary); color: var(--primary); }
.rl-card-total { font-size: 14px; font-weight: 400; color: #9ca3af; margin-left: 6px; }
.rl-page-label { font-size: 12.5px; color: #6b7280; align-self: center; }
.cust-empty { text-align: center; color: #9ca3af; padding: 32px 0; font-size: 14px; }

.rl-pagination-top {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    padding: 14px 24px 10px;
}

.rl-arrow {
    width: 32px;
    height: 28px;
    border: 1px solid var(--primary);
    background: #fff;
    color: var(--primary);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s;
    font-family: inherit;
}
.rl-arrow:hover:not(:disabled) { background: var(--primary); color: #fff; }
.rl-arrow:disabled { opacity: 0.35; cursor: default; }

/* Table wrapper */
.rl-table-wrapper { padding: 0 24px 24px; }

/* Table */
.rl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.rl-table thead { background-color: #f8f9fb; }

.rl-table th {
    padding: 13px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #4a4d57;
    border-top: 1px solid #e3e6f0;
    border-bottom: 1px solid #e3e6f0;
    white-space: nowrap;
}

.rl-sort-icons {
    display: inline-flex;
    flex-direction: column;
    margin-left: 5px;
    font-size: 8px;
    color: #b7b9c0;
    line-height: 1;
    vertical-align: middle;
    gap: 1px;
}

.rl-th-action { text-align: center; width: 90px; }

.rl-table .rl-row { border-bottom: 1px solid #f0f1f5; }
.rl-table .rl-row:nth-child(even) { background-color: #fafbfc; }
.rl-table .rl-row:hover { background-color: #f4f6f9; }

.rl-table td { padding: 13px 16px; vertical-align: middle; }

.rl-td-name {
    color: var(--primary);
    font-weight: 400;
    white-space: nowrap;
    width: 220px;
}

.rl-td-email { color: var(--text-muted); font-size: 13px; }

.rl-td-action { text-align: center; }

/* Permission badges */
.rl-perms-cell { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.rl-no-perms { color: #b7b9c0; font-size: 12px; font-style: italic; }
.rl-badge-more {
    background: var(--gray-200);
    color: var(--gray-500);
    padding: 3px 9px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.5;
}

.rl-badge {
    background-color: var(--primary);
    color: #fff;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.5;
}

.rl-badge-role {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rl-badge-remove {
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
}
.rl-badge-remove:hover { color: #fff; }

.rl-inline-form { display: inline; margin: 0; }

/* User row */
.rl-user-cell { display: flex; align-items: center; gap: 8px; }

.rl-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}

.rl-user-name { font-weight: 600; font-size: 13.5px; color: var(--text-dark); }

/* Assign form */
.rl-assign-form { display: flex; gap: 6px; align-items: center; }

.rl-select {
    padding: 6px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-dark);
    outline: none;
    background: #fff;
    max-width: 140px;
}
.rl-select:focus { border-color: var(--primary); }

.rl-assign-btn {
    padding: 6px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text-dark);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.15s;
}
.rl-assign-btn:hover { border-color: var(--primary); color: var(--primary-text); }


/* Password toggle */
.rl-pw-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.rl-pw-toggle {
    position: relative;
    width: 40px;
    height: 22px;
    border-radius: 11px;
    border: none;
    background: #d1d5db;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    padding: 0;
}
.rl-pw-toggle.active { background: var(--primary, #2563eb); }
.rl-pw-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
    pointer-events: none;
}
.rl-pw-toggle.active .rl-pw-toggle-thumb { transform: translateX(18px); }

/* Delete confirm modal */
.rl-modal-box--sm { max-width: 420px; }
.rl-delete-msg,
.rl-confirm-msg { font-size: 14px; color: var(--text-dark); margin: 0 0 8px; line-height: 1.5; }
.rl-btn-danger {
    padding: 8px 20px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.rl-btn-danger:hover { background: #b91c1c; }

/* Page info */
.rl-page-info {
    text-align: right;
    font-size: 12px;
    color: var(--gray-500);
    padding-top: 10px;
}

/* ── Modal ─────────────────────────────────────────────────── */

.rl-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15,10,40,0.45);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
}
.rl-modal-backdrop.open { visibility: visible; opacity: 1; }

.rl-modal-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 24px 80px rgba(15,10,40,0.15), 0 4px 16px rgba(13,126,143,0.10);
    border: 1.5px solid var(--primary-border);
    width: 100%;
    max-width: 400px;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.2s;
}
.rl-modal-backdrop.open .rl-modal-box { transform: scale(1) translateY(0); }

.rl-modal-box-lg { max-width: 960px; }

.rl-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    background: #f8f9fb;
    border-radius: 10px 10px 0 0;
}

.rl-modal-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.rl-modal-close {
    width: 28px; height: 28px;
    background: none; border: none;
    cursor: pointer; font-size: 20px;
    color: var(--gray-500);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background 0.15s;
    line-height: 1;
}
.rl-modal-close:hover { background: var(--gray-200); }

.rl-modal-body { padding: 20px; }
.rl-modal-body-scroll { padding: 20px 24px; overflow-y: auto; max-height: calc(100vh - 200px); }

.rl-form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rl-form-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 13.5px;
    font-family: inherit;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.rl-form-input:focus { border-color: var(--primary); box-shadow: var(--focus-ring); }

.rl-form-error { color: var(--error); font-size: 12px; margin-top: 4px; }

.rl-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--border-light);
}

.rl-btn-cancel {
    padding: 10px 20px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.rl-btn-cancel:hover { border-color: var(--gray-400); color: var(--text-dark); }

.rl-btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
}
.rl-btn-submit:hover { opacity: 0.9; }

/* ============================================================
   Navigation Bar
   ============================================================ */

.nav-bar {
    background: var(--white);
    border-bottom: 2px solid var(--primary-border);
    font-family: 'Figtree', sans-serif;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
}

.nav-left { display: flex; align-items: center; }

.nav-brand {
    text-decoration: none;
    margin-right: 36px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-brand-icon {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.35);
    color: var(--white);
}

.nav-brand-name {
    color: var(--primary-text);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    font-family: 'Noto Serif Bengali', serif;
}

/* Desktop nav links */
.nav-links {
    display: none;
    align-items: stretch;
    height: 58px;
    gap: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 18px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: all var(--transition-fast);
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    background: transparent;
}
.nav-link:hover      { color: var(--primary-text); background: var(--primary-bg); border-bottom-color: var(--primary); }
.nav-link-active     { color: var(--primary-text); border-bottom: 2px solid var(--primary); background: var(--primary-bg); }

/* Desktop right section */
.nav-right { display: none; align-items: center; gap: 10px; }

.nav-user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 12px 5px 6px;
    background: var(--gray-50);
    border: 1px solid var(--border);
    border-radius: 50px;
}

.nav-user-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
}

.nav-user-details { line-height: 1.2; }
.nav-user-name    { font-size: 12.5px; font-weight: 600; color: var(--text-dark); }
.nav-user-email   { font-size: 10.5px; color: var(--gray-500); }

.nav-logout-form { margin: 0; }

.nav-logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    background: var(--white);
    color: var(--error);
    border: 1.5px solid var(--error-border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}
.nav-logout-btn:hover { background: var(--error-bg); border-color: var(--error); }

/* Hamburger */
.nav-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text-muted);
    cursor: pointer;
}

/* Mobile drawer */
.nav-mobile-drawer { border-top: 1px solid var(--gray-100); background: var(--white); }
.nav-mobile-links  { padding: 8px 16px; }

.nav-mobile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text-muted);
    background: transparent;
    border-left: 3px solid transparent;
}
.nav-mobile-link:hover         { color: var(--primary-text); background: var(--primary-bg); }
.nav-mobile-link-active        { color: var(--primary-text); background: var(--primary-bg); border-left-color: var(--primary); }

.nav-mobile-footer {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-mobile-user { display: flex; align-items: center; gap: 10px; }

.nav-mobile-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    color: var(--white);
}

.nav-mobile-name  { font-size: 13px; font-weight: 600; color: var(--text-dark); }
.nav-mobile-email { font-size: 11px; color: var(--gray-500); }

/* Responsive: show desktop elements on sm+ */
@media (min-width: 640px) {
    .nav-links    { display: flex; }
    .nav-right    { display: flex; }
    .nav-hamburger { display: none; }
    .sm\:flex     { display: flex !important; }
    .sm\:hidden   { display: none !important; }
}
@media (max-width: 639px) {
    .sm\:flex { display: none !important; }
}

/* ============================================================
   Left Sidebar Layout
   ============================================================ */

/* Content area shifts right when sidebar is open */
.app-content {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.28s ease;
}
body.sidebar-collapsed .app-content {
    margin-left: 0;
}

/* The sidebar */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--dark-deep) 0%, var(--dark) 55%, var(--primary-deep) 100%);
    z-index: 500;
    display: flex;
    flex-direction: column;
    transition: transform 0.28s ease;
    border-right: 1px solid rgba(var(--primary-rgb), 0.25);
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
}
body.sidebar-collapsed .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-width)));
}

/* Overlay — shown on mobile when sidebar is open */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 499;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
}
.sidebar-overlay.visible { display: block; }

/* Sidebar header / brand */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 12px 15px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    overflow: hidden;
    min-width: 0;
}
.sidebar-brand-icon {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.4);
    color: var(--white);
}
.sidebar-brand-name {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--white);
    font-family: 'Noto Serif Bengali', serif;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-close-btn {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.sidebar-close-btn:hover { background: rgba(255,255,255,0.15); color: var(--white); }

/* Navigation links */
.sidebar-nav {
    flex: 1;
    padding: 10px 8px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius);
    text-decoration: none;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}
.sidebar-link:hover { background: rgba(255,255,255,0.08); color: var(--white); border-left-color: var(--primary-light); }
.sidebar-link-active { background: rgba(var(--primary-rgb), 0.22); color: var(--white); border-left-color: var(--primary-light); }

.sidebar-link-icon {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.06);
    border-radius: 7px;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}
.sidebar-link:hover .sidebar-link-icon,
.sidebar-link-active .sidebar-link-icon { background: rgba(var(--primary-rgb), 0.35); }

.sidebar-link-icon svg { stroke: rgba(255,255,255,0.65); transition: stroke var(--transition-fast); }
.sidebar-link:hover .sidebar-link-icon svg,
.sidebar-link-active .sidebar-link-icon svg { stroke: var(--white); }

.sidebar-link-label { flex: 1; }

/* Sidebar footer: user info + logout */
.sidebar-footer {
    padding: 10px 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    margin-bottom: 6px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.05);
    min-width: 0;
}
.sidebar-user-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.35);
}
.sidebar-user-info { overflow: hidden; min-width: 0; }
.sidebar-user-name  { font-size: 12px; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-email { font-size: 10.5px; color: rgba(255,255,255,0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-logout-form { margin: 0; }
.sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border-radius: var(--radius);
    border: 1px solid rgba(220,38,38,0.3);
    background: rgba(220,38,38,0.08);
    color: rgba(255,140,140,0.85);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition-fast);
}
.sidebar-logout-btn:hover { background: rgba(220,38,38,0.18); border-color: rgba(220,38,38,0.5); color: #ff9090; }
.sidebar-logout-btn svg { stroke: currentColor; flex-shrink: 0; }

/* Floating open button (shown only when sidebar is collapsed) */
.sidebar-open-btn {
    position: fixed;
    top: 14px; left: 14px;
    z-index: 501;
    width: 36px; height: 36px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    box-shadow: 0 2px 12px rgba(var(--primary-rgb), 0.4);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}
.sidebar-open-btn:hover { box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.55); transform: scale(1.05); }
body:not(.sidebar-collapsed) .sidebar-open-btn { opacity: 0; pointer-events: none; }

/* Mobile: sidebar overlays content, no margin shift */
@media (max-width: 768px) {
    .app-content { margin-left: 0 !important; }
}

/* ============================================================
   Home / Welcome Page
   ============================================================ */

.home-page {
    min-height: 100vh;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 40px 24px;
}

.home-bg-decor { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.home-ring    { position: absolute; top: 50%; left: 50%; border-radius: 50%; border: 1px solid rgba(var(--primary-rgb), 0.09); }
.home-ring-lg { width: 700px; height: 700px; transform: translate(-50%,-50%); }
.home-ring-md { width: 500px; height: 500px; transform: translate(-50%,-50%); }
.home-ring-sm { width: 300px; height: 300px; transform: translate(-50%,-50%); }

.home-glow-tl {
    position: absolute; top: -60px; left: -60px;
    width: 240px; height: 240px; border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.06) 0%, transparent 70%);
}
.home-glow-br {
    position: absolute; bottom: -60px; right: -60px;
    width: 280px; height: 280px; border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.06) 0%, transparent 70%);
}

.home-deco-left  { position: absolute; left: 6%;  top: 50%; transform: translateY(-50%); opacity: 0.2; color: var(--primary); }
.home-deco-right { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); opacity: 0.2; color: var(--primary); }

.home-sparkle-1 { position: absolute; top: 14%;    left: 20%;  opacity: 0.25; color: var(--primary); }
.home-sparkle-2 { position: absolute; top: 18%;    right: 22%; opacity: 0.18; color: var(--primary); }
.home-sparkle-3 { position: absolute; bottom: 16%; left: 26%;  opacity: 0.15; color: var(--primary); }
.home-sparkle-4 { position: absolute; bottom: 20%; right: 24%; opacity: 0.2;  color: var(--primary); }

.home-card {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 560px;
    width: 100%;
    background: var(--white);
    border: 1.5px solid var(--primary-border);
    border-radius: 24px;
    padding: 56px 48px;
    box-shadow: 0 4px 32px rgba(var(--primary-rgb), 0.08), var(--shadow-sm);
}

.home-ornament      { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 28px; color: var(--primary); }
.home-ornament-line-r { height: 1px; width: 70px; background: linear-gradient(to right, transparent, var(--primary-light)); }
.home-ornament-line-l { height: 1px; width: 70px; background: linear-gradient(to left,  transparent, var(--primary-light)); }

.home-emblem { margin: 0 auto 24px; width: 80px; color: var(--primary); }

.home-title {
    font-family: 'Noto Serif Bengali', 'Hind Siliguri', serif;
    font-size: clamp(1.9rem, 5vw, 1rem);
    font-weight: 700;
    color: var(--dark);
    letter-spacing: 0.03em;
    line-height: 1.2;
    margin: 0 0 10px 0;
}

.home-divider {
    margin: 16px auto;
    width: 160px; height: 1.5px;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
}

.home-subtitle {
    font-family: Georgia, 'Palatino Linotype', serif;
    font-size: clamp(0.78rem, 1.8vw, 0.95rem);
    color: var(--primary);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin: 0;
}

.home-bottom-ornament { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; }
.home-bottom-line-r   { height: 1px; width: 50px; background: linear-gradient(to right, transparent, var(--primary-light)); }
.home-bottom-line-l   { height: 1px; width: 50px; background: linear-gradient(to left,  transparent, var(--primary-light)); }
.home-dot             { width: 5px; height: 5px; border-radius: 50%; background: var(--primary-light); opacity: 0.6; }

/* ============================================================
   Users Page
   ============================================================ */

.usr-page { padding: 32px 20px; }
.usr-no-role { color: var(--text-muted); font-size: 12px; font-style: italic; }
.usr-optional { color: var(--text-muted); font-size: 11px; font-weight: 400; }
.rl-select-full { width: 100%; }
.home-diamond-dot     { width: 7px; height: 7px; border: 1.5px solid var(--primary); transform: rotate(45deg); opacity: 0.7; }

/* ============================================================
   Toast Notifications
   ============================================================ */

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 360px;
    width: calc(100vw - 40px);
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 14px;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.07);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.45;
    pointer-events: all;
    animation: toast-in 0.25s ease forwards;
    position: relative;
    border-left: 3px solid transparent;
}

.toast.toast-hiding {
    animation: toast-out 0.22s ease forwards;
}

.toast-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-left-color: var(--success-text);
    border-top: 1px solid var(--success-border);
    border-right: 1px solid var(--success-border);
    border-bottom: 1px solid var(--success-border);
}

.toast-error {
    background: var(--error-bg);
    color: var(--error-dark);
    border-left-color: var(--error-dark);
    border-top: 1px solid var(--error-border);
    border-right: 1px solid var(--error-border);
    border-bottom: 1px solid var(--error-border);
}

.toast-warning {
    background: var(--warning-bg);
    color: var(--warning-text);
    border-left-color: var(--warning-icon);
    border-top: 1px solid var(--warning-border);
    border-right: 1px solid var(--warning-border);
    border-bottom: 1px solid var(--warning-border);
}

.toast-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-success .toast-icon { color: var(--success-text); }
.toast-error   .toast-icon { color: var(--error-dark); }
.toast-warning .toast-icon { color: var(--warning-icon); }

.toast-message { flex: 1; }

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.45;
    font-size: 16px;
    margin-top: -1px;
    transition: opacity var(--transition-fast);
}
.toast-close:hover { opacity: 0.85; }
.toast-success .toast-close { color: var(--success-text); }
.toast-error   .toast-close { color: var(--error-dark); }
.toast-warning .toast-close { color: var(--warning-text); }

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    border-radius: 0 0 0 var(--radius);
    animation: toast-progress linear forwards;
}
.toast-success .toast-progress { background: var(--success-text); opacity: 0.35; }
.toast-error   .toast-progress { background: var(--error-dark);   opacity: 0.35; }
.toast-warning .toast-progress { background: var(--warning-icon); opacity: 0.35; }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(18px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateX(0); max-height: 120px; margin-bottom: 0; }
    to   { opacity: 0; transform: translateX(18px); max-height: 0;   margin-bottom: -10px; }
}

@keyframes toast-progress {
    from { width: 100%; }
    to   { width: 0%; }
}

@media (max-width: 480px) {
    #toast-container { top: 12px; right: 12px; width: calc(100vw - 24px); }
}

/* ── Customer Row Action Buttons ─────────────────────────────────── */
.rl-act-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    vertical-align: middle;
}
.rl-act-btn + .rl-act-btn { margin-left: 4px; }

.rl-act-btn--edit {
    color: var(--primary);
    border-color: var(--primary-border);
    background: var(--primary-bg);
}
.rl-act-btn--edit:hover {
    background: var(--primary-bg-mid);
    border-color: var(--primary-light);
    color: var(--primary-dark);
}

.rl-act-btn--delete {
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
}
.rl-act-btn--delete:hover {
    background: #fee2e2;
    border-color: #f87171;
}
