/* ============================================================
   Orange Tamkeen Marketplace — tamkeen.css
   Arabic RTL — Orange Egypt Branding
   ============================================================ */

/* ── Google Fonts (Cairo — best Arabic web font) ────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --orange:        #FF6600;
  --orange-dark:   #CC5200;
  --orange-light:  #FF8533;
  --orange-pale:   #FFF0E6;
  --navy:          #1B3F6B;
  --navy-light:    #2455A4;
  --success:       #2E7D32;
  --warning:       #F9A825;
  --danger:        #C62828;
  --info:          #0277BD;
  --text-main:     #1A1A1A;
  --text-muted:    #666666;
  --text-light:    #999999;
  --bg-body:       #F6F7FB;
  --bg-card:       #FFFFFF;
  --bg-sidebar:    #1B3F6B;
  --border:        #E0E0E0;
  --shadow-sm:     0 2px 6px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.15);
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --sidebar-w:     260px;
  --topbar-h:      64px;
  --font:          'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

/* ── Base Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  direction: rtl;
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body:has(.tk-wrapper) { overflow: hidden; height: 100vh; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.4; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

a { color: var(--orange); text-decoration: none; transition: color .2s; }
a:hover { color: var(--orange-dark); }

/* ── ========================================================= */
/* ── LAYOUT: SIDEBAR + MAIN ─────────────────────────────────── */
/* ── ========================================================= */
.tk-wrapper { min-height: 100vh; }

/* ── Sidebar ────────────────────────────────────────────────── */
.tk-sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; right: 0;
  z-index: 1050;
  transition: transform .3s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,.2);
}

.tk-sidebar__logo {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}
.tk-sidebar__logo img { width: 42px; height: auto; }
.tk-sidebar__logo-text { color: #fff; }
.tk-sidebar__logo-text .name { font-size: 1rem; font-weight: 800; }
.tk-sidebar__logo-text .tagline { font-size: .72rem; opacity: .7; }

.tk-sidebar__nav { flex: 1; overflow-y: auto; padding: .5rem 0; min-height: 0; }

.tk-sidebar__section-label {
  color: rgba(255,255,255,.45);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .55rem 1.25rem .2rem;
}

.tk-nav-item { display: block; }

.tk-nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem 1.25rem;
  color: rgba(255,255,255,.78);
  font-size: .84rem;
  font-weight: 500;
  border-radius: 0;
  transition: all .2s;
  position: relative;
  text-decoration: none;
}
.tk-nav-link i { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.tk-nav-link:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  text-decoration: none;
}
.tk-nav-link.active {
  background: var(--orange);
  color: #fff;
  font-weight: 700;
}
.tk-nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #fff;
  border-radius: 0 4px 4px 0;
}
.tk-nav-badge {
  margin-right: auto;
  background: var(--orange);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: .1rem .45rem;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}
.tk-nav-link.active .tk-nav-badge { background: #fff; color: var(--orange); }

.tk-sidebar__footer {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: .65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-shrink: 0;
}
.tk-sidebar__footer .user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--orange);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .9rem;
  overflow: hidden; flex-shrink: 0;
}
.tk-sidebar__footer .user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tk-sidebar__footer .user-info { flex: 1; min-width: 0; }
.tk-sidebar__footer .user-name { color: #fff; font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-sidebar__footer .user-role { color: rgba(255,255,255,.55); font-size: .72rem; }
.tk-sidebar__footer .btn-logout { color: rgba(255,255,255,.55); font-size: 1.1rem; transition: color .2s; }
.tk-sidebar__footer .btn-logout:hover { color: #ff8080; }

/* ── Main content area ──────────────────────────────────────── */
.tk-main {
  margin-right: var(--sidebar-w);
  height: 100vh;
  overflow-y: auto;
}

/* ── Topbar ─────────────────────────────────────────────────── */
.tk-topbar {
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 900;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}
.tk-topbar__toggle {
  display: none;
  background: none; border: none;
  font-size: 1.4rem; color: var(--text-main); cursor: pointer;
}
.tk-topbar__title { font-weight: 700; font-size: 1.05rem; flex: 1; }
.tk-topbar__actions { display: flex; align-items: center; gap: .5rem; }

.tk-notif-btn {
  position: relative;
  background: var(--bg-body); border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-main); font-size: 1rem; cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.tk-notif-btn:hover { background: var(--orange-pale); border-color: var(--orange); color: var(--orange); }
.tk-notif-dot {
  position: absolute;
  top: 6px; left: 6px;
  width: 9px; height: 9px;
  background: var(--orange);
  border-radius: 50%;
  border: 2px solid #fff;
}

/* ── Content area ───────────────────────────────────────────── */
.tk-content { padding: 1.75rem; }

/* ── ========================================================= */
/* ── COMPONENTS ─────────────────────────────────────────────── */
/* ── ========================================================= */

/* ── Page header ─────────────────────────────────────────────── */
.tk-page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: .75rem;
}
.tk-page-header h1 { font-size: 1.4rem; color: var(--text-main); margin: 0; }
.tk-page-header .breadcrumb { margin: 0; background: none; padding: 0; font-size: .83rem; }

/* ── Stat cards ─────────────────────────────────────────────── */
.tk-stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
  transition: box-shadow .2s, transform .2s;
  position: relative;
  overflow: hidden;
}
.tk-stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tk-stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 4px; height: 100%;
  background: var(--orange);
}
.tk-stat-card--navy::before  { background: var(--navy); }
.tk-stat-card--success::before { background: var(--success); }
.tk-stat-card--info::before    { background: var(--info); }
.tk-stat-card--warning::before { background: var(--warning); }

.tk-stat-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  background: var(--orange-pale); color: var(--orange);
}
.tk-stat-card--navy  .tk-stat-icon { background: #EAF0FA; color: var(--navy); }
.tk-stat-card--success .tk-stat-icon { background: #E8F5E9; color: var(--success); }
.tk-stat-card--info    .tk-stat-icon { background: #E1F5FE; color: var(--info); }
.tk-stat-card--warning .tk-stat-icon { background: #FFF8E1; color: var(--warning); }

.tk-stat-body { flex: 1; min-width: 0; }
.tk-stat-body .value { font-size: 1.8rem; font-weight: 800; line-height: 1; color: var(--text-main); }
.tk-stat-body .label { font-size: .82rem; color: var(--text-muted); margin-top: .2rem; }
.tk-stat-body .trend { font-size: .75rem; margin-top: .3rem; }
.tk-stat-body .trend.up   { color: var(--success); }
.tk-stat-body .trend.down { color: var(--danger); }

/* ── Cards ───────────────────────────────────────────────────── */
.tk-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.tk-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.tk-card-header h3 { font-size: 1rem; font-weight: 700; margin: 0; color: var(--text-main); }
.tk-card-body { padding: 1.25rem; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-orange {
  background: var(--orange); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: .55rem 1.25rem;
  font-family: var(--font); font-weight: 600; font-size: .9rem;
  cursor: pointer; transition: all .2s; display: inline-flex;
  align-items: center; gap: .4rem;
}
.btn-orange:hover { background: var(--orange-dark); color: #fff; }

.btn-navy {
  background: var(--navy); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: .55rem 1.25rem;
  font-family: var(--font); font-weight: 600; font-size: .9rem;
  cursor: pointer; transition: all .2s; display: inline-flex;
  align-items: center; gap: .4rem;
}
.btn-navy:hover { background: var(--navy-light); color: #fff; }

.btn-outline-orange {
  background: transparent; color: var(--orange);
  border: 1.5px solid var(--orange);
  border-radius: var(--radius-sm); padding: .55rem 1.25rem;
  font-family: var(--font); font-weight: 600; font-size: .9rem;
  cursor: pointer; transition: all .2s; display: inline-flex;
  align-items: center; gap: .4rem;
}
.btn-outline-orange:hover { background: var(--orange); color: #fff; }

/* ── Status badges ───────────────────────────────────────────── */
.tk-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .22rem .75rem; border-radius: 20px;
  font-size: .76rem; font-weight: 600;
}
.tk-badge-active    { background: #E8F5E9; color: #2E7D32; }
.tk-badge-pending   { background: #FFF8E1; color: #F57F17; }
.tk-badge-rejected  { background: #FFEBEE; color: #C62828; }
.tk-badge-draft     { background: #F3F4F6; color: #555; }
.tk-badge-closed    { background: #E3F2FD; color: #0277BD; }
.tk-badge-suspended { background: #FFF3E0; color: #E65100; }

/* ── Tables ──────────────────────────────────────────────────── */
.tk-table-wrap { overflow-x: auto; }
.tk-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tk-table th {
  background: var(--bg-body); color: var(--text-muted);
  font-weight: 700; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .04em; padding: .8rem 1rem;
  border-bottom: 2px solid var(--border); text-align: right;
  white-space: nowrap;
}
.tk-table td {
  padding: .85rem 1rem; border-bottom: 1px solid var(--border);
  vertical-align: middle; text-align: right;
  color: var(--text-main);
}
.tk-table tbody tr:hover { background: #FAFBFF; }
.tk-table tbody tr:last-child td { border-bottom: none; }

/* ── Forms ───────────────────────────────────────────────────── */
.tk-form-group { margin-bottom: 1.1rem; }
.tk-form-group label {
  display: block; margin-bottom: .35rem;
  font-weight: 600; font-size: .88rem; color: var(--text-main);
}
.tk-form-group label .required { color: var(--orange); }
.tk-input, .tk-select, .tk-textarea {
  width: 100%; padding: .65rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font); font-size: .9rem; color: var(--text-main);
  background: var(--bg-card);
  transition: border-color .2s, box-shadow .2s;
  direction: rtl; text-align: right;
}
.tk-input:focus, .tk-select:focus, .tk-textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,102,0,.12);
}
.tk-input::placeholder { color: var(--text-light); }
.tk-input.is-invalid { border-color: var(--danger); }
.tk-form-feedback { font-size: .8rem; margin-top: .25rem; }
.tk-form-feedback.error { color: var(--danger); }
.tk-form-feedback.success { color: var(--success); }

/* ── Alerts ──────────────────────────────────────────────────── */
.tk-alert {
  border-radius: var(--radius-sm); padding: .85rem 1.1rem;
  display: flex; align-items: flex-start; gap: .65rem;
  font-size: .88rem; margin-bottom: 1rem;
  border-right: 4px solid;
}
.tk-alert i { margin-top: .1rem; flex-shrink: 0; }
.tk-alert-success { background: #E8F5E9; color: #1B5E20; border-color: var(--success); }
.tk-alert-warning { background: #FFF8E1; color: #7B5800; border-color: var(--warning); }
.tk-alert-danger  { background: #FFEBEE; color: #7F0000; border-color: var(--danger); }
.tk-alert-info    { background: #E3F2FD; color: #01579B; border-color: var(--info); }

/* ── Product / Service cards ─────────────────────────────────── */
.tk-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  height: 100%;
  display: flex; flex-direction: column;
}
.tk-item-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.tk-item-card__img {
  height: 190px; background: var(--bg-body);
  overflow: hidden; position: relative;
}
.tk-item-card__img img { width: 100%; height: 100%; object-fit: cover; }
.tk-item-card__img .tk-badge { position: absolute; top: .75rem; right: .75rem; }
.tk-item-card__body { padding: 1rem 1.1rem; flex: 1; }
.tk-item-card__body h5 { font-size: .95rem; font-weight: 700; margin-bottom: .4rem; }
.tk-item-card__body p  { font-size: .82rem; color: var(--text-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tk-item-card__footer {
  padding: .75rem 1.1rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.tk-item-card__price { font-size: 1rem; font-weight: 800; color: var(--orange); }
.tk-item-card__price span { font-size: .75rem; font-weight: 400; color: var(--text-muted); }

/* ── Quick action buttons ────────────────────────────────────── */
.tk-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .75rem;
}
.tk-quick-action {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem .75rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.tk-quick-action:hover {
  border-color: var(--orange); background: var(--orange-pale);
  transform: translateY(-2px);
}
.tk-quick-action i { font-size: 1.5rem; color: var(--orange); }
.tk-quick-action span { font-size: .82rem; font-weight: 600; color: var(--text-main); }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb-item.active { color: var(--orange); }
.breadcrumb-item + .breadcrumb-item::before { content: '‹'; }

/* ── Auth pages ──────────────────────────────────────────────── */
.tk-auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy) 0%, #0F2645 50%, #1a1a2e 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.tk-auth-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
  overflow: hidden;
}
.tk-auth-card__header {
  background: var(--orange);
  padding: 2rem 2rem 1.5rem;
  text-align: center;
}
.tk-auth-card__header img { height: 52px; }
.tk-auth-card__header h1 { color: #fff; font-size: 1.2rem; margin-top: .75rem; font-weight: 800; }
.tk-auth-card__header p  { color: rgba(255,255,255,.8); font-size: .83rem; margin: .2rem 0 0; }
.tk-auth-card__body { padding: 2rem; }

/* ── Sidebar mobile overlay ──────────────────────────────────── */
.tk-sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1040;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .tk-sidebar {
    transform: translateX(100%);
  }
  .tk-sidebar.open {
    transform: translateX(0);
  }
  .tk-sidebar-overlay.open { display: block; }
  .tk-main { margin-right: 0; }
  .tk-topbar__toggle { display: flex; }
  .tk-content { padding: 1rem; }
  .tk-stat-card { padding: 1rem; }
  .tk-stat-body .value { font-size: 1.4rem; }
}

@media (max-width: 575.98px) {
  .tk-auth-card { margin: 0; }
  .tk-page-header { flex-direction: column; align-items: flex-start; }
}

/* ── Utilities ───────────────────────────────────────────────── */
.text-orange { color: var(--orange) !important; }
.text-navy   { color: var(--navy)   !important; }
.bg-orange   { background: var(--orange) !important; }
.bg-navy     { background: var(--navy)   !important; }
.fw-800 { font-weight: 800; }

.divider-orange {
  border: none; border-top: 2px solid var(--orange);
  margin: 1.25rem 0; opacity: .4;
}

/* ── Scrollbar (sidebar) ─────────────────────────────────────── */
.tk-sidebar__nav::-webkit-scrollbar { width: 4px; }
.tk-sidebar__nav::-webkit-scrollbar-track { background: transparent; }
.tk-sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 4px; }

/* ── Scrollbar (main content) ───────────────────────────────── */
.tk-main::-webkit-scrollbar { width: 8px; }
.tk-main::-webkit-scrollbar-track { background: var(--bg-body); }
.tk-main::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.tk-main::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ── ========================================================= */
/* ── FLOATING PAGE NAVIGATOR ───────────────────────────────── */
/* ── ========================================================= */

/* Section nav (auto-generated from .tk-card-header h3) */
.tk-page-nav {
  position: fixed;
  left: 1.25rem;
  top: calc(var(--topbar-h) + 1.5rem);
  z-index: 800;
  width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: .5rem 0;
  direction: rtl;
  max-height: calc(100vh - var(--topbar-h) - 3rem);
  overflow-y: auto;
  transition: opacity .2s, transform .2s;
}
.tk-page-nav.tk-page-nav--collapsed {
  width: auto;
  padding: .35rem;
}
.tk-page-nav__title {
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: .25rem .85rem .4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tk-page-nav__toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .75rem;
  padding: 0;
  line-height: 1;
}
.tk-page-nav__toggle:hover { color: var(--orange); }
.tk-page-nav__item {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .85rem;
  font-size: .76rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  border-right: 3px solid transparent;
  transition: all .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tk-page-nav__item:hover {
  color: var(--orange);
  background: var(--orange-pale);
}
.tk-page-nav__item--active {
  color: var(--orange);
  font-weight: 700;
  border-right-color: var(--orange);
  background: var(--orange-pale);
}
.tk-page-nav__item i {
  font-size: .65rem;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
  opacity: .7;
}

/* Back to top button */
.tk-back-top {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 800;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background .2s, transform .2s;
}
.tk-back-top:hover { background: var(--orange-dark); transform: translateY(-2px); }
.tk-back-top.visible { display: flex; }

/* Keyboard shortcut hints */
.tk-page-nav__kbd {
  font-size: .58rem;
  color: var(--text-light);
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0 .25rem;
  margin-right: auto;
  font-family: monospace;
}

/* Hide on small screens and when not enough sections */
@media (max-width: 1399.98px) {
  .tk-page-nav { display: none !important; }
}
@media (max-width: 575.98px) {
  .tk-back-top { left: .75rem; bottom: .75rem; width: 36px; height: 36px; }
}

/* ── ========================================================= */
/* ── SHARED COMPONENTS (v2) ────────────────────────────────── */
/* ── ========================================================= */

/* ── Checkbox label ─────────────────────────────────────────── */
.tk-checkbox-label {
  display: flex; align-items: center; gap: .5rem;
  cursor: pointer; font-size: .85rem; color: var(--text-main);
  padding: .2rem 0;
}
.tk-checkbox-label input[type="checkbox"] {
  accent-color: var(--orange);
  width: 16px; height: 16px; cursor: pointer; flex-shrink: 0;
}

/* ── Modal ──────────────────────────────────────────────────── */
.tk-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: tkFadeIn .2s ease;
}
.tk-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: tkSlideUp .25s ease;
  direction: rtl;
}
.tk-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.tk-modal__header h3 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.tk-modal__close {
  background: none; border: none; font-size: 1.5rem;
  color: var(--text-muted); cursor: pointer; line-height: 1;
  padding: 0; transition: color .2s;
}
.tk-modal__close:hover { color: var(--danger); }
.tk-modal__body { padding: 1.25rem 1.5rem; overflow-y: auto; flex: 1; }
.tk-modal__footer {
  padding: .85rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-start; gap: .75rem;
}

@keyframes tkFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes tkSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ── Dropzone (file upload) ─────────────────────────────────── */
.tk-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  background: var(--bg-body);
  transition: border-color .2s, background .2s;
}
.tk-dropzone:hover,
.tk-dropzone--hover {
  border-color: var(--orange);
  background: var(--orange-pale);
}
.tk-dropzone__icon {
  font-size: 2rem; color: var(--orange);
  display: block; margin-bottom: .5rem;
}
.tk-dropzone__label { font-weight: 700; font-size: .9rem; color: var(--text-main); margin-bottom: .2rem; }
.tk-dropzone__hint  { font-size: .73rem; color: var(--text-muted); }

.tk-dropzone-preview {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem;
}
.tk-dropzone-preview__item {
  position: relative;
  width: 72px; height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bg-body);
}
.tk-dropzone-preview__item img {
  width: 100%; height: 100%; object-fit: cover;
}
.tk-dropzone-preview__item .tk-dropzone-preview__name {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: .6rem; padding: .15rem .3rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tk-dropzone-preview__item .tk-dropzone-preview__remove {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--danger); color: #fff;
  border: none; cursor: pointer;
  font-size: .6rem; display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* ── Existing files list ────────────────────────────────────── */
.tk-existing-files { display: flex; flex-direction: column; gap: .35rem; }
.tk-existing-file {
  display: flex; align-items: center; justify-content: space-between;
  padding: .4rem .6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .82rem;
  background: var(--bg-body);
}
.tk-existing-file__link {
  display: flex; align-items: center; gap: .4rem;
  color: var(--text-main); text-decoration: none;
  min-width: 0; flex: 1;
}
.tk-existing-file__link span {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tk-existing-file__icon { color: var(--orange); flex-shrink: 0; }
.tk-existing-file__remove {
  display: flex; align-items: center; gap: .3rem;
  color: var(--danger); cursor: pointer; font-size: .72rem;
  flex-shrink: 0;
}
.tk-existing-file__remove input { accent-color: var(--danger); }

/* ── Notification dropdown (topbar) ─────────────────────────── */
.tk-notif-dropdown { position: relative; }

.tk-notif-dot {
  position: absolute;
  top: 4px; left: 4px;
  min-width: 16px; height: 16px;
  background: var(--orange);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  color: #fff;
  font-size: .58rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

.tk-notif-panel {
  display: none;
  position: absolute;
  left: 0; top: calc(100% + 8px);
  min-width: 340px;
  max-height: 450px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  z-index: 1100;
  overflow: hidden;
  animation: tkSlideUp .2s ease;
}
.tk-notif-panel.open { display: block; }

.tk-notif-panel__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: .92rem;
}
.tk-notif-panel__mark-read { font-size: .72rem; color: var(--orange); text-decoration: none; }
.tk-notif-panel__mark-read:hover { text-decoration: underline; }

.tk-notif-panel__body { max-height: 340px; overflow-y: auto; }

.tk-notif-panel__empty {
  padding: 2rem 1rem; text-align: center;
  color: var(--text-muted); font-size: .85rem;
}
.tk-notif-panel__empty i { display: block; font-size: 1.5rem; margin-bottom: .5rem; }

.tk-notif-item {
  display: flex; align-items: flex-start; gap: .65rem;
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text-main);
  transition: background .15s;
}
.tk-notif-item:hover { background: var(--bg-body); }
.tk-notif-item--unread { background: var(--orange-pale); }
.tk-notif-item--unread:hover { background: #FFE4CC; }

.tk-notif-item__icon {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--orange-pale); color: var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem;
}
.tk-notif-item__content { flex: 1; min-width: 0; }
.tk-notif-item__title { font-size: .82rem; font-weight: 600; line-height: 1.4; }
.tk-notif-item--unread .tk-notif-item__title { font-weight: 700; }
.tk-notif-item__time { font-size: .68rem; color: var(--text-muted); margin-top: .15rem; }
.tk-notif-item__time i { margin-left: .25rem; }

.tk-notif-panel__footer {
  display: block; text-align: center;
  padding: .65rem; font-size: .82rem;
  color: var(--orange); text-decoration: none;
  border-top: 1px solid var(--border);
  font-weight: 600;
}
.tk-notif-panel__footer:hover { background: var(--bg-body); color: var(--orange-dark); }
.tk-notif-panel__footer i { margin-right: .3rem; }

/* ── Pagination ─────────────────────────────────────────────── */
.tk-pagination { margin-top: 1.5rem; }
.tk-pagination ul {
  display: flex; align-items: center; justify-content: center;
  gap: .3rem; list-style: none; padding: 0; margin: 0;
}
.tk-pagination ul li a,
.tk-pagination ul li span {
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 .5rem;
  border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--border);
  color: var(--text-main);
  background: var(--bg-card);
  transition: all .2s;
}
.tk-pagination ul li a:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-pale);
}
.tk-pagination--active {
  background: var(--orange) !important;
  border-color: var(--orange) !important;
  color: #fff !important;
}
.tk-pagination--disabled {
  opacity: .4; cursor: default; pointer-events: none;
}
.tk-pagination__dots {
  border: none !important; background: none !important;
  color: var(--text-muted) !important; font-size: 1rem;
}

.tk-pagination-info {
  font-size: .82rem; color: var(--text-muted);
  margin-bottom: .75rem;
}

/* ── Status tabs (filter buttons) ───────────────────────────── */
.tk-status-tabs {
  display: flex; gap: .5rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.tk-status-tab {
  display: inline-flex; align-items: center;
  padding: .4rem 1rem;
  border-radius: 20px;
  font-size: .82rem; font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--border);
  color: var(--text-main);
  background: var(--bg-card);
  transition: all .2s;
}
.tk-status-tab:hover { border-color: var(--orange); color: var(--orange); }
.tk-status-tab--active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* ── Table search input ─────────────────────────────────────── */
.tk-table-search { max-width: 320px; }
.tk-table-search__input { padding-right: 2.5rem !important; }
.tk-table-search__icon {
  position: absolute;
  right: .85rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}

/* ── Avatar upload ──────────────────────────────────────────── */
.tk-avatar-upload__preview:hover { border-color: var(--orange) !important; }

/* ── Scrollbar (notification panel) ─────────────────────────── */
.tk-notif-panel__body::-webkit-scrollbar { width: 4px; }
.tk-notif-panel__body::-webkit-scrollbar-track { background: transparent; }
.tk-notif-panel__body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── Responsive tweaks for new components ───────────────────── */
@media (max-width: 575.98px) {
  .tk-notif-panel { min-width: 290px; left: auto; right: -60px; }
  .tk-modal { margin: .5rem; }
  .tk-status-tabs { gap: .3rem; }
  .tk-status-tab { padding: .3rem .7rem; font-size: .75rem; }
  .tk-pagination ul li a,
  .tk-pagination ul li span { min-width: 32px; height: 32px; font-size: .78rem; }
}
