
/* ShobKaaj - Base Styles (rearranged & consolidated)
  Sections:
  1) Variables
  2) Dark mode variables
  3) Reset / Base layout
  4) Typography
  5) Container / responsive padding
  6) Navbar / topbar
  7) Buttons
  8) Forms
  9) Building blocks (card, grid, list, table, badge, avatar, footer)
  10) Navbar components (menu, user menu, language, notification)
  11) Responsive rules
  12) Dropdowns & misc
*/

/* 1) VARIABLES (primary large set + legacy shims) */
:root{
  /* Core neutrals */
  --bg: #ffffff;
  --surface: #fafafa;
  --surface-elevated: #ffffff;
  --text: #0d1117;
  --text-secondary: #656d76;
  --text-muted: #8b949e;
  --muted: var(--text-muted);
  --line: #d0d7de;
  --hover: #f6f8fa;
  --hover-secondary: #eaeef2;

  /* Brand / Primary */
  --primary: #335733;
  --primary-hover: #2d4b2d;
  --primary-active: #274027;
  --primary-subtle: #e8f3ec;
  --primary-muted: #4a7c59;

  /* Button/legacy */
  --btn: var(--primary);
  --btn-600: var(--primary-hover);
  --btn-700: var(--primary-active);
  --btn-outline-hover: var(--hover-secondary);

  /* Semantic */
  --error: #da3633;
  --error-subtle: #ffebe9;
  --error-muted: #ff7b72;
  --warning: #fb8500;
  --warning-subtle: #fff4e6;
  --warning-muted: #ffab40;
  --success: #1a7f37;
  --success-subtle: #dcffe4;
  --success-muted: #4ac26b;
  --info: #0969da;
  --info-subtle: #ddf4ff;
  --info-muted: #54aeff;

  /* Form */
  --input-focus-border: var(--primary);
  --error-text: var(--error);
  --success-text: var(--success);
  --file-input-bg: var(--surface);
  --file-input-text: var(--text);
  --file-input-hover-bg: var(--hover);

  /* Badge / table / chat / status */
  --badge-bg: var(--surface);
  --badge-text: var(--text-secondary);
  --badge-border: var(--line);
  --table-header-bg: #f0f0f0;
  --table-header-text: #0d1321;
  --table-row-hover: #f0f0f0;
  --conv-hover: #f0f0f0;
  --conv-active: #e0e0e0;
  --conv-active-border: #c0c0c0;
  --message-bg: #e8e8e8;
  --message-me-bg: #d8d8d8;
  --message-me-border: #c0c0c0;
  --message-arrow-border: #c0c0c0;
  --status-open-bg: #e0e0e0;
  --status-open-border: #c0c0c0;
  --status-open-text: #151a21;
  --status-assigned-bg: #e0e0e0;
  --status-assigned-border: #c0c0c0;
  --status-assigned-text: #161a21;
  --status-completed-bg: #e0e0e0;
  --status-completed-border: #c0c0c0;
  --status-completed-text: #1b1f26;
  --star-color: #c0c0c0;
  --star-active-color: #808080;
  --notification-unread-bg: #e0e0e0;
  --notification-unread-border: #c0c0c0;

  /* Spacing / radii / shadows */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px;
  --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --radius-xl: 24px; --radius-full: 999px;
  --shadow-xs: 0 1px 2px rgba(13,17,23,0.04);
  --shadow-sm: 0 2px 8px rgba(13,17,23,0.06);
  --shadow-md: 0 4px 16px rgba(13,17,23,0.08);
  --shadow-lg: 0 8px 32px rgba(13,17,23,0.10);
  --shadow-xl: 0 16px 48px rgba(13,17,23,0.12);

  /* Ring */
  --ring-primary: 0 0 0 3px rgba(51,87,51,0.2);
  --ring-error: 0 0 0 3px rgba(218,54,51,0.2);
  --ring: var(--ring-primary);

  /* Typography scale */
  --fs-xs: 12px; --fs-sm: 14px; --fs-base: 16px; --fs-lg: 18px; --fs-xl: 20px;
  --fs-2xl: 24px; --fs-3xl: 30px; --fs-4xl: 36px; --fs-5xl: 48px;
  --fs-5: var(--fs-xs); --fs-4: var(--fs-base); --fs-3: var(--fs-lg);
  --fs-2: var(--fs-xl); --fs-1: var(--fs-4xl);
  --lh-tight: 1.25; --lh-snug: 1.375; --lh-normal: 1.5; --lh-relaxed: 1.625; --lh-loose: 2;
  --lh: var(--lh-normal);
  --fw-light: 300; --fw-normal: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700; --fw-extrabold: 800;

  /* Animation */
  --duration-fast: 0.15s; --duration-normal: 0.2s; --duration-slow: 0.3s;
  --ease-out: cubic-bezier(0.215,0.610,0.355,1); --ease-in-out: cubic-bezier(0.645,0.045,0.355,1);
  --ease-spring: cubic-bezier(0.175,0.885,0.32,1.275);

  /* Minimal compatibility overrides (kept from earlier minimal theme) */
  --bg-app: #f5f7fb; /* backup app background used by legacy rules if needed */
}

/* 2) DARK MODE VARIABLES (system preference only when no manual theme) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
   --bg: #0d1117;
   --surface: #161b22;
   --surface-elevated: #21262d;
   --text: #f0f6fc;
   --text-secondary: #8b949e;
   --text-muted: #656d76;
   --line: #30363d;
   --hover: #21262d;
   --hover-secondary: #30363d;

   --primary: #4a7c59;
   --primary-hover: #335733;
   --primary-active: #2d4b2d;
   --primary-subtle: #1a2e1a;
   --primary-muted: #335733;

   --error: #f85149;
   --error-subtle: #2d1617;
   --success: #4a7c59;
   --info: #58a6ff;

   --table-header-bg: #1f2732;
   --table-header-text: #e8e9ec;
   --table-row-hover: #1f2732;

   --conv-hover: #1f2732;
   --conv-active: #2a323d;
   --conv-active-border: #3e4c5a;
   --message-bg: #1f2732;
   --message-me-bg: #2a323d;
   --message-me-border: #3e4c5a;
   --message-arrow-border: #1f2732;

   --status-open-bg: #2a323d; --status-open-border: #3e4c5a; --status-open-text: #e8e9ec;
   --status-assigned-bg: #2a323d; --status-assigned-border: #3e4c5a; --status-assigned-text: #e8e9ec;
   --status-completed-bg: #2a323d; --status-completed-border: #3e4c5a; --status-completed-text: #e8e9ec;

   --star-color: #3e4c5a; --star-active-color: #667085;
   --notification-unread-bg: #2a323d; --notification-unread-border: #3e4c5a;

   --shadow-xs: 0 1px 2px rgba(0,0,0,0.4);
   --shadow-sm: 0 2px 8px rgba(0,0,0,0.5);
   --shadow-md: 0 4px 16px rgba(0,0,0,0.6);
   --shadow-lg: 0 8px 32px rgba(0,0,0,0.7);
   --shadow-xl: 0 16px 48px rgba(0,0,0,0.8);

   --ring-primary: 0 0 0 3px rgba(51,87,51,0.3);
   --ring: var(--ring-primary);
  }
}

/* 2.1) THEME TOGGLE SYSTEM */
[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-elevated: #21262d;
  --text: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #656d76;
  --line: #30363d;
  --hover: #21262d;
  --hover-secondary: #30363d;

  --primary: #4a7c59;
  --primary-hover: #335733;
  --primary-active: #2d4b2d;
  --primary-subtle: #1a2e1a;
  --primary-muted: #335733;

  --error: #f85149;
  --error-subtle: #2d1617;
  --success: #4a7c59;
  --info: #58a6ff;

  --table-header-bg: #1f2732;
  --table-header-text: #e8e9ec;
  --table-row-hover: #1f2732;

  --conv-hover: #1f2732;
  --conv-active: #2a323d;
  --conv-active-border: #3e4c5a;
  --message-bg: #1f2732;
  --message-me-bg: #2a323d;
  --message-me-border: #3e4c5a;
  --message-arrow-border: #1f2732;

  --status-open-bg: #2a323d; --status-open-border: #3e4c5a; --status-open-text: #e8e9ec;
  --status-assigned-bg: #2a323d; --status-assigned-border: #3e4c5a; --status-assigned-text: #e8e9ec;
  --status-completed-bg: #2a323d; --status-completed-border: #3e4c5a; --status-completed-text: #e8e9ec;

  --star-color: #3e4c5a; --star-active-color: #667085;
  --notification-unread-bg: #2a323d; --notification-unread-border: #3e4c5a;
  
  --ring-primary: rgba(74, 124, 89, 0.3);
  --ring: var(--ring-primary);
}

/* Theme toggle button styles */
.theme-toggle {
  background: none;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-secondary);
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-subtle);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform var(--duration-fast) var(--ease-out);
}

.theme-toggle:hover svg {
  transform: scale(1.1);
}

/* 3) RESET + BASE LAYOUT */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  line-height: var(--lh);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

/* Responsive images and media */
img, video, picture, canvas, svg {
  max-width: 100%;
  height: auto;
  display: block; /* Remove extra space below images */
}

/* 4) TYPOGRAPHY */
h1 { font-size: var(--fs-4xl); font-weight: var(--fw-extrabold); line-height: var(--lh-tight); margin: 0 0 var(--space-3); letter-spacing: -0.025em; }
h2 { font-size: var(--fs-2xl); font-weight: var(--fw-bold); line-height: var(--lh-snug); margin: 0 0 var(--space-3); letter-spacing: -0.015em; }
h3 { font-size: var(--fs-xl); font-weight: var(--fw-semibold); line-height: var(--lh-snug); margin: 0 0 var(--space-2); }
h4 { font-size: var(--fs-lg); font-weight: var(--fw-semibold); line-height: var(--lh-normal); margin: 0 0 var(--space-2); }
h5 { font-size: var(--fs-base); font-weight: var(--fw-semibold); line-height: var(--lh-normal); margin: 0 0 var(--space-1); }
h6 { font-size: var(--fs-sm); font-weight: var(--fw-semibold); line-height: var(--lh-normal); margin: 0 0 var(--space-1); text-transform: uppercase; letter-spacing: 0.05em; }
p { margin: 0 0 var(--space-4); line-height: var(--lh-relaxed); }
.small { font-size: var(--fs-5); color: var(--muted); }
a { color: var(--primary); text-decoration: none; transition: color var(--duration-fast) var(--ease-out); }
a:hover { color: var(--primary-hover); text-decoration: underline; }
a:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

/* 5) CONTAINER */
.container { max-width: 1200px; margin: 0 auto; padding: var(--space-4); }
@media (min-width: 640px) { .container { padding: var(--space-6); } }
@media (min-width: 1024px) { .container { padding: var(--space-8); } }

/* 6) NAVBAR / TOPBAR (core) */
.navbar, .topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: transparent !important;
  box-shadow: none !important; 
  transition: all var(--duration-normal) var(--ease-out);

}
@media (prefers-color-scheme: dark) {
  .navbar:not([data-theme]), .topbar:not([data-theme]) { background: linear-gradient(180deg, rgba(18, 24, 33, 0), rgba(18, 24, 33, 0)); }
}
.navbar .inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 36px; }
.brand { font-weight: 800; color: var(--text); letter-spacing: .2px; font-size: 30px; }

/* scrolled state */
.navbar.scrolled { background: rgba(255,255,255,0.98); box-shadow: var(--shadow-md); }
@media (prefers-color-scheme: dark) { 
  .navbar.scrolled:not([data-theme]) { background: rgba(13,17,23,0.98); } 
}
[data-theme="dark"] .navbar.scrolled { background: rgba(13,17,23,0.98); }

/* 7) BUTTONS (consolidated) */
.btn{
  height: var(--space-10);
  padding: 0 var(--space-4);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  background: linear-gradient(135deg, var(--primary) );
  border: 1px solid var(--primary); color: #ffffff;
  border-radius: var(--radius); cursor: pointer; font-size: var(--fs-sm); font-weight: var(--fw-medium);
  line-height: 1; transition: all var(--duration-fast) var(--ease-out); box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.btn::before{ content:''; position:absolute; inset:0; color: white; background: transparent; opacity:0; transition: opacity var(--duration-fast) var(--ease-out); }
.btn:hover{ background: var(--primary) ; transform: translateY(-1px); box-shadow: var(--shadow-md);color: #ffffff; font-weight: bolder; }
.btn:hover::before{ opacity:1; }
.btn:active{ transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn:focus-visible{ outline:none; box-shadow: var(--ring), var(--shadow-md); }
.btn:disabled{ opacity:.5; cursor:not-allowed; transform:none; box-shadow: var(--shadow-xs); }
.btn.outline{ background:transparent; color:var(--text); border:1px solid var(--line); box-shadow:none; }
.btn.outline:hover{ background:var(--primary); color:#ffffff; border-color:var(--primary); box-shadow:var(--shadow-sm); }
.btn.ghost{ background:transparent; border:none; color:var(--text); box-shadow:none; }
.btn.destructive{ background: linear-gradient(135deg, var(--error) 0%, var(--error-muted) 100%); border-color:var(--error); color:#fff; }
.btn.primary-action{ padding: var(--space-2) var(--space-4); background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%); border:none; font-weight:var(--fw-semibold); box-shadow:var(--shadow-sm); }
.btn.sm{ height: var(--space-8); padding: 0 var(--space-3); font-size: var(--fs-sm); border-radius: var(--radius); }
.btn.lg{ height: var(--space-12); padding: 0 var(--space-6); font-size: var(--fs-base); border-radius: var(--radius-lg); font-weight: var(--fw-semibold); }
.btn.xs{ height: var(--space-6); padding: 0 var(--space-2); font-size: var(--fs-xs); border-radius: var(--radius-sm); }

/* 8) FORMS */
.input, select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: var(--radius); font-size: var(--fs-sm); font-weight: var(--fw-normal); line-height: var(--lh-normal);
  transition: all var(--duration-fast) var(--ease-out); margin: var(--space-2) 0 var(--space-4);
}
.input, select { height: var(--space-12); padding: 0 var(--space-4); }
textarea { padding: var(--space-3) var(--space-4); min-height: 96px; resize: vertical; line-height: var(--lh-relaxed); }
.input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: .9; }
.input:focus, select:focus, textarea:focus { outline:none; border-color: var(--primary); box-shadow: var(--ring); background: var(--surface-elevated); }
.input:invalid, select:invalid, textarea:invalid { border-color: var(--error); }
.input:disabled, select:disabled, textarea:disabled { opacity:.6; cursor:not-allowed; background: var(--hover); }
.label { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text); margin-bottom: var(--space-1); display:block; }
.label-optional { color: var(--text-muted); font-weight: var(--fw-normal); }
.label-required::after { content: ' *'; color: var(--error); }
.select-arrow { background-repeat:no-repeat; background-position: right var(--space-3) center; background-size:16px; padding-right:var(--space-10); appearance: none; cursor:pointer; }
select { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23656d76" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6,9 12,15 18,9"></polyline></svg>'); }
select:focus { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23335733" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6,9 12,15 18,9"></polyline></svg>'); }

/* 9) BUILDING BLOCKS */
.card {
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--space-6); box-shadow: var(--shadow-xs); transition: all var(--duration-fast) var(--ease-out); position:relative; overflow:hidden;
}
.card::before{ content:''; position:absolute; top:0; left:0; right:0; height:2px; background: linear-gradient(90deg, var(--primary), var(--primary-muted)); opacity:0; transition: opacity var(--duration-normal) var(--ease-out); }
.card:hover{ box-shadow: var(--shadow-md); border-color: var(--text-muted); transform: translateY(-1px); }
.card:hover::before{ opacity:1; }
.card.elevated{ background: var(--surface-elevated); box-shadow: var(--shadow-sm); }
.grid{ display:grid; gap: var(--space-4); }
.grid.cols-2{ grid-template-columns: repeat(2,1fr); }
.grid.cols-3{ grid-template-columns: repeat(3,1fr); }
.grid.cols-4{ grid-template-columns: repeat(4,1fr); }
@media (max-width: 768px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }
.list{ display:flex; flex-direction:column; gap:var(--space-3); }
.item{ border:1px solid var(--line); background:var(--surface); border-radius:var(--radius); padding:var(--space-4); display:flex; gap:var(--space-4); align-items:flex-start; transition: all var(--duration-fast) var(--ease-out); position:relative; }
.item:hover{ border-color:var(--text-muted); box-shadow:var(--shadow-sm); transform:translateY(-1px); }
.item.active{ border-color:var(--primary); background:var(--primary-subtle); }
.badge{ padding: var(--space-1) var(--space-3); border-radius:var(--radius-full); font-size:var(--fs-xs); font-weight:var(--fw-medium); border:1px solid var(--badge-border); background:var(--badge-bg); color:var(--badge-text); display:inline-flex; gap:var(--space-1); }
.badge.primary{ background:var(--primary-subtle); color:var(--primary); border-color:var(--primary); }
.badge.success{ background:var(--success-subtle); color:var(--success); border-color:var(--success); }
.table{ width:100%; border-collapse:separate; border-spacing:0; overflow:hidden; border-radius:12px; }
.table th, .table td{ border:1px solid var(--line); padding:12px; text-align:left; }
.table th{ background:var(--table-header-bg); color:var(--table-header-text); position: sticky; top:0; z-index:1; }
.table tbody tr:hover td{ background: var(--table-row-hover); }
.avatar{ width:40px; height:40px; border-radius:50%; object-fit:cover; border:1px solid var(--line); background:var(--surface); }
.avatar.lg{ width:84px; height:84px; }
.footer{ color:var(--muted); font-size:14px; text-align:center; padding:20px; }

/* 10) NAVBAR COMPONENTS: menu / actions / user / language / bell */
.nav-links{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.nav-links a{ padding:8px 10px; border-radius:10px; transition: background .2s, transform .06s; }
.nav-links a:hover{ background: #eef1f600; transform: translateY(-1px); }
.navbar-container{ display:flex; align-items:center; justify-content:space-between; padding: var(--space-3) var(--space-4); max-width:1200px; margin:0 auto; position:relative; }

.mobile-menu-toggle{ display:none; flex-direction:column; gap:4px; padding:8px; background:transparent; border:0; cursor:pointer; z-index:1001; }
.hamburger-line{ width:22px; height:2px; background:var(--text); border-radius:2px; transition: all var(--duration-normal) var(--ease-out); }
.mobile-menu-toggle.active .hamburger-line:nth-child(1){ transform: rotate(45deg) translate(6px,6px); }
.mobile-menu-toggle.active .hamburger-line:nth-child(2){ opacity:0; }
.mobile-menu-toggle.active .hamburger-line:nth-child(3){ transform: rotate(-45deg) translate(6px,-6px); }

/* nav items */
.navbar-menu{ display:flex; align-items:center; justify-content:space-between; flex:1; gap:var(--space-6); margin-left:var(--space-8); }
.navbar-nav{ display:flex; gap:var(--space-2); align-items:center; }
.nav-item{ display:flex; align-items:center; gap:var(--space-2); padding: var(--space-2) var(--space-4); border-radius:var(--radius); font-weight:var(--fw-medium); font-size:var(--fs-sm); color:var(--text-secondary); text-decoration:none; transition: all var(--duration-fast) var(--ease-out); position:relative; white-space:nowrap; }
.nav-item:hover{ background:var(--hover); color:var(--text); transform:translateY(-1px); }
.nav-item.active{ color:var(--primary); background:var(--primary-subtle); font-weight:var(--fw-semibold); }
.nav-item.active::after{ content:''; position:absolute; bottom:-2px; left:50%; transform:translateX(-50%); width:50%; height:2px; background:var(--primary); border-radius:1px; }

/* navbar actions */
.navbar-actions{ display:flex; align-items:center; gap:var(--space-4); }

/* user menu */
.user-menu-container{ position:relative; }
.user-menu-toggle{ display:flex; align-items:center; gap:var(--space-3); padding:var(--space-2); background:transparent; border:1px solid transparent; border-radius:var(--radius); cursor:pointer; transition: all var(--duration-fast) var(--ease-out); min-width:0; }
.user-avatar{ width:32px; height:32px; border-radius:var(--radius-full); object-fit:cover; border:2px solid var(--line); transition: all var(--duration-fast) var(--ease-out); }
.user-avatar-large{ width:48px; height:48px; border-radius:var(--radius-lg); object-fit:cover; border:2px solid var(--primary); }
.user-info{ display:flex; flex-direction:column; align-items:flex-start; min-width:0; }
.user-name{ font-weight:var(--fw-medium); font-size:var(--fs-sm); color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100px; }
.user-role{ font-size:var(--fs-xs); color:var(--text-muted); text-transform:capitalize; }

/* user dropdown */
.user-menu-dropdown{
  position:absolute; top: calc(100% + var(--space-2)); right:0; width:280px; background:var(--surface-elevated); border:1px solid var(--line);
  border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); opacity:0; visibility:hidden; transform:translateY(-8px) scale(.95); transition: all var(--duration-normal) var(--ease-out); z-index:1000;
}
.user-menu-dropdown.active{ opacity:1; visibility:visible; transform:translateY(0) scale(1); }
.user-menu-header{ display:flex; align-items:center; gap:var(--space-3); padding:var(--space-4); border-bottom:1px solid var(--line); }
.user-details{ flex:1; min-width:0; }
.user-name-large{ display:block; font-weight:var(--fw-semibold); font-size:var(--fs-base); color:var(--text); margin-bottom:var(--space-1); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-email{ display:block; font-size:var(--fs-xs); color:var(--text-muted); margin-bottom:var(--space-1); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-role-badge{ display:inline-block; padding:2px var(--space-2); background:var(--primary-subtle); color:var(--primary); font-size:var(--fs-xs); font-weight:var(--fw-medium); border-radius:var(--radius); text-transform:capitalize; }
.user-menu-actions{ padding:var(--space-2); }
.user-menu-item{ display:flex; align-items:center; gap:var(--space-3); width:100%; padding:var(--space-3); background:transparent; border:none; border-radius:var(--radius); font-size:var(--fs-sm); color:var(--text-secondary); cursor:pointer; transition: all var(--duration-fast) var(--ease-out); text-decoration:none; }
.user-menu-item:hover{ background:var(--hover); color:var(--text); }
.user-menu-item.logout-btn{ color:var(--error); border-top:1px solid var(--line); margin-top:var(--space-2); padding-top:var(--space-3); }
.user-menu-item.logout-btn:hover{ background:var(--error-subtle); color:var(--error); }

/* language selector */
.langSelect{ position:relative; }
.lang-select{ appearance:none; background: transparent; padding:0 var(--space-10) }
.lang-select:focus{ background: transparent; outline:none; box-shadow: var(--ring); }

/* 11) RESPONSIVE RULES (mobile / tablet) */
@media (max-width: 1024px) {
  .form-row { grid-template-columns: 1fr; }
  .navbar .inner { gap: var(--space-4); padding: var(--space-2) var(--space-4); }
  .nav-center { display: none; }
  .nav-links { gap: var(--space-2); }
  .user-details { display: none; }
  .user-menu { padding: var(--space-1); }
}

@media (max-width: 768px) {
  .mobile-menu-toggle{ display:flex; }
  .nav-links{ position:absolute; top:100%; left:0; right:0; background:var(--surface-elevated); border-bottom:1px solid var(--line); box-shadow:var(--shadow-md); display:none; flex-direction:column; align-items:stretch; padding:10px; }
  .nav-links.open{ display:flex; }
  .nav-links a, .nav-links .btn, .nav-links .btn.outline{ width:100%; justify-content:flex-start; }
  .navbar-menu{ position: fixed; top: 100%; left:0; right:0; background:var(--surface-elevated); border-top:1px solid var(--line); box-shadow:var(--shadow-xl); transform:translateY(-100%); opacity:0; visibility:hidden; transition: all var(--duration-normal) var(--ease-out); flex-direction:column; align-items:stretch; padding:var(--space-4); margin-left:0; gap:var(--space-4); max-height:calc(100vh - 80px); overflow-y:auto; }
  .navbar-menu.active{ transform:translateY(0); opacity:1; visibility:visible; }
  .navbar-nav{ flex-direction:column; gap:var(--space-2); width:100%; }
  .nav-item{ justify-content:flex-start; padding:var(--space-4); font-size:var(--fs-base); border-radius:var(--radius-lg); }
  .nav-icon{ font-size:var(--fs-lg); }
  .navbar-actions{ flex-direction:column; gap:var(--space-4); width:100%; border-top:1px solid var(--line); padding-top:var(--space-4); }
  .user-menu-toggle{ width:100%; justify-content:flex-start; padding:var(--space-4); border:1px solid var(--line); border-radius:var(--radius-lg); }
  .user-menu-dropdown{ position: static; width:100%; margin-top:var(--space-2); transform:none; opacity:1; visibility:visible; box-shadow:none; border:1px solid var(--line); }
  .auth-buttons{ flex-direction:column; width:100%; gap:var(--space-2); }
  .auth-buttons .btn{ width:100%; justify-content:center; padding:var(--space-4); font-size:var(--fs-base); }
  .btn.primary-action{ width:100%; justify-content:center; padding:var(--space-4); font-size:var(--fs-base); }
  .lang-select{ width:100%; padding:var(--space-4); font-size:var(--fs-base); }
  .user-name{ max-width:none; }
  .navbar .inner { gap: var(--space-3); padding: var(--space-2) var(--space-3); }
}

@media (max-width: 640px) {
  .navbar .inner { padding: var(--space-2); flex-wrap:wrap; justify-content:center; }
  .brand { order:1; flex: 0 0 auto; }
  .nav-end { order:2; flex: 0 0 auto; }
  .nav-center { order:3; flex: 1 0 100%; display:flex; justify-content:center; margin-top:var(--space-2); }
  .nav-links{ justify-content:center; gap:var(--space-4); }
}

/* Additional Mobile Responsiveness */

/* General adjustments for smaller screens */
@media (max-width: 768px) {
  main {
    padding: var(--space-4); /* Adjust main content padding */
  }

  /* Make tables scrollable */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-responsive .table {
    white-space: nowrap; /* Prevent text wrapping in table cells */
  }

  /* Adjust card padding for smaller screens */
  .card {
    padding: var(--space-4);
  }

  /* Form row stacking */
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  /* Adjust padding for very small screens */
  main {
    padding: var(--space-3);
  }

  /* Adjust .item layout for jobs and workers pages */
  #results .item, #jobs .item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
  #results .item > div:first-child, #jobs .item > div:first-child {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }
  #results .item > div:last-child, #jobs .item > div:last-child {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-left: 0;
    margin-top: var(--space-2);
  }

  /* Chat layout adjustments */
  .chat {
    grid-template-columns: 1fr; /* Single column layout */
    height: auto; /* Allow height to adjust */
  }
  .conv-list {
    height: 30vh; /* Give conversation list some height */
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .messages {
    height: auto;
    min-height: 60vh; /* Ensure message area has enough height */
  }
  .message {
    max-width: 90%; /* Adjust message bubble width */
  }
}

/* 12) DROPDOWNS, PULSING, MISC */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

/* Avatar dropdown / generic dropdown */
.avatar-dropdown{ position:relative; display:inline-block; }
.dropdown-content{
  display:none; position:absolute; background-color:var(--surface-elevated); min-width:160px; box-shadow:var(--shadow-lg); z-index:1;
  right:0; border-radius:var(--radius-lg); padding:var(--space-2); border:1px solid var(--line);
}
.dropdown-content a, .dropdown-content button{
  color:var(--text); padding:var(--space-3); text-decoration:none; display:block; width:100%; text-align:left; border:none; background:none; border-radius:var(--radius);
}
.dropdown-content a:hover, .dropdown-content button:hover{ background-color:var(--hover); }
.show{ display:block; }

/* Utility helpers */
body.menu-open { overflow: hidden; }
.form-row{ display:grid; grid-template-columns: repeat(2, 1fr); gap:14px; }
.form-actions{ display:flex; gap:var(--space-3); align-items:center; flex-wrap:wrap; }
.field { position:relative; }
.field-hint{ font-size:var(--fs-xs); color:var(--text-muted); margin-top:var(--space-1); }
