/* =========================================================
   FILE: /public_html/kashier/style.css
   Kashier Cloud - Clean Unified Stylesheet
   ========================================================= */

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

:root {
    --primary: #0f4c81;
    --primary-hover: #0c3d67;
    --secondary: #1d74b7;
    --bg: #f3f6fa;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #d5dce5;
    --border-dark: #9aa6b2;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --info: #2563eb;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    --radius: 12px;

    --pos-primary: #2563eb;
    --pos-primary-hover: #1d4ed8;
    --pos-success: #16a34a;
    --pos-success-hover: #15803d;
    --pos-bg: #f4f7fb;
    --pos-card: #ffffff;
    --pos-text: #111827;
    --pos-text-muted: #6b7280;
    --pos-border: #d1d5db;
    --pos-soft-border: #e5e7eb;
    --pos-transition: all 0.2s ease;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Cairo", Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    direction: rtl;
}

/* =========================
   LINKS
========================= */
a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
}

/* =========================
   LAYOUT
========================= */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 15px;
}

.page-title {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
}

.section-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 800;
}

/* =========================
   TOPBAR / NAVBAR
========================= */
.topbar {
    max-width: 1400px;
    margin: 18px auto 12px;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.pos-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}

.pos-logo {
    display: block;
    width: auto;
    max-width: 180px;
    max-height: 56px;
    height: auto;
    object-fit: contain;
}

.topbar-user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px 14px;
    min-height: 74px;
    flex: 1;
    min-width: 280px;
}

.topbar-user-avatar {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.20);
}

.topbar-user-details {
    flex: 1;
    min-width: 0;
}

.topbar-user-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.topbar-user-top span:first-child {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
}

.topbar-user-top span:last-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #e0ecff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

.topbar-user-details > div {
    color: #475569;
    font-size: 13px;
    line-height: 1.8;
    word-break: break-word;
}

.topbar-user-details > div span {
    display: inline-flex;
    align-items: center;
    margin-left: 12px;
}

.menu {
    max-width: 1400px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 0 0;
    border-top: 1px solid #eef2f7;
}

.menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #1f2937;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.menu a:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.menu a.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* =========================
   CARDS / STATS
========================= */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}

.card-title {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.card-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.card small {
    color: var(--muted);
    display: block;
    margin-top: 6px;
}

/* =========================
   PANELS / BOXES
========================= */
.panel,
.box,
.content-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.panel-header,
.box-title,
.content-box-header {
    background: #eef3f8;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 15px;
}

.panel-body,
.box-body,
.content-box-body {
    padding: 15px;
}

/* =========================
   TABLES
========================= */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid #e5e7eb;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

table th {
    background: #eef3f8;
    color: #111827;
    padding: 12px 10px;
    border: 1px solid var(--border-dark);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

table td {
    padding: 10px 8px;
    border: 1px solid var(--border-dark);
    font-size: 13px;
    text-align: center;
    vertical-align: middle;
}

table tbody tr:nth-child(even) {
    background: #fafbfd;
}

table tbody tr:hover {
    background: #f3f8fd;
}

.text-right {
    text-align: right !important;
}

.text-left {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

/* =========================
   FORMS
========================= */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.form-group {
    margin-bottom: 14px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c8d1db;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(29, 116, 183, 0.12);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* =========================
   BUTTONS
========================= */
.btn,
button,
input[type="submit"],
input[type="button"] {
    display: inline-block;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-success {
    background: var(--success);
}

.btn-success:hover {
    background: #15803d;
}

.btn-danger {
    background: var(--danger);
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-warning {
    background: var(--warning);
}

.btn-warning:hover {
    background: #b45309;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 12px;
}

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

/* =========================
   ALERTS / MESSAGES
========================= */
.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid transparent;
}

.alert-success {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-danger,
.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-warning {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fed7aa;
}

.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

/* =========================
   BADGES / STATUS
========================= */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

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

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

/* =========================
   POS PAGE
   /kashier/pos.php
========================= */
.pos-page {
    background: var(--pos-bg);
}

.pos-page .container {
    max-width: 1600px;
    padding: 0 18px 18px;
}

.pos-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.9fr;
    gap: 18px;
    align-items: start;
}

.form-box {
    background: var(--pos-card);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    padding: 18px;
    border: 1px solid var(--pos-soft-border);
    margin-bottom: 18px;
}

.form-box h2 {
    margin: 0 0 16px;
    font-size: 22px;
    color: var(--pos-text);
    font-weight: 800;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.section-head p {
    margin: 0;
    color: var(--pos-text-muted);
    font-size: 13px;
}

.search-box {
    margin-bottom: 14px;
}

.search-box input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--pos-border);
    border-radius: 12px;
    font-size: 14px;
    background: #fff;
    outline: none;
}

.search-box input:focus {
    border-color: var(--pos-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.10);
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.product-item {
    background: #fff;
    border: 1px solid var(--pos-soft-border);
    border-radius: 16px;
    padding: 14px;
    cursor: pointer;
    transition: var(--pos-transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.product-item:hover {
    transform: translateY(-3px);
    border-color: #bfdbfe;
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.10);
}

.product-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.7;
    margin-bottom: 10px;
    min-height: 50px;
    color: var(--pos-text);
}

.muted {
    color: var(--pos-text-muted);
    font-size: 12px;
    margin-bottom: 5px;
    line-height: 1.6;
}

.price {
    margin-top: 10px;
    font-size: 18px;
    font-weight: 800;
    color: #059669;
}

.stock {
    margin-top: 6px;
    font-size: 12px;
    color: #374151;
    background: #f9fafb;
    padding: 6px 10px;
    border-radius: 10px;
    display: inline-block;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.row-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
}

.cart-table th,
.cart-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid #eef2f7;
    font-size: 14px;
}

.cart-table th {
    background: #f8fafc;
    color: #374151;
    font-weight: 700;
}

.cart-table tbody tr:hover {
    background: #fcfdff;
}

.total-box {
    margin-top: 16px;
    background: linear-gradient(180deg, #f8fbff, #f3f7fc);
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 14px 16px;
}

.total-box p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    font-size: 15px;
}

.total-box p:last-child {
    margin-bottom: 0;
    font-size: 18px;
    color: #111827;
    font-weight: 800;
}

.pos-page .btn-success {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--pos-success), var(--pos-success-hover));
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--pos-transition);
    box-shadow: 0 10px 20px rgba(22, 163, 74, 0.18);
}

.pos-page .btn-success:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #15803d, #166534);
}

.empty-card {
    background: #fff;
    border: 1px dashed #d1d5db;
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    color: var(--pos-text-muted);
    font-weight: 700;
}

.customer-box {
    position: relative;
}

.customer-results {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    margin-top: 6px;
    background: #fff;
    border: 1px solid var(--pos-border);
    border-radius: 14px;
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.10);
    max-height: 280px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
}

.customer-item {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

.customer-item:last-child {
    border-bottom: none;
}

.customer-item:hover,
.customer-item.active {
    background: #eff6ff;
}

.customer-item .name {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
    color: #111827;
}

.customer-item .phone {
    display: block;
    font-size: 12px;
    color: #6b7280;
}

.note {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.6;
}

.payment-methods-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.payment-method-btn {
    min-width: 90px;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: var(--pos-text);
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    transition: var(--pos-transition);
}

.payment-method-btn:hover {
    border-color: var(--pos-primary);
    transform: translateY(-1px);
}

.payment-method-btn.active {
    background: var(--pos-primary);
    color: #fff;
    border-color: var(--pos-primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* =========================
   SCROLLBAR
========================= */
.table-wrap::-webkit-scrollbar,
.customer-results::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.table-wrap::-webkit-scrollbar-thumb,
.customer-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-track,
.customer-results::-webkit-scrollbar-track {
    background: #f8fafc;
}

/* =========================
   EDITABLE CELLS / POLICY
========================= */
.editable-cell {
    cursor: text;
    min-width: 120px;
    transition: background 0.15s ease;
}

.editable-cell:hover {
    background: #f8fafc;
}

.editable-cell.editing {
    background: #fff8db;
    padding: 4px !important;
}

.editable-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #0d6efd;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: #fff;
}

.save-note {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 9999;
    padding: 10px 14px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translateY(10px);
    transition: 0.2s ease;
}

.save-note.show {
    opacity: 1;
    transform: translateY(0);
}

.save-note.ok {
    background: #198754;
}

.save-note.err {
    background: #dc3545;
}

.hint-box {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 14px 18px;
    margin-bottom: 16px;
    color: #555;
    font-size: 13px;
}

.policy-text {
    white-space: normal;
    line-height: 1.9;
}

/* =========================
   COMPANY REPORT
========================= */
.company-report-page {
    max-width: 1050px;
    margin: 35px auto;
    padding: 0 15px;
}

.company-report-card {
    background: #fff;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
    border: 1px solid #eef2f7;
}

.company-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid #edf0f5;
}

.company-report-header h1 {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 800;
    color: #111827;
}

.company-report-header p {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
}

.company-report-badge {
    background: #eef6ff;
    color: #2563eb;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 800;
    white-space: nowrap;
}

.company-report-section {
    margin-top: 24px;
}

.company-report-section h3 {
    margin: 0 0 14px;
    font-size: 19px;
    font-weight: 800;
    color: #111827;
}

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

.company-report-item {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 14px;
    padding: 14px 16px;
}

.company-report-item span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 6px;
}

.company-report-item strong {
    display: block;
    color: #111827;
    font-size: 16px;
    font-weight: 800;
    word-break: break-word;
}

.vat-yes {
    color: #16a34a !important;
}

.vat-no {
    color: #dc2626 !important;
}

.empty-value {
    color: #9ca3af;
    font-weight: 600;
}

.company-report-footer {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid #edf0f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #6b7280;
    font-size: 14px;
}

.company-report-footer button {
    border: 0;
    background: #2563eb;
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 800;
}

.support-btn {
    background: #2563eb;
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    display: inline-block;
}

.support-btn:hover {
    background: #1d4ed8;
    color: #fff;
}

/* =========================
   SETTINGS PAGE
========================= */
.settings-body {
    font-family: "Cairo", sans-serif;
    background: #f6f7fb;
    color: #111827;
}

.settings-body .settings-page {
    max-width: 1180px;
    margin: 24px auto;
    padding: 0 16px 40px;
}

.settings-body .settings-hero {
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #fff;
    border-radius: 22px;
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.settings-body .settings-hero h1 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 900;
}

.settings-body .settings-hero p {
    margin: 0;
    color: #d1d5db;
    line-height: 1.9;
}

.settings-body .settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.settings-body .settings-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.settings-body .settings-card h2 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 900;
    color: #111827;
    border-right: 4px solid #2563eb;
    padding-right: 10px;
}

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

.settings-body .field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.settings-body .field.full {
    grid-column: 1 / -1;
}

.settings-body .field label {
    font-size: 13px;
    color: #374151;
    font-weight: 900;
}

.settings-body .field input,
.settings-body .field select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 12px 13px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    outline: none;
    transition: 0.18s ease;
}

.settings-body .field input:focus,
.settings-body .field select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.settings-body .hint {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.7;
}

.settings-body .email-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.settings-body .email-row input {
    flex: 1;
}

.settings-body .pending-email-hint {
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 9px 12px;
    border-radius: 12px;
}

.settings-body .template-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.settings-body .template-option input {
    display: none;
}

.settings-body .template-box {
    display: block;
    border: 2px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
    cursor: pointer;
    transition: 0.18s ease;
    background: #fff;
}

.settings-body .template-box strong {
    display: block;
    font-size: 16px;
    color: #111827;
}

.settings-body .template-option input:checked + .template-box {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}

.settings-body .template-hint {
    margin-top: 10px;
}

.settings-body .actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    padding: 14px 0 0;
    background: linear-gradient(to top, #f6f7fb 70%, rgba(246, 247, 251, 0));
}

.settings-body .btn-save {
    border: 0;
    background: #16a34a;
    color: #fff;
    padding: 13px 22px;
    border-radius: 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(22, 163, 74, 0.18);
}

.settings-body .btn-back {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #111827;
    padding: 13px 18px;
    border-radius: 14px;
    font-weight: 900;
}

/* =========================
   LOGIN PAGE
========================= */
.login-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0f172a, #1e3a8a, #0ea5e9);
    font-family: Tahoma, Arial, sans-serif;
}

.login-page * {
    box-sizing: border-box;
}

.login-box {
    width: 380px;
    max-width: calc(100% - 28px);
    padding: 30px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(15px);
    border-radius: 18px;
    color: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
}

.login-box h3 {
    text-align: center;
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 800;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    outline: none;
    font-family: inherit;
}

.login-box input::placeholder {
    color: #e5e7eb;
}

.login-box input:focus {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}

.login-submit-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #3b82f6;
    color: #fff;
    cursor: pointer;
    margin-top: 10px;
    font-family: inherit;
    font-weight: 800;
}

.login-submit-btn:hover {
    background: #2563eb;
}

.login-alert {
    padding: 11px 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    text-align: center;
    font-size: 14px;
    line-height: 1.8;
    font-weight: 700;
}

.login-error {
    background: rgba(239, 68, 68, 0.22);
    border: 1px solid rgba(252, 165, 165, 0.45);
    color: #fff;
}

.login-success {
    background: rgba(34, 197, 94, 0.22);
    border: 1px solid rgba(134, 239, 172, 0.45);
    color: #fff;
}

.login-warning {
    background: rgba(245, 158, 11, 0.24);
    border: 1px solid rgba(253, 230, 138, 0.55);
    color: #fff;
}

.resend-activation-form {
    margin-top: 8px;
}

.resend-activation-btn {
    border: none;
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-weight: 900;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-size: 14px;
}

.resend-activation-btn:hover {
    color: #fef3c7;
}

.forgot {
    display: block;
    text-align: center;
    margin-top: 12px;
    color: #e5e7eb;
    font-size: 14px;
    text-decoration: none;
}

.forgot:hover {
    color: #fff;
    text-decoration: underline;
}

/* =========================
   REGISTER PAGE
========================= */
.register-page {
    margin: 0;
    font-family: Arial, Tahoma, sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.register-page * {
    box-sizing: border-box;
}

.register-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    padding: 30px;
    width: 390px;
    max-width: calc(100% - 28px);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    color: #fff;
    text-align: center;
}

.register-card h2 {
    margin: 0 0 20px;
    font-size: 24px;
    font-weight: 800;
}

.register-card input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: none;
    border-radius: 10px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
}

.register-card input:focus {
    box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.25);
}

.register-card button {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: none;
    border-radius: 10px;
    background: #00c6ff;
    color: white;
    font-size: 16px;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
}

.register-card button:hover {
    background: #0072ff;
}

.register-card button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.register-loading {
    display: none;
    margin-top: 10px;
    font-weight: 700;
    color: #e0f2fe;
}

.register-msg {
    margin-bottom: 14px;
    padding: 11px 12px;
    border-radius: 12px;
    font-weight: 800;
    line-height: 1.7;
}

.register-error {
    background: rgba(239, 68, 68, 0.22);
    border: 1px solid rgba(252, 165, 165, 0.45);
    color: #fff;
}

.register-success-box h3 {
    margin: 10px 0;
    line-height: 1.8;
    font-size: 17px;
}

.register-success-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.register-success-note {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.22);
    border: 1px solid rgba(253, 230, 138, 0.42);
    color: #fff;
    font-weight: 800;
    line-height: 1.7;
}

.register-back-btn {
    margin-top: 15px;
    display: inline-block;
    padding: 11px 16px;
    background: #28a745;
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
}

.register-back-btn:hover {
    background: #218838;
    color: #fff;
}

.register-login-link {
    display: block;
    margin-top: 14px;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.register-login-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* =========================
   FORGOT PASSWORD
========================= */
body.forgot-password-body {
    min-height: 100vh !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: linear-gradient(135deg, #0f172a, #1e3a8a, #0ea5e9) !important;
    font-family: Tahoma, Arial, sans-serif !important;
    direction: rtl !important;
    color: #fff !important;
}

body.forgot-password-body * {
    box-sizing: border-box;
}

body.forgot-password-body .reset-page {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.forgot-password-body .reset-card {
    width: 380px;
    max-width: calc(100% - 28px);
    padding: 30px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 18px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
}

body.forgot-password-body .brand {
    display: none;
}

body.forgot-password-body .header {
    text-align: center;
    margin-bottom: 20px;
}

body.forgot-password-body .header h1 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.5;
}

body.forgot-password-body .header p {
    margin: 0;
    color: #e5e7eb;
    font-size: 14px;
    line-height: 1.8;
}

body.forgot-password-body .alert {
    padding: 11px 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    text-align: center;
    font-size: 14px;
    line-height: 1.8;
    font-weight: 700;
}

body.forgot-password-body .alert-success {
    background: rgba(34, 197, 94, 0.22);
    border: 1px solid rgba(134, 239, 172, 0.45);
    color: #fff;
}

body.forgot-password-body .alert-error,
body.forgot-password-body .alert-danger {
    background: rgba(239, 68, 68, 0.22);
    border: 1px solid rgba(252, 165, 165, 0.45);
    color: #fff;
}

body.forgot-password-body label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

body.forgot-password-body input {
    width: 100%;
    padding: 12px;
    height: auto;
    margin: 10px 0;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    outline: none;
    font-family: inherit;
    font-size: 14px;
}

body.forgot-password-body input::placeholder {
    color: #e5e7eb;
}

body.forgot-password-body input:focus {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}

body.forgot-password-body button {
    width: 100%;
    padding: 12px;
    min-height: auto;
    border: none;
    border-radius: 10px;
    background: #3b82f6;
    color: #fff;
    cursor: pointer;
    margin-top: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    box-shadow: none;
}

body.forgot-password-body button:hover {
    background: #2563eb;
    transform: none;
    box-shadow: none;
}

body.forgot-password-body .back-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    color: #e5e7eb;
    font-size: 14px;
    text-decoration: none;
    font-weight: 700;
}

body.forgot-password-body .back-link:hover {
    color: #fff;
    text-decoration: underline;
}

body.forgot-password-body .hidden-field {
    display: none !important;
}

/* =========================
   ACCESS DENIED PAGE
========================= */
.idx-deny-page-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Cairo", Tahoma, Arial, sans-serif;
    background: #f6f8fb;
    color: #1f2937;
}

.idx-deny-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.idx-deny-card {
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.idx-deny-title {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 800;
    color: #b91c1c;
}

.idx-deny-text {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.9;
    color: #4b5563;
}

.idx-deny-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    background: #111827;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: 0.2s ease;
}

.idx-deny-btn:hover {
    opacity: 0.92;
    color: #fff;
}

/* =========================
   PRINT / INVOICE
========================= */
@page {
    size: A4;
    margin: 6mm;
}

.print-page {
    width: 100%;
    max-width: 210mm;
    margin: 0 auto;
}

.invoice-card {
    background: #fff;
    border: 1px solid #bfc7d1;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.invoice-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    padding: 12px 14px;
}

.header-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
}

.title-block h1 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
}

.title-block p {
    margin: 0;
    font-size: 12px;
    opacity: 0.95;
}

.meta-box {
    min-width: 220px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    padding: 8px 10px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    margin-bottom: 5px;
}

.meta-row:last-child {
    margin-bottom: 0;
}

.invoice-body {
    padding: 12px;
}

.parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.info-line {
    font-size: 12px;
    padding: 4px 0;
    border-bottom: 1px dashed #c7d0da;
}

.info-line:last-child {
    border-bottom: none;
}

.summary-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.totals-container {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.totals-table {
    width: 320px;
    border: 1px solid var(--border-dark);
    border-collapse: collapse;
    background: #fff;
}

.totals-table td {
    border: 1px solid var(--border-dark);
    padding: 8px 10px;
    text-align: right;
    font-size: 13px;
}

.final-total {
    font-weight: 800;
    background: #eef6ff;
}

.btn-print {
    margin-top: 14px;
}

.btn-print button {
    padding: 9px 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
}

/* =========================
   SUBSCRIPTION INFO
========================= */
html body.subinfo-page {
    margin: 0 !important;
    min-height: 100vh !important;
    direction: rtl !important;
    background: #f3f6fb !important;
    color: #172033 !important;
    font-family: Tahoma, Arial, sans-serif !important;
}

.subinfo-wrapper {
    width: min(1120px, calc(100% - 32px)) !important;
    margin: 34px auto !important;
}

.subinfo-hero {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    padding: 28px !important;
    margin: 0 0 18px 0 !important;
    border-radius: 24px !important;
    background: linear-gradient(135deg, #ffffff 0%, #eef5ff 100%) !important;
    border: 1px solid #dde8f7 !important;
    box-shadow: 0 18px 45px rgba(15, 42, 80, 0.10) !important;
}

.subinfo-kicker {
    display: inline-block !important;
    margin: 0 0 8px 0 !important;
    padding: 6px 12px !important;
    border-radius: 999px !important;
    background: #e8f1ff !important;
    color: #1d5fa8 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    font-weight: 700 !important;
}

.subinfo-hero h1 {
    margin: 0 0 8px 0 !important;
    color: #132238 !important;
    font-size: 32px !important;
    line-height: 1.35 !important;
    font-weight: 800 !important;
}

.subinfo-hero p {
    margin: 0 !important;
    color: #667085 !important;
    font-size: 15px !important;
    line-height: 1.9 !important;
}

.subinfo-status-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 105px !important;
    padding: 12px 20px !important;
    border-radius: 999px !important;
    text-align: center !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
}

.subinfo-status-badge.is-active {
    color: #087443 !important;
    background: #dcfae6 !important;
    border: 1px solid #abefc6 !important;
}

.subinfo-status-badge.is-expired {
    color: #b42318 !important;
    background: #fee4e2 !important;
    border: 1px solid #fecdca !important;
}

.subinfo-card {
    display: block !important;
    padding: 26px !important;
    border-radius: 24px !important;
    background: #ffffff !important;
    border: 1px solid #e4eaf3 !important;
    box-shadow: 0 18px 45px rgba(15, 42, 80, 0.10) !important;
}

/* =========================
   UTILITIES
========================= */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 12px !important; }
.mt-3 { margin-top: 18px !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 12px !important; }
.mb-3 { margin-bottom: 18px !important; }

.w-100 { width: 100% !important; }
.d-flex { display: flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.justify-between { justify-content: space-between !important; }
.align-center { align-items: center !important; }
.gap-1 { gap: 8px !important; }
.gap-2 { gap: 12px !important; }

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1100px) {
    .pos-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .header-grid,
    .parties,
    .company-report-grid {
        grid-template-columns: 1fr;
    }

    .summary-section {
        flex-direction: column;
    }

    .totals-container {
        width: 100%;
        justify-content: flex-start;
    }

    .totals-table {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .topbar {
        padding: 14px;
    }

    .topbar-user-card {
        width: 100%;
    }

    .menu a {
        flex: 1 1 calc(50% - 8px);
    }

    .container {
        padding: 0 10px;
    }

    .card-value {
        font-size: 22px;
    }

    table th,
    table td {
        font-size: 12px;
        padding: 8px 6px;
    }

    .title-block h1,
    .form-box h2 {
        font-size: 18px;
    }

    .settings-body .form-grid,
    .settings-body .template-options {
        grid-template-columns: 1fr;
    }

    .settings-body .email-row {
        flex-direction: column;
        align-items: stretch;
    }

    .subinfo-hero {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}

@media (max-width: 700px) {
    .row {
        grid-template-columns: 1fr;
    }

    .pos-page .container {
        padding: 0 12px 12px;
    }

    .form-box {
        padding: 14px;
        border-radius: 16px;
    }

    .product-list {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }

    .product-title {
        min-height: auto;
        font-size: 14px;
    }

    .cart-table {
        min-width: 560px;
    }

    .pos-page .btn-success {
        padding: 13px 16px;
        font-size: 15px;
    }

    .company-report-header,
    .company-report-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

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

    .topbar-user-avatar {
        width: 50px;
        height: 50px;
        min-width: 50px;
        font-size: 18px;
    }

    .menu a {
        flex: 1 1 100%;
    }

    .search-box input,
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        font-size: 13px;
    }

    .payment-method-btn {
        flex: 1 1 calc(50% - 10px);
        min-width: unset;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .login-box,
    .register-card,
    body.forgot-password-body .reset-card {
        padding: 24px 18px;
        border-radius: 16px;
    }
}

/* =========================
   PRINT
========================= */
@media print {
    body {
        background: #fff;
        padding: 0;
    }

    .topbar,
    .menu,
    .btn-print,
    .no-print,
    .company-report-footer button {
        display: none !important;
    }

    .container,
    .print-page {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .card,
    .panel,
    .box,
    .invoice-card,
    .company-report-card {
        box-shadow: none;
        border-radius: 0;
    }

    .invoice-card,
    .company-report-card {
        border: none;
    }

    a {
        color: #000;
        text-decoration: none;
    }

    .navbar,
    nav,
    header {
        display: none !important;
    }
}


/* =========================
   employees_information.php
   بداية ستايل صفحة بيانات الموظف
========================= */

.employee-info-page {
    min-height: 100vh;
    padding: 24px;
}

.employee-info-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

.employee-info-header {
    margin: 0 0 22px;
}

.employee-info-title {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 800;
    color: #111827;
}

.employee-info-subtitle {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.8;
}

.employee-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
}

.employee-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.employee-profile-header {
    background: linear-gradient(135deg, #2563eb, #0f172a);
    color: #ffffff;
    padding: 28px 24px;
}

.employee-badge {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.employee-name {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 800;
}

.employee-job {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
}

.employee-card-body {
    padding: 24px;
}

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

.employee-detail-box {
    background: #f9fafb;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 16px;
}

.employee-detail-box .detail-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.employee-detail-box .detail-value {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    word-break: break-word;
    line-height: 1.7;
}

.employee-side-card {
    padding: 24px;
}

.employee-side-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
    color: #111827;
}

.employee-side-card p {
    margin: 0 0 18px;
    color: #4b5563;
    line-height: 1.9;
}

.employee-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    background: #ecfdf3;
    color: #027a48;
    border: 1px solid #abefc6;
}

.employee-note-box {
    margin-top: 18px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 16px;
    color: #334155;
    line-height: 1.9;
    font-size: 14px;
}

.employee-action-box {
    margin-top: 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.employee-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    transition: 0.2s ease;
    border: none;
    cursor: pointer;
}

.employee-btn-primary {
    background: #2563eb;
    color: #ffffff;
}

.employee-btn-primary:hover {
    background: #1d4ed8;
}

.employee-btn-light {
    background: #eef2ff;
    color: #1e3a8a;
}

.employee-btn-light:hover {
    background: #e0e7ff;
}

.empty-value {
    color: #9ca3af;
    font-weight: 700;
}

@media (max-width: 900px) {
    .employee-grid {
        grid-template-columns: 1fr;
    }

    .employee-details-grid {
        grid-template-columns: 1fr;
    }

    .employee-info-page {
        padding: 16px;
    }

    .employee-name {
        font-size: 24px;
    }

    .employee-action-box .employee-btn {
        width: 100%;
    }
}

/* =========================
   employees_information.php
   نهاية ستايل صفحة بيانات الموظف
========================= */
/* =========================
   بداية ستايل navbar.php
========================= */

img {
    max-width: 100%;
    height: auto;
}

.kc-navbar-wrap {
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
    margin: 0 0 24px;
    padding: 14px 14px 0;
    background: #f6f8fc;
    direction: rtl;
    font-family: "Cairo", Tahoma, Arial, sans-serif;
}

.kc-navbar {
    background: #ffffff;
    border: 1px solid #e7edf5;
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    overflow: hidden;
    padding: 16px 18px;
}

.kc-navbar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.kc-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 0;
}

.kc-brand-logo {
    display: block;
    width: auto;
    height: 42px;
    max-width: 170px;
    object-fit: contain;
    flex-shrink: 0;
}

.kc-brand-fallback {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
}

.kc-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.kc-brand-text strong {
    color: #0f172a;
    font-size: 17px;
    font-weight: 800;
}

.kc-brand-text span {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.kc-user-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fbff;
    border: 1px solid #e6eef9;
    border-radius: 16px;
    padding: 10px 14px;
    min-width: 250px;
    max-width: 100%;
}

.kc-user-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.kc-user-meta {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas:
        "name name"
        "role code";
    gap: 4px 8px;
    align-items: center;
    min-width: 0;
}

.kc-user-name {
    grid-area: name;
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kc-user-role {
    grid-area: role;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    white-space: nowrap;
}

.kc-user-code {
    grid-area: code;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    margin: 0;
    white-space: nowrap;
}

.kc-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eef2f7;
}

.kc-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.kc-link:hover {
    background: #edf4ff;
    border-color: #bfd7ff;
    color: #2563eb;
}

.kc-link.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.kc-link.kc-logout {
    background: #fff5f5;
    border-color: #fecaca;
    color: #dc2626;
}

.kc-link.kc-logout:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

@media (max-width: 768px) {
    .kc-navbar-wrap {
        padding: 10px 10px 0;
    }

    .kc-navbar {
        padding: 14px;
    }

    .kc-navbar-top {
        flex-direction: column;
        align-items: stretch;
    }

    .kc-brand,
    .kc-user-box {
        justify-content: center;
    }

    .kc-links {
        justify-content: center;
    }

    .kc-link {
        width: 100%;
        max-width: 230px;
    }

    .kc-user-box {
        min-width: 0;
        width: 100%;
    }

    .kc-user-meta {
        justify-content: center;
    }

    .kc-user-name {
        white-space: normal;
        text-align: center;
    }
}

/* =========================
   نهاية ستايل navbar.php
========================= */

/* =========================
   Employees Navbar
========================= */

.employee-navbar {
    width: min(1200px, calc(100% - 32px));
    margin: 18px auto 28px;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
    position: relative;
    z-index: 20;
}

.employee-navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-radius: 22px;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    color: #ffffff;
    overflow: hidden;
}

.employee-navbar__user {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1 1 auto;
}

.employee-navbar__badge {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.employee-navbar__info {
    min-width: 0;
}

.employee-navbar__name {
    font-size: 26px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 6px;
    color: #ffffff;
    word-break: break-word;
}

.employee-navbar__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.employee-navbar__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #eaf1ff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.employee-navbar__meta-item strong {
    color: #ffffff;
    font-weight: 800;
}

.employee-navbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.employee-navbar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    padding: 12px 18px;
    border-radius: 14px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    transition: 0.22s ease;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    white-space: nowrap;
}

.employee-navbar__btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.employee-navbar__btn--logout {
    background: rgba(220, 38, 38, 0.92);
    border-color: rgba(220, 38, 38, 0.92);
    color: #ffffff;
}

.employee-navbar__btn--logout:hover {
    background: rgba(185, 28, 28, 0.96);
    border-color: rgba(185, 28, 28, 0.96);
    color: #ffffff;
}

.employee-navbar__links {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #dbe5f1;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.employee-navbar__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    color: #163b8f;
    background: #eef4ff;
    border: 1px solid #d7e5ff;
    transition: 0.2s ease;
}

.employee-navbar__link:hover {
    background: #dbeafe;
    color: #0f2f7a;
    transform: translateY(-1px);
}

.employee-navbar__link.active {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.22);
}

@media (max-width: 900px) {
    .employee-navbar__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .employee-navbar__user {
        flex-direction: column;
        align-items: flex-start;
    }

    .employee-navbar__actions {
        width: 100%;
    }

    .employee-navbar__btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .employee-navbar {
        width: calc(100% - 20px);
        margin: 12px auto 22px;
    }

    .employee-navbar__inner {
        padding: 14px;
        border-radius: 18px;
    }

    .employee-navbar__name {
        font-size: 22px;
    }

    .employee-navbar__meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .employee-navbar__meta-item {
        width: 100%;
        justify-content: flex-start;
    }

    .employee-navbar__links {
        padding: 12px;
    }

    .employee-navbar__link {
        width: 100%;
    }
}

.employee-navbar__btn--logout,
.employee-navbar__link--logout {
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
    color: #ffffff !important;
    border: 1px solid #991b1b !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    text-decoration: none !important;
    border-radius: 14px;
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(185, 28, 28, 0.25);
}

.employee-navbar__btn--logout:hover,
.employee-navbar__link--logout:hover {
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
    color: #ffffff !important;
    border-color: #7f1d1d !important;
}