/* ===== Avocado — global UI (Cairo font, RTL, AdminLTE 4 tweaks) ===== */
:root {
  --av-green: #1f7a4d; --av-green-dark: #15563a; --av-green-light: #e6f4ec; --av-gold: #c9a227;
  --bs-font-sans-serif: 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-success: var(--av-green); --bs-success-rgb: 31,122,77;
}
html, body { font-family: 'Cairo', system-ui, sans-serif; }
body { font-size: .95rem; }
h1,h2,h3,h4,h5,h6 { font-family: 'Cairo', sans-serif; }
.btn-success, .bg-success, .text-bg-success { background-color: var(--av-green) !important; border-color: var(--av-green) !important; }
.btn-success:hover { background-color: var(--av-green-dark) !important; border-color: var(--av-green-dark) !important; }
.btn-outline-success { color: var(--av-green); border-color: var(--av-green); }
.btn-outline-success:hover { background: var(--av-green); border-color: var(--av-green); color:#fff; }
.text-success { color: var(--av-green) !important; }
a { color: var(--av-green); } a:hover { color: var(--av-green-dark); }
.form-control:focus, .form-select:focus { border-color: var(--av-green); box-shadow: 0 0 0 .2rem rgba(31,122,77,.15); }
.page-item.active .page-link { background: var(--av-green); border-color: var(--av-green); }
.nav-pills .nav-link.active { background: var(--av-green); }

/* sidebar */
.app-sidebar { background: linear-gradient(180deg, #14352a 0%, #0f2a21 100%) !important; }
.app-sidebar .sidebar-brand { border-bottom: 1px solid rgba(255,255,255,.08); }
.app-sidebar .brand-image { width: 34px; height: 34px; }
.app-sidebar .nav-header { color: #8fbfa8; font-size: .72rem; letter-spacing: .5px; margin-top: .4rem; }
.app-sidebar .sidebar-menu > .nav-item > .nav-link.active, .app-sidebar .nav-treeview > .nav-item > .nav-link.active { background: var(--av-green) !important; color: #fff !important; }
.app-sidebar .nav-link { color: #d7e9df; }
.app-sidebar .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.app-sidebar .nav-arrow { transition: transform .2s; }

/* header */
.app-header { border-bottom: 1px solid #e6e9ec; }
.avatar-circle { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:50%; background: var(--av-green); color:#fff; font-weight:700; }
.avatar-circle.avatar-lg { width:64px; height:64px; font-size:1.6rem; margin-bottom:.5rem; background:#fff; color: var(--av-green); }
.navbar-badge { position:absolute; top:6px; right:4px; font-size:.6rem; padding:2px 4px; }
.notif-list { max-height: 320px; overflow-y:auto; }
.notif-list .dropdown-item { white-space: normal; }
.user-menu .user-header { padding: 1rem; text-align:center; }
.user-menu .user-header p { margin: 0; font-weight: 600; } .user-menu .user-header small { display:block; font-weight:400; opacity:.85; }
.user-menu .user-footer { padding: .75rem; background: #f8f9fa; }
.dropdown-menu-lg { min-width: 300px; }

/* cards & tables */
.card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04); border-radius: .75rem; }
.card-header { background: #fff; border-bottom: 1px solid #eef1f3; font-weight: 700; }
.card-outline.card-success { border-top: 3px solid var(--av-green); }
.table > :not(caption) > * > * { padding: .6rem .75rem; vertical-align: middle; }
.table thead th { white-space: nowrap; background: #f4f7f5; font-weight: 700; color:#2d3b35; border-bottom: 2px solid #dfe7e2; }
.table-hover tbody tr:hover { background: #f6fbf8; }
.table a.row-link { color: inherit; font-weight: 600; } .table a.row-link:hover { color: var(--av-green); }
.small-box { border-radius: .75rem; }
.small-box .inner h3 { font-weight: 800; }
.kpi-card { border-radius: .75rem; color:#fff; padding: 1rem 1.25rem; position:relative; overflow:hidden; min-height: 110px; }
.kpi-card .kpi-value { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.kpi-card .kpi-label { opacity: .9; }
.kpi-card .kpi-icon { position:absolute; left: 1rem; bottom: .5rem; font-size: 3.2rem; opacity: .25; }
.kpi-card a { color:#fff; text-decoration: none; }
.bg-kpi-green { background: linear-gradient(135deg, #1f7a4d, #2f9e68); }
.bg-kpi-blue { background: linear-gradient(135deg, #1d5fa8, #3f83d3); }
.bg-kpi-orange { background: linear-gradient(135deg, #c96a10, #e58a2e); }
.bg-kpi-red { background: linear-gradient(135deg, #b3373a, #d9575a); }
.bg-kpi-purple { background: linear-gradient(135deg, #5b3fa8, #7c5fd3); }
.bg-kpi-teal { background: linear-gradient(135deg, #0f7b7b, #2aa3a3); }

/* forms */
label.required::after, .required > label::after { content: ' *'; color: #dc3545; }
.form-label { font-weight: 600; margin-bottom: .25rem; }
.form-text { font-size: .8rem; }
.num, .phone, input[type=number], input[type=tel], .ltr { direction: ltr; text-align: left; font-variant-numeric: tabular-nums; }
.money { font-variant-numeric: tabular-nums; direction: ltr; display:inline-block; }
.was-validated .form-control:invalid, .form-control.is-invalid { background-image: none; }
.filter-bar .form-control, .filter-bar .form-select { width: auto; flex: 1 1 150px; max-width: 100%; }
.filter-bar input[name=q] { flex: 2 1 240px; }
.filter-bar input[type=date] { flex: 0 1 160px; }
.filter-bar .btn { flex: 0 0 auto; }
@media (max-width: 575.98px) { .filter-bar .form-control, .filter-bar .form-select { flex-basis: 100%; } }
.toolbar { display:flex; gap:.5rem; flex-wrap:wrap; align-items:center; }

/* badges for statuses */
.badge { font-weight: 600; padding: .4em .65em; }
.badge-status { border-radius: 999px; }

/* timeline */
.av-timeline { position: relative; padding-right: 1.5rem; }
.av-timeline::before { content:''; position:absolute; right: .45rem; top:0; bottom:0; width:2px; background:#dfe7e2; }
.av-timeline .tl-item { position: relative; margin-bottom: 1rem; }
.av-timeline .tl-item::before { content:''; position:absolute; right: -1.35rem; top:.35rem; width: .8rem; height:.8rem; border-radius:50%; background: var(--av-green); border: 2px solid #fff; box-shadow: 0 0 0 2px #dfe7e2; }

/* auth */
.auth-page { min-height: 100vh; background: radial-gradient(1200px 600px at 80% -10%, #2f9e68 0%, transparent 60%), linear-gradient(160deg, #0f2a21 0%, #14352a 45%, #1f7a4d 100%); display:flex; align-items:center; justify-content:center; padding: 1.5rem 1rem; }
.auth-wrap { width: 100%; max-width: 440px; }
.auth-brand { text-decoration:none; color:#fff; display:inline-block; }
.auth-brand-name { font-size: 1.8rem; font-weight: 800; letter-spacing: .5px; margin-top:.25rem; }
.auth-brand-sub { opacity: .85; font-size: .95rem; }
.auth-card { border-radius: 1rem; }
.auth-card .form-control { font-size: 1.05rem; padding: .7rem .9rem; }
.auth-card .btn-lg { padding: .7rem; font-weight: 700; }
.otp-input { letter-spacing: .6rem; font-size: 1.6rem !important; text-align: center !important; font-weight: 700; }

/* misc */
.cursor-pointer { cursor: pointer; }
.text-truncate-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient: vertical; overflow:hidden; }
.sticky-actions { position: sticky; bottom: 0; background: #fff; padding: .75rem 0; border-top: 1px solid #eee; z-index: 5; }
@media (max-width: 575.98px) { .app-content-header h3 { font-size: 1.2rem; } .breadcrumb { font-size: .8rem; } .table-responsive { font-size: .88rem; } }
@media print { .app-sidebar, .app-header, .app-footer, .app-content-header, .d-print-none, .toolbar, .filter-bar, .pagination { display:none !important; } .app-main { margin: 0 !important; } .card { box-shadow:none; border:1px solid #ddd; } }
