/* OraClass UI system — one look for site, account and admin. Brand: graphite + orange, Tajawal, RTL.
   Sections: tokens · nav · buttons · inputs · switches · segmented/select · tabs · layout & forms · modal · widgets · boards · avatars · mobile */

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: dark;
  --brand: #F49156; --brand-2: #EC675A; --brand-soft: rgba(244,145,86,.12);
  --bg: #0F1419; --bg-2: #1A2027; --bg-3: #25313B; --bg-4: #2C3944;
  --text: #E5E7EB; --muted: #9CA3AF; --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16);
  --ok: #3DBE8B; --warn: #F2C14E; --bad: #EC675A; --info: #4FA3F7;
  --radius: 14px; --ctl-h: 40px; --ctl-h-sm: 32px; --ctl-r: 10px;
}
body { font-family: Tajawal, system-ui, sans-serif; }

/* ------------------------------------------------------------------ top navigation (same bar in every area) */
.oc-nav { position: sticky; top: 0; z-index: 1030; min-height: 64px; flex-shrink: 0; padding: .5rem 0; background: rgba(21,27,33,.94);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.oc-nav .oc-brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: .5px; text-decoration: none; margin-inline-end: 1rem; }
.oc-nav .oc-brand img { height: 42px; width: auto; }
.oc-nav .oc-brand:hover { color: var(--brand); }
.oc-nav .oc-links { gap: 2px; }
.oc-nav .oc-links .nav-link { color: var(--text); font-size: .95rem; font-weight: 500; padding: .45rem .85rem; border-radius: 8px; transition: color .15s, background .15s; }
.oc-nav .oc-links .nav-link:hover { color: var(--brand); background: rgba(255,255,255,.04); }
.oc-nav .oc-links .nav-link.active { color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.oc-nav .navbar-toggler { color: #fff; border: 1px solid var(--line-2); border-radius: var(--ctl-r); padding: .35rem .7rem; }
.oc-nav .navbar-toggler:focus { box-shadow: none; }
.oc-user { display: flex; align-items: center; gap: .75rem; }
.oc-login { color: var(--text); font-weight: 600; font-size: .95rem; text-decoration: none; }
.oc-login:hover { color: var(--brand); }
.oc-user-btn { display: inline-flex; align-items: center; gap: .55rem; height: 40px; padding-inline: .3rem .85rem; border-radius: 999px; cursor: pointer;
  background: var(--bg-3); border: 1px solid var(--line); color: #fff; font: inherit; font-size: .9rem; font-weight: 600; max-width: 240px; }
.oc-user-btn img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.oc-user-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-user-btn i { font-size: .7rem; color: var(--muted); }
.oc-user-btn:hover, .oc-user-btn[aria-expanded="true"] { border-color: var(--brand); }
.dropdown-menu { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.45); padding: .4rem; min-width: 210px; }
.dropdown-item { color: var(--text); border-radius: 8px; padding: .55rem .75rem; display: flex; align-items: center; gap: .55rem; font-size: .92rem; }
.dropdown-item i { color: var(--muted); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--bg-3); color: #fff; }
.dropdown-item.active, .dropdown-item:active { background: var(--brand-soft); color: var(--brand); }
.dropdown-item.active i { color: var(--brand); }
.dropdown-divider { border-color: var(--line); margin: .35rem 0; }
.dropdown-menu form { margin: 0; }
.dropdown-menu button.dropdown-item { width: 100%; border: 0; background: none; font: inherit; font-size: .92rem; text-align: start; }

/* ------------------------------------------------------------------ buttons: one family, brand first */
.btn { border-radius: var(--ctl-r); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: var(--ctl-h); padding: .4rem 1rem; line-height: 1.3; }
.btn-sm { min-height: var(--ctl-h-sm); padding: .25rem .75rem; font-size: .85rem; border-radius: 8px; }
.btn-lg { min-height: 48px; }
.btn.w-100 { display: flex; }
.btn-brand, .btn-primary, .btn-success, .btn-info, .btn-warning {
  background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important; border: 0 !important; color: #fff !important; box-shadow: 0 4px 14px rgba(236,103,90,.22); }
.btn-brand:hover, .btn-primary:hover, .btn-success:hover, .btn-info:hover, .btn-warning:hover,
.btn-brand:focus, .btn-primary:focus, .btn-success:focus, .btn-info:focus, .btn-warning:focus { filter: brightness(1.08); color: #fff !important; }
.btn-primary::before { display: none !important; }
.btn-outline-light, .btn-secondary, .btn-dark, .btn-light {
  background: rgba(255,255,255,.03); border: 1px solid var(--line-2); color: var(--text); }
.btn-outline-light:hover, .btn-secondary:hover, .btn-dark:hover, .btn-light:hover,
.btn-outline-light:focus, .btn-secondary:focus, .btn-dark:focus, .btn-light:focus { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.btn-outline-primary, .btn-outline-success, .btn-outline-info, .btn-outline-warning, .btn-outline-secondary {
  background: transparent; border: 1px solid rgba(244,145,86,.55); color: var(--brand); }
.btn-outline-primary:hover, .btn-outline-success:hover, .btn-outline-info:hover, .btn-outline-warning:hover, .btn-outline-secondary:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-outline-danger { background: transparent; border: 1px solid rgba(236,103,90,.5); color: #F27C6E; }
.btn-outline-danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger { background: var(--bad); border: 0; color: #fff; }
.btn-link { color: var(--brand); text-decoration: none; min-height: 0; }
.btn-link:hover { color: var(--brand-2); }
.btn-link.text-danger { color: #F27C6E !important; }
.btn-icon { width: var(--ctl-h-sm); padding: 0; }
.btn:disabled, .btn.disabled { opacity: .5; box-shadow: none; }
.btn:focus { box-shadow: none; }
.btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.btn-close { filter: invert(1) grayscale(1) brightness(1.6); opacity: .7; }

/* ------------------------------------------------------------------ inputs: every control is dark and the same height */
:where(input:not([type=checkbox], [type=radio], [type=color], [type=range], [type=file], [type=hidden], [type=submit], [type=button]), select, textarea) {
  background-color: var(--bg-3); color: #fff; border: 1px solid var(--line); border-radius: var(--ctl-r); }
.form-control, .form-select { background-color: var(--bg-3); border: 1px solid var(--line); color: #fff; border-radius: var(--ctl-r); min-height: var(--ctl-h); font-size: .95rem; }
.form-control-sm, .form-select-sm { min-height: var(--ctl-h-sm); font-size: .85rem; border-radius: 8px; padding-block: .2rem; }
select.form-select-sm:not(.form-select) { background-color: var(--bg-3); color: #fff; border: 1px solid var(--line); padding: .2rem .6rem; }
textarea.form-control { min-height: 0; line-height: 1.7; }
.form-control:focus, .form-select:focus { background-color: var(--bg-3); color: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(244,145,86,.15); }
.form-control::placeholder { color: #6b7280; }
.form-control:disabled, .form-control[readonly], .form-select:disabled, fieldset:disabled .form-control { background-color: rgba(255,255,255,.03); color: var(--muted); border-color: var(--line); }
.form-control[type=file] { padding-block: 0; line-height: calc(var(--ctl-h) - 2px); color: var(--muted); }
.form-control::file-selector-button { background: var(--bg-4); color: var(--text); border: 0; border-inline-end: 1px solid var(--line); height: calc(var(--ctl-h) - 2px); padding: 0 1rem; margin-block: 0; margin-inline: -.75rem .75rem; }
.form-control::-webkit-file-upload-button { background: var(--bg-4); color: var(--text); border: 0; }
.form-control:hover:not(:disabled):not([readonly])::file-selector-button { background: var(--brand-soft); color: var(--brand); }
.form-control-color { padding: .3rem; width: 100%; max-width: 64px; }
.input-group-text { background: var(--bg-4); border-color: var(--line); color: var(--muted); border-radius: var(--ctl-r); }
input[type=date], input[type=datetime-local], input[type=time] { direction: ltr; text-align: end; }
input[type=number] { direction: ltr; text-align: end; }
.form-label { color: #cfd5dc; font-weight: 600; font-size: .88rem; margin-bottom: .4rem; display: block; }
.form-label > .form-control, .form-label > .form-select { margin-top: .4rem; font-weight: 400; }
.form-text { font-size: .82rem; margin-top: .4rem; line-height: 1.6; }
fieldset:disabled { opacity: .85; }
input[type=radio] { accent-color: var(--brand); width: 18px; height: 18px; }

/* Switch: every checkbox renders as a toggle */
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex-shrink: 0; vertical-align: middle; cursor: pointer; margin: 0;
  width: 40px !important; height: 22px !important; border-radius: 22px !important; position: relative; float: none !important;
  background-color: var(--bg-3) !important; background-image: none !important; border: 1px solid rgba(255,255,255,.18) !important; transition: background-color .2s, border-color .2s;
}
input[type="checkbox"]::after { content: ""; position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
input[type="checkbox"]:checked { background-color: var(--brand) !important; border-color: var(--brand) !important; }
input[type="checkbox"]:checked::after { transform: translateX(-18px); background: #fff; }
input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }
input[type="checkbox"]:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; box-shadow: none; }
.form-check { display: inline-flex; align-items: center; gap: .55rem; padding: 0; min-height: 26px; margin: 0; cursor: pointer; }
.form-check .form-check-input { margin: 0 !important; }
.form-check-inline { display: inline-flex; align-items: center; gap: .45rem; margin-inline-end: 1rem; }
/* Labelled switch with an optional hint */
.oc-switch { display: flex; align-items: flex-start; gap: .7rem; cursor: pointer; margin: 0; padding: .15rem 0; }
.oc-switch input { margin-top: .1rem !important; }
.oc-switch span { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.oc-switch b { font-weight: 600; font-size: .92rem; color: var(--text); }
.oc-switch small { color: var(--muted); font-size: .8rem; line-height: 1.5; }
.switch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem 1.5rem; }

/* ------------------------------------------------------------------ segmented control + label select (OfLabelMultiselect-style) */
select.oc-enhanced { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; overflow: hidden; clip-path: inset(50%); }
.oc-seg { display: flex; width: 100%; height: var(--ctl-h); background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--ctl-r); overflow: hidden; }
.oc-seg.fit { display: inline-flex; width: auto; max-width: 100%; vertical-align: middle; }
.oc-seg.sm { height: var(--ctl-h-sm); border-radius: 8px; }
.oc-seg > a, .oc-seg > button { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: .45rem; padding: 0 1rem; margin: 0;
  border: 0; border-radius: 0; background: none; color: var(--text); font: inherit; font-size: .9rem; font-weight: 600; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.oc-seg.sm > * { font-size: .82rem; padding: 0 .75rem; }
.oc-seg > * + * { border-inline-start: 1px solid var(--line); }
.oc-seg > :hover { background: rgba(255,255,255,.05); color: #fff; }
.oc-seg > .on, .oc-seg > [aria-checked="true"] { background: var(--c, var(--brand)); color: #fff; }
.oc-seg > .on + *, .oc-seg > [aria-checked="true"] + * { border-inline-start-color: transparent; }
.oc-seg > :disabled { opacity: .45; cursor: not-allowed; }
.oc-seg > :focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.oc-seg span { overflow: hidden; text-overflow: ellipsis; }
/* Dropdown variant */
.oc-ms { position: relative; }
.oc-ms-box { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: var(--ctl-h); padding: 4px 12px; padding-inline-end: 34px; cursor: pointer;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--ctl-r); position: relative; color: #fff; font-size: .95rem; }
.oc-ms.sm .oc-ms-box { min-height: var(--ctl-h-sm); font-size: .85rem; border-radius: 8px; }
.oc-ms-box:focus-visible, .oc-ms.open .oc-ms-box { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(244,145,86,.15); }
.oc-ms-box::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .7rem; position: absolute; inset-inline-end: 13px; color: var(--muted); transition: transform .15s; }
.oc-ms.open .oc-ms-box::after { transform: rotate(180deg); }
.oc-ms-ph { color: #6b7280; }
.oc-ms-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: .45rem; }
.oc-chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 4px 1px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--c, var(--brand)); color: #fff; }
.oc-chip .x { cursor: pointer; opacity: .85; padding: 0 5px; border-radius: 50%; }
.oc-chip .x:hover { background: rgba(0,0,0,.2); }
.oc-ms-drop { display: none; position: absolute; z-index: 1060; top: calc(100% + 4px); inset-inline: 0; min-width: 220px; background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.5); max-height: 320px; overflow: hidden; flex-direction: column; }
.oc-ms.open .oc-ms-drop { display: flex; }
.oc-ms-drop .oc-ms-search { margin: 8px; width: calc(100% - 16px); min-height: 34px; }
.oc-ms-list { overflow-y: auto; padding: 5px; }
.oc-ms-opt { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: 8px; border: 0; background: none; color: var(--text); text-align: start; font: inherit; font-size: .92rem; }
.oc-ms-opt:hover, .oc-ms-opt.focus { background: var(--bg-3); color: #fff; }
.oc-ms-opt.on { color: var(--brand); font-weight: 700; }
.oc-ms-opt.on::after { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .75rem; margin-inline-start: auto; }
.oc-ms-opt:disabled { opacity: .45; }
.oc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.oc-ms-empty { padding: 10px; color: var(--muted); font-size: .85rem; }
/* Coloured labels shown as read-only values (board statuses, label fields) */
.oc-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; line-height: 1.5;
  border: 1px solid color-mix(in srgb, var(--c, #F49156) 45%, transparent); color: var(--c, #F49156); background: color-mix(in srgb, var(--c, #F49156) 12%, transparent); }
.oc-pill.on { background: var(--c, #F49156); color: #fff; border-color: var(--c, #F49156); }
.oc-pills { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------------------------------------------ tabs: one style; a tab bar followed by a panel is its header */
.nav-tabs { display: flex; flex-wrap: nowrap; gap: 2px; border: 0; box-shadow: inset 0 -1px 0 var(--line); margin-bottom: 1.25rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tabs .nav-link { color: var(--muted); background: none; border: 1px solid transparent; border-bottom: 0; border-radius: 10px 10px 0 0; padding: .65rem 1.15rem; margin: 0;
  font-weight: 600; font-size: .92rem; white-space: nowrap; display: inline-flex; align-items: center; gap: .45rem; }
.nav-tabs .nav-link:hover { color: #fff; background: rgba(255,255,255,.03); }
.nav-tabs .nav-link.active { color: var(--brand); background: var(--bg-2); border-color: var(--line); }
.nav-tabs .count { background: rgba(255,255,255,.08); color: var(--text); border-radius: 999px; padding: 0 .5rem; font-size: .75rem; min-width: 1.4rem; text-align: center; }
.nav-tabs .nav-link.active .count { background: var(--brand); color: #fff; }
.nav-tabs:has(+ .panel), .nav-tabs:has(+ .tab-content.panel) { margin-bottom: 0 !important; }
.nav-tabs + .panel, .nav-tabs + .tab-content.panel { border-top: 0; border-start-start-radius: 0; border-start-end-radius: 0; }
.nav-tabs.sub { margin-top: .25rem; }
.nav-tabs.sub .nav-link { padding: .5rem 1rem; font-size: .88rem; }

/* ------------------------------------------------------------------ layout, panels and form rhythm */
.panel { padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; }
.panel > :last-child { margin-bottom: 0; }
.panel-title, .panel > h2.h6:first-child, .panel > h2.h5:first-child { display: flex; align-items: center; gap: .5rem; font-size: 1rem; color: #fff; margin-bottom: 1.1rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.panel-head h2 { font-size: 1rem; margin: 0; display: flex; align-items: center; gap: .5rem; }
/* A panel that is also a .row must not pull outside its own box (Bootstrap rows use negative margins). */
.panel.row { margin: 0 0 1.25rem; padding: calc(1.4rem - var(--bs-gutter-y)) calc(1.5rem - var(--bs-gutter-x) * .5) 1.4rem; }
.panel.row > h2 { margin-top: var(--bs-gutter-y); }
/* Vertical breathing room between rows of fields */
form .row:not(.g-0), .panel .row:not(.g-0) { --bs-gutter-y: 1.1rem; --bs-gutter-x: 1.1rem; }
.page-head { margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.45rem; }
.page-head p { margin: .25rem 0 0; color: var(--muted); }
.lead-note { color: var(--muted); font-size: .9rem; margin: -.5rem 0 1.25rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1.25rem; }
.toolbar .grow { flex: 1 1 220px; }
.toolbar .search { position: relative; flex: 1 1 220px; max-width: 360px; }
.toolbar .search i { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; }
.toolbar .search input { padding-inline-start: 34px; }
.form-narrow { max-width: 820px; }
/* Long forms are split into titled sections; on wide screens the title sits beside its fields */
.fsec { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.fsec:first-of-type, .fsec.first { border-top: 0; padding-top: 0; }
.fsec > header h2 { font-size: .98rem; color: #fff; margin: 0 0 .25rem; }
.fsec > header p { color: var(--muted); font-size: .82rem; margin: 0 0 1rem; line-height: 1.6; }
@media (min-width: 1200px) {
  .panel:not(.form-narrow) > .fsec, form:not(.form-narrow) > fieldset > .fsec { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 2rem; }
  .panel:not(.form-narrow) > .fsec > header p, form:not(.form-narrow) > fieldset > .fsec > header p { margin-bottom: 0; }
}
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding-top: 1.25rem; border-top: 1px solid var(--line); margin-top: .25rem; }
.form-actions.sticky { position: sticky; bottom: 0; z-index: 5; background: var(--bg-2); padding-bottom: 1rem; margin-bottom: -1.4rem; border-radius: 0 0 var(--radius) var(--radius); }
.summary-chips { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; font-size: .9rem; }
.summary-chips span { color: var(--muted); }
.summary-chips b { color: #fff; font-weight: 600; }
.danger-zone { border: 1px solid rgba(236,103,90,.35); border-radius: var(--radius); padding: 1.1rem 1.25rem; background: rgba(236,103,90,.04); }
.danger-zone h2 { font-size: .95rem; color: #F27C6E; margin-bottom: .8rem; }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.empty i { font-size: 2rem; display: block; margin-bottom: .6rem; color: var(--bg-4); }

/* tables */
.table > :not(caption) > * > * { padding: .7rem .75rem; }
.table-sm > :not(caption) > * > * { padding: .5rem .6rem; }
.table > :not(:last-child) > :last-child > * { border-bottom-color: var(--line); }
.table td .form-control, .table td .form-select, .table td .oc-ms-box, .table td .oc-seg { min-width: 90px; }
.row-actions { display: flex; gap: .35rem; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
details > summary { cursor: pointer; color: var(--brand); list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* badges and alerts: tinted, never off-brand solid blocks */
.badge { font-weight: 600; border-radius: 999px; padding: .35em .75em; }
.badge.bg-success { background: rgba(61,190,139,.16) !important; color: #5fd3a4; }
.badge.bg-danger { background: rgba(236,103,90,.18) !important; color: #F49084; }
.badge.bg-warning { background: rgba(242,193,78,.16) !important; color: #F2C14E !important; }
.badge.bg-info, .badge.bg-primary { background: rgba(244,145,86,.16) !important; color: var(--brand) !important; }
.badge.bg-secondary, .badge.bg-dark, .badge.bg-light { background: rgba(255,255,255,.08) !important; color: var(--text) !important; }
.alert { --a: var(--info); background: color-mix(in srgb, var(--a) 10%, var(--bg-2)); border: 1px solid color-mix(in srgb, var(--a) 35%, transparent); color: var(--text); border-radius: 12px; }
.alert-success { --a: var(--ok); } .alert-danger { --a: var(--bad); } .alert-warning { --a: var(--warn); } .alert-secondary, .alert-light, .alert-dark { --a: #8FA0B5; } .alert-primary { --a: var(--brand); }
.alert a { color: var(--brand); }
.text-primary { color: var(--brand) !important; } .bg-primary { background-color: var(--brand) !important; }
.text-info { color: #7cc0ff !important; }
.list-group-item { background: var(--bg-2); border-color: var(--line); color: var(--text); }
.pagination { gap: 4px; }
.pagination .page-link { background: var(--bg-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px !important; }
.pagination .active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ------------------------------------------------------------------ modal */
.modal-content { background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.modal-header, .modal-footer { border-color: var(--line); padding: 1rem 1.25rem; }
.modal-header .btn-close { margin: 0; margin-inline-start: auto; }
.modal-body { padding: 1.25rem; }
.modal-footer { gap: .5rem; }
.modal-footer > * { margin: 0; }
.modal-backdrop.show { opacity: .65; }

/* ------------------------------------------------------------------ rich editor */
.oc-editor { border: 1px solid var(--line-2); border-radius: var(--ctl-r); background: var(--bg-3); overflow: hidden; }
.oc-editor-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.oc-editor-bar button { border: 0; background: none; color: var(--text); min-width: 32px; height: 30px; border-radius: 6px; font-size: .85rem; padding: 0 6px; font-family: inherit; }
.oc-editor-bar button:hover, .oc-editor-bar button.on { background: var(--brand-soft); color: var(--brand); }
.oc-editor-bar .sep { width: 1px; background: var(--line-2); margin: 3px 4px; }
.oc-editor-area { min-height: 170px; max-height: 560px; overflow-y: auto; padding: 12px 14px; outline: none; color: #fff; line-height: 1.8; }
.oc-editor-area:empty::before { content: attr(data-placeholder); color: var(--muted); }
.oc-editor textarea.oc-src { display: none; width: 100%; min-height: 240px; border: 0; border-radius: 0; background: #0b0f13; color: #9fe39f; font-family: Consolas, monospace; padding: 12px; direction: ltr; }
.oc-editor.source .oc-editor-area { display: none; }
.oc-editor.source textarea.oc-src { display: block; }
.rich-content img, .oc-editor-area img { max-width: 100%; height: auto; border-radius: 8px; }
.rich-content table, .oc-editor-area table { width: 100%; border-collapse: collapse; margin: .5rem 0; }
.rich-content td, .rich-content th, .oc-editor-area td, .oc-editor-area th { border: 1px solid rgba(255,255,255,.15); padding: 6px; }
.rich-content blockquote, .oc-editor-area blockquote { border-inline-start: 4px solid var(--brand); padding: 4px 12px; color: #c7cdd4; margin: .5rem 0; }
.rich-content h2, .rich-content h3, .rich-content h4 { margin-top: 1rem; }

/* ------------------------------------------------------------------ side menu (admin / account) */
.sidenav { padding: 1.1rem .65rem; }
.sidenav a { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; font-size: .92rem; }
.sidenav a i { color: var(--muted); width: 1.1rem; text-align: center; }
.sidenav a.active i, .sidenav a:hover i { color: var(--brand); }
.content { padding: 1.75rem 2rem 2.5rem; }
.menu-toggle { display: none; }
.drawer-overlay { display: none; }
.sidenav .drawer-head { display: none; justify-content: space-between; align-items: center; padding: .25rem .6rem .75rem; margin-bottom: .5rem; border-bottom: 1px solid var(--line); }

/* ------------------------------------------------------------------ public activities: featured, filter */
.promo-ribbon { position: absolute; top: 14px; right: -6px; z-index: 3; padding: 4px 14px; font-size: .78rem; font-weight: 800; color: #fff; border-radius: 6px 0 0 6px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 4px 14px rgba(236,103,90,.45); }
.promo-ribbon.exclusive { background: linear-gradient(135deg, #b8860b, #f5d061); color: #1a1a1a; }
.activity-card.is-featured { border-color: rgba(244,145,86,.6) !important; box-shadow: 0 0 0 1px rgba(244,145,86,.35), 0 12px 35px rgba(244,145,86,.15); }
.activity-card.is-exclusive { border-color: rgba(245,208,97,.65) !important; box-shadow: 0 0 0 1px rgba(245,208,97,.4), 0 12px 35px rgba(245,208,97,.15); }
.filter-bar { background: var(--bg-2); border: 1px solid rgba(244,145,86,.18); border-radius: 18px; padding: 1rem; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.filter-bar .main { display: flex; gap: .6rem; flex-wrap: wrap; }
.filter-bar .main .search { position: relative; flex: 1 1 260px; }
.filter-bar .main .search i { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.filter-bar .main .search input { padding-inline-start: 40px; min-height: 46px; border-radius: 12px; }
.filter-bar .main .btn { min-height: 46px; border-radius: 12px; }
.filter-bar .more { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.filter-toggle .n { background: var(--brand); color: #fff; border-radius: 999px; font-size: .72rem; padding: 0 .45rem; }

/* ------------------------------------------------------------------ boards (Dorcas-style) */
.my-tasks { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 280px); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.task-card { display: block; padding: 12px 14px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line); border-inline-start: 3px solid var(--c, var(--brand)); color: var(--text); text-decoration: none; }
.task-card:hover { border-color: var(--brand); color: #fff; }
.task-card .t { font-weight: 700; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card small { color: var(--muted); display: flex; gap: .6rem; }
.task-card .late { color: var(--bad); }
.tree { list-style: none; margin: 0; padding: 0; }
.tree-folder > summary { display: flex; align-items: center; gap: .6rem; padding: .7rem .5rem; border-radius: 10px; color: #fff; font-weight: 700; }
.tree-folder > summary:hover { background: rgba(255,255,255,.03); }
.tree-folder > summary .caret { color: var(--muted); font-size: .7rem; transition: transform .15s; width: 12px; }
.tree-folder[open] > summary .caret { transform: rotate(-90deg); }
.tree-folder > summary .fa-folder, .tree-folder > summary .fa-folder-open { color: var(--warn); }
.tree-folder > summary .n { color: var(--muted); font-weight: 400; font-size: .82rem; }
.tree-folder > summary .act { margin-inline-start: auto; opacity: 0; transition: opacity .15s; }
.tree-folder > summary:hover .act, .tree-folder > summary:focus-within .act { opacity: 1; }
.tree-folder > .tree { margin-inline-start: 1.15rem; padding-inline-start: .9rem; border-inline-start: 1px dashed var(--line-2); margin-bottom: .4rem; }
.tree-board { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border-radius: 10px; color: var(--text); text-decoration: none; }
.tree-board:hover { background: var(--bg-3); color: #fff; }
.tree-board .ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, #F49156) 18%, transparent); color: var(--c, #F49156); flex-shrink: 0; }
.tree-board .nm { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-board small { color: var(--muted); white-space: nowrap; }
.tree-empty { color: var(--muted); font-size: .85rem; padding: .4rem .75rem; }
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; min-height: 60vh; }
.kanban-col { flex: 0 0 290px; background: #151b21; border: 1px solid rgba(255,255,255,.07); border-radius: 14px; display: flex; flex-direction: column; max-height: calc(100vh - 250px); }
.kanban-col-head { display: flex; justify-content: space-between; align-items: center; padding: 11px 13px; border-bottom: 3px solid var(--c, #6B7280); font-weight: 700; }
.kanban-col-head .count { background: rgba(255,255,255,.08); border-radius: 999px; padding: 0 8px; font-size: .78rem; }
.kanban-list { padding: 8px; overflow-y: auto; flex: 1; min-height: 40px; display: flex; flex-direction: column; gap: 8px; }
.kanban-list.drag-over { background: rgba(244,145,86,.06); outline: 2px dashed rgba(244,145,86,.4); outline-offset: -6px; border-radius: 10px; }
.kanban-card { background: #1F2830; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 10px 12px; cursor: grab; color: var(--text); text-decoration: none; display: block; }
.kanban-card:hover { border-color: rgba(244,145,86,.5); color: #fff; }
.kanban-card.dragging { opacity: .45; }
.kanban-card .t { font-weight: 700; margin-bottom: 4px; }
.kanban-card .meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: .76rem; color: var(--muted); align-items: center; }
.kanban-card .prio-high { color: var(--warn); } .kanban-card .prio-urgent { color: var(--bad); font-weight: 700; }
.kanban-card .due.late { color: var(--bad); }
.kanban-add { padding: 8px; border-top: 1px solid rgba(255,255,255,.06); }
.kanban-add input { background: transparent !important; border: 1px dashed rgba(255,255,255,.15) !important; min-height: 34px; }
.item-side dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; margin: 0; }
.item-side dt { color: var(--muted); font-weight: 500; }
.checklist-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.checklist-row.done span { text-decoration: line-through; color: var(--muted); }
.comment { border-inline-start: 3px solid rgba(244,145,86,.4); padding: 4px 10px; margin-bottom: 10px; }

/* ------------------------------------------------------------------ avatars */
.avatar { border-radius: 50%; object-fit: cover; background: var(--bg-3); flex-shrink: 0; }
.avatar-picker { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.avatar-xl { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg-3); box-shadow: 0 0 0 2px var(--brand); background: var(--bg-3); }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px; }
.avatar-opt { border: 2px solid transparent; border-radius: 50%; padding: 3px; background: var(--bg-3); aspect-ratio: 1; cursor: pointer; transition: border-color .15s, transform .15s; }
.avatar-opt img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar-opt:hover { border-color: rgba(244,145,86,.6); transform: translateY(-2px); }
.avatar-opt.on { border-color: var(--brand); }
.modal-body .tab-content.panel { margin: 0; }

/* ------------------------------------------------------------------ mobile */
@media (max-width: 991px) {
  .oc-nav .navbar-collapse { margin-top: .6rem; padding: .6rem 0 .3rem; border-top: 1px solid var(--line); }
  .oc-nav .oc-links .nav-link { padding: .65rem .8rem; }
  .oc-user { padding: .6rem 0 .2rem; flex-wrap: wrap; }
  .oc-user .dropdown, .oc-user-btn { width: 100%; max-width: none; }
  .oc-user .dropdown-menu { width: 100%; position: static !important; transform: none !important; box-shadow: none; margin-top: .4rem !important; }
  .shell { flex-direction: column; }
  .menu-toggle { display: inline-flex; align-items: center; gap: .5rem; margin: .75rem 1rem 0; padding: .5rem .9rem; border-radius: 10px;
    background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); font-weight: 700; width: max-content; }
  .sidenav { position: fixed !important; top: 0; bottom: 0; right: -290px; width: 270px !important; height: 100vh; z-index: 2000; display: block !important; overflow-y: auto;
    padding: 1rem .6rem !important; border-left: 1px solid var(--line) !important; border-bottom: 0 !important; transition: right .28s ease; box-shadow: -10px 0 30px rgba(0,0,0,.45); }
  .sidenav a { white-space: normal !important; padding: .7rem .9rem; }
  .sidenav .drawer-head { display: flex; }
  body.drawer-open .sidenav { right: 0; }
  body.drawer-open .drawer-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1999; }
  body.drawer-open { overflow: hidden; }
  .content { padding: 1rem 1rem 2rem; }
  .content .panel > table, .content .panel > form > table, .content .panel > .table-wrap { display: block; overflow-x: auto; }
  .page-head h1 { font-size: 1.2rem; }
  .panel { padding: 1.1rem; }
  .kanban-col { flex-basis: 85vw; max-height: none; }
  .oc-seg.fit { overflow-x: auto; }
}

/* public hero buttons: the outline variant must not inherit the gradient fill */
.btn-hero.outline { background: transparent; }
.btn-hero.outline:hover { background: var(--brand); }

/* collapsible list rows (content items) */
.item-row { border: 1px solid var(--line); border-radius: 12px; margin-bottom: .6rem; background: rgba(255,255,255,.015); }
.item-row > summary { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; color: var(--text); }
.item-row > summary b { flex: 1; }
.item-row > summary .caret { color: var(--muted); font-size: .75rem; transition: transform .15s; }
.item-row[open] > summary { border-bottom: 1px solid var(--line); }
.item-row[open] > summary .caret { transform: rotate(180deg); }
.item-row > form:first-of-type { padding: 1.1rem 1rem; }
.oc-seg.fit > a, .oc-seg.fit > button { flex: 0 0 auto; }
/* decorative glows of public sections never widen the page on phones */
.cta, .about, .stats, .services { overflow: hidden; }
.table a:not(.btn) { text-decoration: none; font-weight: 600; }
.table a:not(.btn):hover { text-decoration: underline; }

/* first-run setup */
.setup-page { background: radial-gradient(900px 400px at 80% -10%, rgba(244,145,86,.14), transparent), var(--bg); }
.setup-wrap { max-width: 760px; margin: 0 auto; padding: 2.5rem 1rem 4rem; width: 100%; }
.setup-brand { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.setup-brand h1 { font-size: 1.35rem; margin: 0; }
.setup-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 1.25rem; overflow-x: auto; scrollbar-width: none; }
.setup-steps li { flex: 1 1 0; min-width: 96px; }
.setup-steps a, .setup-steps .s { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .6rem .3rem; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .8rem; text-align: center; border: 1px solid transparent; }
.setup-steps b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-3); color: var(--text); font-size: .8rem; }
.setup-steps a:hover { background: var(--bg-2); color: #fff; }
.setup-steps li.on .s { color: var(--brand); border-color: rgba(244,145,86,.35); background: var(--brand-soft); font-weight: 700; }
.setup-steps li.on b { background: var(--brand); color: #fff; }
.setup-page .panel { padding: 1.75rem; }
/* left-to-right values inside right-to-left tables stay real table cells */
td.ltr, th.ltr { display: table-cell; text-align: right; }

/* short links */
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .7rem .9rem; margin-bottom: 1rem; border-radius: 12px; background: var(--brand-soft); border: 1px solid rgba(244,145,86,.35); }
.bulk-bar[hidden] { display: none; }
.links-table .link-target { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-chart { width: 100%; height: 240px; display: block; }
.oc-chart .g { stroke: rgba(255,255,255,.07); stroke-width: 1; vector-effect: non-scaling-stroke; }
.oc-chart .l { fill: none; stroke: var(--brand); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.oc-chart .d { fill: var(--bg-2); stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; }
.oc-chart .t { fill: var(--muted); font-size: 12px; font-family: Tajawal, sans-serif; }
.bars { display: flex; flex-direction: column; gap: .55rem; }
.bars .b { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .75rem; font-size: .88rem; }
.bars .b i { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--bg-3); overflow: hidden; display: block; }
.bars .b i::after { content: ""; display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 6px; }
.og-card { border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #fff; color: #1c1e21; max-width: 520px; direction: rtl; }
.og-card .img { aspect-ratio: 1.91 / 1; background: #e4e6eb center / cover no-repeat; display: grid; place-items: center; color: #8a8d91; font-size: 2rem; }
.og-card .body { padding: .7rem .9rem; background: #f0f2f5; }
.og-card .host { font-size: .72rem; color: #65676b; text-transform: uppercase; direction: ltr; text-align: right; }
.og-card .tt { font-weight: 700; font-size: .98rem; margin: .1rem 0; }
.og-card .dd { font-size: .85rem; color: #65676b; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.short-preview { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .7rem .9rem; border-radius: 10px; background: var(--bg-3); border: 1px dashed var(--line-2); font-size: .95rem; }
.short-preview b { color: var(--brand); }
/* row selection: a real square checkbox, not a switch */
input[type="checkbox"].pick { width: 18px !important; height: 18px !important; border-radius: 5px !important; }
input[type="checkbox"].pick::after { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 11px; color: #fff; background: none; width: auto; height: auto; top: 50%; right: 50%; transform: translate(50%, -50%) scale(0); }
input[type="checkbox"].pick:checked::after { transform: translate(50%, -50%) scale(1); background: none; }

/* image library + picker */
.media-field { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.media-thumb { width: 168px; aspect-ratio: 1.91 / 1; border-radius: 10px; border: 1px dashed var(--line-2); background: var(--bg-3) center / cover no-repeat; color: var(--muted); font-size: 1.6rem; display: grid; place-items: center; cursor: pointer; padding: 0; }
.media-thumb:hover { border-color: var(--brand); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.media-pick { padding: 0; border: 2px solid transparent; border-radius: 12px; background: var(--bg-3); overflow: hidden; text-align: start; color: var(--text); cursor: pointer; display: flex; flex-direction: column; }
.media-pick:hover, .media-pick.on { border-color: var(--brand); }
.media-pick .img, .media-card .img { display: block; aspect-ratio: 1.91 / 1; background: #0b0f13 center / cover no-repeat; }
.media-pick .cap { padding: .4rem .6rem; font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-card { margin: 0; border-radius: 12px; overflow: hidden; background: var(--bg-3); border: 1px solid var(--line); }
.media-card figcaption { padding: .55rem .7rem; display: flex; flex-direction: column; gap: .25rem; font-size: .82rem; }
.media-card .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.media-card form { display: inline; }
.media-field.contain .media-thumb { background-size: contain; background-color: #0b0f13; background-origin: content-box; padding: 8px; }

/* ------------------------------------------------------------------ public form builder: one card per field */
.ff-list { display: grid; gap: .6rem; }
.ff-row { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .85rem; background: rgba(255,255,255,.015); }
.ff-row:not(.on) .ff-body { display: none; }
.ff-row:not(.on) { opacity: .75; }
.ff-head { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .7rem; }
.ff-head > b { color: #fff; }
.ff-head > small { color: var(--muted); font-size: .78rem; }
.ff-sw { margin-inline-start: auto; display: flex; gap: 1.1rem; }
.ff-sw .oc-switch { align-items: center; }
.ff-body { margin-top: .5rem; }

/* ------------------------------------------------------------------ drag & drop (sortable.js: mouse + touch) */
.kanban-card, li[data-board], .board-list tr[data-item], .kanban-col-head { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.kanban-card { cursor: grab; }
.oc-press { transform: scale(.98); transition: transform .3s; }
.oc-dragging { opacity: .35; outline: 2px dashed rgba(244,145,86,.6); outline-offset: -2px; }
.oc-saving { opacity: .7; }
.oc-drag-ghost { position: fixed !important; top: 0; left: 0; z-index: 3000; pointer-events: none; margin: 0 !important; opacity: .95;
  box-shadow: 0 16px 40px rgba(0,0,0,.5); transform-origin: center; rotate: 1.5deg; }
.oc-drag-ghost-row { background: var(--bg-3); color: #fff; border: 1px solid var(--brand); border-radius: 10px; padding: .6rem .9rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.oc-sorting, body.oc-sorting * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.oc-drop { background: rgba(244,145,86,.06); border-radius: 10px; }
.grip { color: var(--muted); opacity: .55; cursor: grab; font-size: .85em; }
.kanban-col-head .grip { margin-inline-end: .2rem; }
.drag-hint { color: var(--muted); font-size: .82rem; margin: 0 0 .6rem; }
.drag-hint .fa { color: var(--brand); }
@media (pointer: coarse) { .mouse-only { display: none; } }
@media (pointer: fine) { .touch-only { display: none; } }
/* boards tree */
.boards-tree .tree-board .grip { flex-shrink: 0; }
.boards-tree .tree:has(> li[data-board]) > .tree-empty { display: none; }
.boards-tree .tree-empty { border: 1px dashed var(--line-2, rgba(255,255,255,.12)); border-radius: 10px; margin: .25rem 0; }
.boards-tree .tree-root { margin-top: .4rem; }
.boards-tree .tree-folder > summary .folder-grip { padding: .35rem .2rem; margin: -.35rem 0; touch-action: none; }
/* list view grouped by column */
.board-list tr.grp th { background: rgba(255,255,255,.03); font-weight: 700; color: #fff; border-top: 1px solid var(--line); padding: .55rem .75rem; }
.board-list .grp-name::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, #6B7280); margin-inline-end: .45rem; }
.board-list .grp .count { color: var(--muted); font-weight: 400; font-size: .8rem; }
.board-list tbody.oc-drop tr.grp th { background: rgba(244,145,86,.12); }
.board-list tr[data-item] td:first-child { min-width: 220px; }
.board-list tr[data-item] { cursor: grab; }
.table-lines td:first-child { min-width: 190px; } .table-lines td { min-width: 96px; }
.table-responsive, :has(> select.oc-enhanced) { position: relative; }
