@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

:root {
    --rayos-bg: #f4f6fb;
    --rayos-dark: #111827;
    --rayos-primary: #1f6feb;
    --rayos-border: #e5e7eb;
    --rayos-card: #ffffff;
    --rayos-muted: #6b7280;
}

body {
    background: var(--rayos-bg);
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    color: var(--rayos-dark);
}

.rayos-navbar {
    background: linear-gradient(90deg, #0f172a, #1e293b);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .20);
}

.rayos-navbar .navbar-brand,
.rayos-navbar .nav-link,
.rayos-navbar .dropdown-toggle {
    color: #fff !important;
    font-weight: 600;
}

.rayos-navbar .nav-link:hover { color: #bfdbfe !important; }

.body-content {
    margin-top: 22px;
    padding: 0 24px 32px;
}

.rayos-footer {
    padding: 16px 24px;
    color: var(--rayos-muted);
    text-align: center;
}

.report-header {
    background: var(--rayos-card);
    border: 1px solid var(--rayos-border);
    border-radius: 18px;
    padding: 20px 22px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}

.report-header h1 {
    font-size: 1.45rem;
    margin: 0 0 6px;
    font-weight: 700;
}

.report-header p {
    margin: 0;
    color: var(--rayos-muted);
}

.header-icon { margin-left: 6px; }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.report-card {
    background: var(--rayos-card);
    border: 1px solid var(--rayos-border);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
    margin-bottom: 18px;
}

.table-responsive { border-radius: 14px; }
.table thead th {
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    border-bottom: 1px solid var(--rayos-border);
}

.table td, .table th { vertical-align: middle; }

.form-control, .form-select, textarea {
    max-width: 100% !important;
}

label { font-weight: 600; margin-bottom: 6px; }

.field-validation-error, .validation-summary-errors {
    color: #dc2626;
    font-weight: 600;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.detail-box {
    background: #f8fafc;
    border: 1px solid var(--rayos-border);
    border-radius: 12px;
    padding: 12px;
}

.detail-box .label { color: var(--rayos-muted); font-size: .85rem; margin-bottom: 4px; }
.detail-box .value { font-weight: 700; }

.action-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.badge-soft { background: #eff6ff; color: #1d4ed8; }
.badge-muted { background: #f1f5f9; color: #334155; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.dashboard-card {
    background: #fff;
    border: 1px solid var(--rayos-border);
    border-radius: 18px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
    transition: .2s ease;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    color: inherit;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .11);
}

.dashboard-card .icon { font-size: 2rem; margin-bottom: 10px; }
.dashboard-card h3 { font-size: 1.1rem; font-weight: 700; }
.dashboard-card p { color: var(--rayos-muted); margin: 0; }

.journal-table select { min-width: 190px; }
.journal-table input { min-width: 110px; }

@media (max-width: 768px) {
    .report-header { flex-direction: column; align-items: stretch; }
    .header-actions { justify-content: flex-start; }
}

/* تقارير موسعة */
.rayos-navbar .dropdown-menu {
    max-height: 78vh;
    overflow-y: auto;
}
.report-card .table {
    min-width: 980px;
}
.report-card .details-grid {
    margin-bottom: 14px;
}

/* تحسين تجربة الاستخدام */
.rayos-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--rayos-border);
    border-radius: 14px;
}

.rayos-table-search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 320px;
}

.rayos-table-search input {
    min-width: 240px;
}

.rayos-row-count {
    color: var(--rayos-muted);
    white-space: nowrap;
    font-weight: 600;
}

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

.required-star {
    color: #dc2626;
    font-weight: 700;
}

.health-summary-grid .dashboard-card {
    cursor: default;
}

.health-card-static:hover {
    transform: none;
}

code {
    direction: ltr;
    display: inline-block;
    color: #0f172a;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 2px 7px;
}

@media print {
    .rayos-navbar,
    .rayos-footer,
    .header-actions,
    .rayos-table-toolbar,
    .action-buttons,
    .btn {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .report-card,
    .report-header {
        box-shadow: none;
        border-color: #ddd;
    }
}

/* لوحة متابعة تنفيذية */
.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.dashboard-kpi {
    background: #fff;
    border: 1px solid var(--rayos-border);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
    display: flex;
    gap: 14px;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.dashboard-kpi::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: #2563eb;
}

.dashboard-kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    font-size: 1.6rem;
    flex: 0 0 auto;
}

.dashboard-kpi-title {
    color: var(--rayos-muted);
    font-weight: 700;
    margin-bottom: 5px;
}

.dashboard-kpi-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
}

.dashboard-kpi-subtitle {
    color: var(--rayos-muted);
    font-size: .9rem;
    margin-top: 4px;
}

.kpi-success::before { background: #16a34a; }
.kpi-danger::before { background: #dc2626; }
.kpi-warning::before { background: #d97706; }
.kpi-info::before { background: #0891b2; }
.kpi-primary::before { background: #2563eb; }

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.section-title-row h3 {
    margin: 0 0 4px 0;
    font-size: 1.15rem;
    font-weight: 800;
}

.section-title-row p {
    margin: 0;
    color: var(--rayos-muted);
}

.dashboard-progress {
    height: 9px;
    border-radius: 999px;
    background: #e2e8f0;
}

.dashboard-progress .progress-bar {
    border-radius: 999px;
    background: #2563eb;
}

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

.dashboard-alert {
    border: 1px solid var(--rayos-border);
    border-radius: 16px;
    padding: 13px;
    background: #f8fafc;
}

.dashboard-alert h4 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 5px 0;
}

.dashboard-alert p {
    margin: 0 0 8px 0;
    color: #334155;
}

.dashboard-alert a {
    font-weight: 700;
    text-decoration: none;
}

.dashboard-alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.dashboard-alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
}

.dashboard-alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.dashboard-bar-list {
    display: grid;
    gap: 13px;
}

.dashboard-bar-item {
    border: 1px solid var(--rayos-border);
    border-radius: 16px;
    padding: 12px;
    background: #fff;
}

.dashboard-bar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.dashboard-bar-head strong {
    display: block;
    color: #0f172a;
}

.dashboard-bar-head span,
.dashboard-bar-foot {
    color: var(--rayos-muted);
    font-size: .86rem;
}

.dashboard-bar-track {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

.dashboard-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: #0ea5e9;
}

.dashboard-bar-foot {
    margin-top: 6px;
}

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

.cash-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--rayos-border);
    border-radius: 15px;
    padding: 12px;
    background: #fff;
}

.cash-row strong,
.cash-row span {
    display: block;
}

.cash-row span {
    color: var(--rayos-muted);
    font-size: .87rem;
}

.dashboard-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.dashboard-shortcuts a {
    text-decoration: none;
    border: 1px solid var(--rayos-border);
    border-radius: 15px;
    padding: 13px;
    font-weight: 800;
    color: #0f172a;
    background: #f8fafc;
    text-align: center;
    transition: .2s ease;
}

.dashboard-shortcuts a:hover {
    background: #eff6ff;
    color: #1d4ed8;
    transform: translateY(-2px);
}


.document-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid var(--rayos-border);
    border-radius: 16px;
    padding: 12px;
    background: #f8fafc;
}

.attachment-drop-hint {
    border: 1px dashed #94a3b8;
    border-radius: 16px;
    padding: 14px;
    background: #f8fafc;
    color: #475569;
}

@media print {
    .rayos-navbar,
    .rayos-footer,
    .document-actions,
    .action-buttons,
    .btn,
    .table-tools,
    .report-header-actions {
        display: none !important;
    }

    body {
        background: #fff !important;
    }

    .report-card,
    .form-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}


.go-live-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.go-live-score {
    display: flex;
    align-items: center;
    gap: 18px;
}

.score-circle {
    width: 118px;
    height: 118px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 8px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
    flex: 0 0 auto;
}

.score-circle strong {
    font-size: 1.9rem;
    line-height: 1;
}

.score-circle span {
    font-size: .9rem;
    color: #475569;
    margin-top: 5px;
}

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

.status-tile {
    border-radius: 16px;
    padding: 16px;
    border: 1px solid var(--rayos-border);
    background: #fff;
}

.status-tile strong,
.metric-card strong {
    display: block;
    font-size: 1.9rem;
}

.status-tile span,
.metric-card span,
.metric-card small {
    color: var(--rayos-muted);
}

.status-success { background: #f0fdf4; }
.status-warning { background: #fffbeb; }
.status-danger { background: #fef2f2; }

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

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

.guide-content {
    line-height: 1.9;
    font-size: 1rem;
}

.guide-content h3,
.guide-content h5 {
    color: #0f172a;
    font-weight: 800;
}

.guide-content pre {
    direction: rtl;
    text-align: right;
    white-space: pre-wrap;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    font-family: "Cairo", Tahoma, Arial, sans-serif;
}

.workflow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.workflow-steps > div {
    border: 1px solid var(--rayos-border);
    border-radius: 16px;
    padding: 14px;
    background: #f8fafc;
}

.workflow-steps strong {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1d4ed8;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.workflow-steps span {
    font-weight: 800;
}


/* =========================================================
   Rayos Mall - RTL Mega Menu Final
   ========================================================= */

html,
body {
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

.rayos-body {
    background: #f4f6f9;
    font-family: "Cairo", "Tahoma", "Arial", sans-serif;
    color: #1d2b44;
    margin: 0;
}

.rayos-header {
    position: relative;
    z-index: 2000;
}

.rayos-mega-navbar {
    background: linear-gradient(135deg, #172033, #24324d);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    padding: 0;
}

.rayos-navbar-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 18px;
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
}

.rayos-logo {
    color: #ffffff;
    text-decoration: none;
    font-weight: 900;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
}

.rayos-logo:hover,
.rayos-logo:focus {
    color: #ffffff;
    text-decoration: none;
}

.rayos-logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.13);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rayos-logo-text {
    line-height: 1;
}

.rayos-menu-toggle {
    display: none;
    margin-right: auto;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-radius: 12px;
    padding: 8px 13px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.rayos-menu-wrapper {
    flex: 1;
    position: relative;
}

.rayos-main-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rayos-menu-item,
.rayos-has-mega {
    position: static !important;
}

.rayos-main-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    padding: 13px 14px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: 0.18s ease-in-out;
    white-space: nowrap;
}

.rayos-main-link:hover,
.rayos-main-link:focus,
.rayos-has-mega.is-open > .rayos-main-link {
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    text-decoration: none;
}

.rayos-arrow {
    font-size: 12px;
    opacity: 0.9;
}

.rayos-mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 16px !important;
    left: 16px !important;
    width: auto !important;
    max-width: calc(100vw - 32px) !important;
    box-sizing: border-box;
    overflow-x: hidden;
    background: #f7f8fb;
    padding: 24px;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 22px 48px rgba(20, 30, 50, 0.24);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.rayos-has-mega.is-open > .rayos-mega-menu {
    display: block;
}

.rayos-mega-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 18px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.rayos-mega-column {
    background: #ffffff;
    border: 1px solid #e6e9f0;
    border-radius: 18px;
    padding: 16px;
    min-height: 100%;
    min-width: 0;
    box-shadow: 0 8px 22px rgba(20, 30, 50, 0.06);
}

.rayos-mega-column h6 {
    color: #18243b;
    font-weight: 900;
    font-size: 15px;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf0f5;
}

.rayos-mega-highlight {
    background: linear-gradient(180deg, #ffffff, #f0f4ff);
    border-color: #dbe5ff;
}

.rayos-mega-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
    padding: 11px 10px;
    border-radius: 14px;
    color: #1d2b44;
    transition: 0.18s ease-in-out;
    margin-bottom: 7px;
    min-width: 0;
}

.rayos-mega-link:hover,
.rayos-mega-link:focus {
    background: #eef3ff;
    transform: translateY(-1px);
    color: #0d47a1;
    text-decoration: none;
}

.rayos-mega-link span {
    min-width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #eef2f8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.rayos-mega-link div {
    min-width: 0;
}

.rayos-mega-link strong {
    display: block;
    font-size: 14px;
    margin-bottom: 3px;
    color: inherit;
    overflow-wrap: anywhere;
}

.rayos-mega-link small {
    display: block;
    color: #6b7485;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.rayos-page-container {
    max-width: 100%;
    padding: 22px;
    min-height: calc(100vh - 130px);
}

.rayos-footer {
    background: #ffffff;
    border-top: 1px solid #e6e9f0;
    color: #697386;
    padding: 14px 22px;
    text-align: center;
    font-size: 13px;
}

@media (min-width: 992px) {
    .rayos-has-mega:hover > .rayos-mega-menu {
        display: block;
    }

    .rayos-has-mega:hover > .rayos-main-link {
        background: rgba(255, 255, 255, 0.13);
    }
}

@media (max-width: 1300px) {
    .rayos-mega-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
    }
}

@media (max-width: 1200px) {
    .rayos-main-link {
        font-size: 13px;
        padding: 12px 10px;
    }
}

@media (max-width: 991.98px) {

    .rayos-navbar-container {
        min-height: 62px;
        flex-wrap: wrap;
        padding: 10px 14px;
    }

    .rayos-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .rayos-menu-wrapper {
        display: none;
        width: 100%;
        flex: 0 0 100%;
    }

    .rayos-menu-wrapper.is-open {
        display: block;
    }

    .rayos-main-menu {
        display: block;
        padding: 10px 0 4px 0;
    }

    .rayos-menu-item {
        width: 100%;
    }

    .rayos-main-link {
        width: 100%;
        justify-content: space-between;
        padding: 12px 14px;
        margin-bottom: 4px;
    }

    .rayos-mega-menu {
        position: static !important;
        right: auto !important;
        left: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px;
        border-radius: 16px;
        box-shadow: none;
        margin-bottom: 10px;
        max-height: 75vh;
        overflow-y: auto;
    }

    .rayos-mega-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .rayos-mega-column {
        padding: 14px;
    }

    .rayos-page-container {
        padding: 14px;
    }
}
