:root {
  --primary: #101d23;
  --secondary: #12a99b;
  --white: #FFFFFF;
  --bg: #f5f7fa;
  --card-bg: #FFFFFF;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  --nav-bg: #101d23;
  --input-bg: #f9fafb;
}

[data-theme="dark"] {
  --bg: #0d1117;
  --card-bg: #161b22;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --border: #30363d;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.4);
  --input-bg: #21262d;
  --nav-bg: #010409;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { overflow-x: hidden; }

body {
  font-family: 'Tajawal', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

.navbar {
  background: var(--nav-bg);
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: none;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 700;
}

.nav-logo-img { width: 36px; height: 36px; object-fit: contain; filter: brightness(0) invert(1); }

.nav-menu { display: flex; align-items: center; gap: 0.25rem; }

.nav-link {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active { color: var(--white); background: rgba(255,255,255,0.1); }
.nav-admin { color: var(--secondary) !important; }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.nav-icon-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  position: relative;
  transition: all 0.2s;
  text-decoration: none;
}

.nav-icon-btn:hover { color: var(--white); background: rgba(255,255,255,0.1); }

.notif-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  background: var(--error);
  color: white;
  font-size: 0.65rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
}

.nav-user-dropdown { position: relative; }

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--white);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}

.nav-user-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: 0.5rem 0;
  display: none;
  z-index: 100;
}

.dropdown-menu.open { display: block; }

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s;
}

.dropdown-menu a:hover { background: var(--bg); }

.main-content { padding: 2rem 0; min-height: calc(100vh - 120px); }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h1 { font-size: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.stat-card:hover { transform: translateY(-2px); }

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: white;
}

.bg-primary { background: var(--secondary); }
.bg-success { background: var(--success); }
.bg-warning { background: var(--warning); }
.bg-error { background: var(--error); }
.bg-muted { background: var(--text-muted); }

.stat-info h3 { font-size: 1.5rem; line-height: 1.2; }
.stat-info p { color: var(--text-muted); font-size: 0.85rem; }

.quick-actions { margin-bottom: 2rem; }
.quick-actions h2 { margin-bottom: 1rem; font-size: 1.2rem; }

.actions-grid, .admin-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.action-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: all 0.2s;
  border: 2px solid transparent;
}

.action-card:hover { border-color: var(--secondary); transform: translateY(-2px); }
.action-card i { font-size: 1.5rem; color: var(--secondary); }
.action-card span { font-weight: 500; }

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

.dashboard-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.dashboard-section h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  display: block;
  border: 1px solid var(--border);
}

.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.card-header h3 { font-size: 1rem; }
.card-text { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.card-footer { display: flex; justify-content: space-between; align-items: center; }

.list-items { display: flex; flex-direction: column; gap: 0.5rem; }

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  gap: 1rem;
  transition: background 0.2s;
}

.list-item:hover { background: var(--bg); }
.list-item-info { flex: 1; min-width: 0; }
.list-item-info strong { display: block; margin-bottom: 0.2rem; }
.list-item-info p { color: var(--text-muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.notif-item.unread { border-right: 3px solid var(--secondary); background: rgba(18,169,155,0.05); }

.notif-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
}

.notif-success { background: var(--success); }
.notif-info { background: var(--info); }
.notif-warning { background: var(--warning); }
.notif-error { background: var(--error); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-primary { background: rgba(18,169,155,0.15); color: var(--secondary); }
.badge-success { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-error { background: rgba(239,68,68,0.15); color: var(--error); }
.badge-muted { background: rgba(107,114,128,0.15); color: var(--text-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary { background: var(--secondary); color: white; }
.btn-primary:hover { background: #0e8f83; }
.btn-outline { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn-outline:hover { border-color: var(--secondary); color: var(--secondary); }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 0.8rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.3rem 0.8rem; font-size: 0.8rem; }

.form-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-card h2 { margin-bottom: 1.5rem; font-size: 1.2rem; }
.form-card h3 { margin: 1.5rem 0 0.75rem; font-size: 1rem; color: var(--secondary); }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 500; font-size: 0.9rem; color: var(--text); }

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--input-bg);
  color: var(--text);
  transition: border-color 0.2s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--secondary);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-actions { display: flex; gap: 1rem; margin-top: 1.5rem; }

.form-control-sm {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  background: var(--input-bg);
  color: var(--text);
}

.select-sm {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.8rem;
  background: var(--input-bg);
  color: var(--text);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, #1a3a4a 100%);
}

.auth-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
}

.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-logo { width: 60px; margin-bottom: 1rem; }
.auth-header h1 { font-size: 1.4rem; margin-bottom: 0.3rem; }
.auth-header p { color: var(--text-muted); }

.auth-form { margin-bottom: 1.5rem; }
.auth-footer { text-align: center; color: var(--text-muted); margin-top: 1.5rem; }
.auth-footer a { color: var(--secondary); text-decoration: none; font-weight: 600; }

.auth-tabs {
  display: flex;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.auth-tab {
  flex: 1;
  padding: 0.75rem;
  border: none;
  background: var(--input-bg);
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.auth-tab:not(:last-child) { border-left: 1px solid var(--border); }
[dir="rtl"] .auth-tab:not(:last-child) { border-left: none; border-right: 1px solid var(--border); }
[dir="rtl"] .auth-tab:first-child { border-right: none; }
.auth-tab.active {
  background: var(--secondary);
  color: white;
}
.auth-tab:hover:not(.active) { background: var(--border); }
.auth-tab-content { display: none; }
.auth-tab-content.active { display: block; }

.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider span {
  padding: 0 1rem;
  white-space: nowrap;
}

.social-login-btns {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  width: 100%;
}
.btn-social:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.btn-google:hover { border-color: #4285F4; }
.btn-apple { background: #000; color: #fff; border-color: #000; }
.btn-apple:hover { background: #222; }
.btn-webauthn { border-color: var(--secondary); color: var(--secondary); }
.btn-webauthn:hover { background: var(--secondary); color: #fff; }

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-input-wrap input { padding-left: 2.5rem; width: 100%; }
[dir="rtl"] .password-input-wrap input { padding-left: 2.5rem; padding-right: 0.75rem; }
.password-toggle {
  position: absolute;
  left: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
}
[dir="rtl"] .password-toggle { left: 0.75rem; right: auto; }

.otp-inputs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  direction: ltr;
  margin: 1rem 0;
}
.otp-digit {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  transition: border-color 0.2s;
  font-family: monospace;
}
.otp-digit:focus {
  border-color: var(--secondary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(18,169,155,0.15);
}
.otp-info {
  text-align: center;
  padding: 1rem;
  background: rgba(18,169,155,0.08);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  color: var(--secondary);
}
.otp-info i { font-size: 1.5rem; margin-bottom: 0.5rem; display: block; }
.otp-demo {
  background: rgba(59,130,246,0.08);
  border: 1px dashed var(--info);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  text-align: center;
  color: var(--info);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.otp-timer {
  text-align: center;
  color: var(--text-muted);
  margin: 0.75rem 0;
  font-size: 0.9rem;
}
.btn-link {
  background: none;
  border: none;
  color: var(--secondary);
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-weight: 600;
  text-decoration: underline;
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

.nafath-info { text-align: center; margin-bottom: 1.5rem; }
.nafath-logo-wrap {
  width: 90px;
  height: 90px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nafath-logo-img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}
.nafath-tab-icon {
  width: 20px;
  height: 20px;
  object-fit: cover;
  border-radius: 4px;
  vertical-align: middle;
  display: inline-block;
}
.nafath-verify-box {
  text-align: center;
  padding: 2rem;
  background: var(--input-bg);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.nafath-phone-icon { font-size: 2.5rem; color: var(--secondary); margin-bottom: 1rem; }
.nafath-verify-box h3 { margin-bottom: 0.5rem; }
.nafath-code {
  font-size: 3rem;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: 0.5rem;
  margin: 1.5rem 0;
  font-family: monospace;
}
.nafath-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-muted);
}
.spinner-sm {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ltr-input { direction: ltr; text-align: left; }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }

.landing {
  min-height: 100vh;
}

.landing-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1a3a4a 50%, var(--secondary) 100%);
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 2rem;
}

.landing-content { max-width: 700px; }
.landing-logo { width: 100px; margin-bottom: 2rem; filter: brightness(0) invert(1); }
.landing-content h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.landing-subtitle { font-size: 1.2rem; opacity: 0.9; margin-bottom: 2rem; }
.landing-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.landing-buttons .btn-outline { color: white; border-color: rgba(255,255,255,0.5); }
.landing-buttons .btn-outline:hover { border-color: white; }

.landing-features { padding: 4rem 0; }

.section-title { text-align: center; font-size: 1.8rem; margin-bottom: 2.5rem; color: var(--text); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.feature-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.feature-card:hover { transform: translateY(-4px); }

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(18,169,155,0.1);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

.feature-card h3 { margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.info-row span:first-child { color: var(--text-muted); }

.chat-section .card { display: flex; flex-direction: column; height: 500px; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-msg { max-width: 80%; }
.msg-sent { align-self: flex-end; }
.msg-received { align-self: flex-start; }

.msg-sent .msg-header, .msg-sent p { text-align: left; }

.chat-msg p {
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.msg-sent p { background: var(--secondary); color: white; }
.msg-received p { background: var(--bg); }
.msg-header { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.msg-time { margin-right: 0.5rem; }

.chat-input {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.chat-input input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  background: var(--input-bg);
  color: var(--text);
}

.tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--border); padding-bottom: 0; }

.tab-btn {
  padding: 0.6rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
  margin-bottom: -2px;
}

.tab-btn.active { color: var(--secondary); border-bottom-color: var(--secondary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.price { color: var(--secondary); font-size: 1.1rem; }

.cart-total {
  text-align: left;
  padding: 1rem;
  font-size: 1.2rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill { height: 100%; background: var(--secondary); border-radius: 4px; transition: width 0.3s; }

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
}

.profile-info-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.profile-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-lg i { font-size: 3rem; color: rgba(255,255,255,0.9); }
.profile-avatar-section h2 { margin-bottom: 0.3rem; }

.role-badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.role-patient { background: rgba(18,169,155,0.15); color: var(--secondary); }
.role-doctor { background: rgba(59,130,246,0.15); color: var(--info); }
.role-pharmacist { background: rgba(245,158,11,0.15); color: var(--warning); }
.role-company { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.role-employee { background: rgba(107,114,128,0.15); color: var(--text-muted); }
.role-admin { background: rgba(239,68,68,0.15); color: var(--error); }
.role-moderator { background: rgba(239,68,68,0.1); color: #dc2626; }
.role-insurance_agent { background: rgba(16,185,129,0.15); color: var(--success); }

.profile-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}
.profile-tab {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.profile-tab.active { background: var(--secondary); color: white; border-color: var(--secondary); }
.profile-tab:hover:not(.active) { border-color: var(--secondary); color: var(--secondary); }
.profile-tab-content { display: none; }
.profile-tab-content.active { display: block; }

.device-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}
.device-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(18,169,155,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 1.2rem;
  flex-shrink: 0;
}
.device-info { flex: 1; }
.device-info strong { display: block; margin-bottom: 0.2rem; }

.history-list { max-height: 500px; overflow-y: auto; }
.history-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.history-item:last-child { border-bottom: none; }
.history-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-success { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-error { background: rgba(239,68,68,0.15); color: var(--error); }
.badge-info { background: rgba(59,130,246,0.15); color: var(--info); }
.history-info { flex: 1; }

.info-box {
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--info);
  margin-bottom: 1.5rem;
}
.security-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.security-section h3 { margin-bottom: 0.3rem; }
.security-section p { margin-bottom: 0.75rem; }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.loading-sm {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  padding: 1rem;
}
.btn-danger { background: var(--error); color: white; border: none; border-radius: var(--radius-sm); cursor: pointer; padding: 0.4rem 0.8rem; }

.complaint-response {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(18,169,155,0.1);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.care-team-layout {
  display: flex;
  height: calc(100vh - 80px);
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.care-sidebar {
  width: 320px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
}

.care-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

.care-sidebar-header h3 {
  font-size: 1rem;
  margin: 0;
}

.btn-new-chat {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--secondary);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.btn-new-chat:hover { background: #0e8a7f; }

.care-dept-tabs {
  display: flex;
  gap: 4px;
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.dept-tab {
  padding: 4px 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.2s;
}

.dept-tab.active {
  background: var(--secondary);
  color: white;
}

.care-conv-list {
  flex: 1;
  overflow-y: auto;
}

.conv-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}

.conv-item:hover { background: rgba(18,169,155,0.08); }
.conv-item.active { background: rgba(18,169,155,0.15); }

.conv-avatar-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.conv-info {
  flex: 1;
  min-width: 0;
}

.conv-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-preview {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.conv-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.conv-badge {
  font-size: 0.6rem;
  padding: 1px 6px;
  border-radius: 10px;
}

.conv-badge.escalated {
  background: #f59e0b;
  color: #000;
}

.care-chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.care-chat-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

.btn-toggle-sidebar {
  display: none;
  border: none;
  background: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

.staff-profile {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 1;
}

.staff-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.staff-info { flex: 1; }

.staff-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.staff-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.chat-header-actions {
  display: flex;
  gap: 8px;
}

.btn-chat-action {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-chat-action:hover {
  background: var(--secondary);
  color: white;
}

.care-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 2rem;
}

.welcome-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), #0e8a7f);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.welcome-icon i {
  font-size: 2rem;
  color: white;
}

.welcome-screen h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.welcome-screen p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 400px;
  margin-bottom: 2rem;
}

.welcome-services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 400px;
  width: 100%;
}

.service-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  font-family: inherit;
  color: var(--text);
}

.service-card:hover {
  background: rgba(18,169,155,0.1);
  border-color: var(--secondary);
  transform: translateY(-2px);
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(18,169,155,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.6rem;
}

.service-icon i {
  font-size: 1.1rem;
  color: var(--secondary);
}

.service-name {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.service-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.care-msg {
  display: flex;
  gap: 0.6rem;
  max-width: 80%;
  animation: msgFade 0.3s ease;
}

@keyframes msgFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-staff { align-self: flex-start; }
.msg-user { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.msg-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msg-sender {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--secondary);
  padding: 0 4px;
}

.msg-bubble {
  padding: 0.7rem 1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.msg-staff .msg-bubble {
  background: rgba(255,255,255,0.08);
  border-top-right-radius: 4px;
}

.msg-user .msg-bubble {
  background: var(--secondary);
  color: white;
  border-top-left-radius: 4px;
}

.msg-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  padding: 0 4px;
}

.msg-user .msg-time { text-align: left; }
.msg-staff .msg-time { text-align: right; }

.typing-bubble {
  padding: 0.8rem 1.2rem;
}

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.care-actions-bar {
  display: flex;
  gap: 8px;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--border);
  overflow-x: auto;
}

.action-btn {
  padding: 6px 14px;
  background: rgba(18,169,155,0.12);
  border: 1px solid var(--secondary);
  border-radius: 20px;
  color: var(--secondary);
  font-size: 0.8rem;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.2s;
  font-family: inherit;
}

.action-btn:hover {
  background: var(--secondary);
  color: white;
}

.care-input {
  display: flex;
  gap: 8px;
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--border);
  align-items: center;
}

.btn-attach {
  width: 38px;
  height: 38px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.btn-attach:hover {
  color: var(--secondary);
  background: rgba(18,169,155,0.1);
}

.care-input input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 2px solid var(--border);
  border-radius: 24px;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--input-bg);
  color: var(--text);
  transition: border-color 0.2s;
}

.care-input input:focus {
  outline: none;
  border-color: var(--secondary);
}

.btn-send {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--secondary);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.btn-send:hover { background: #0e8a7f; }
.btn-send:disabled { opacity: 0.5; cursor: not-allowed; }

.report-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.report-modal-content {
  background: var(--card-bg);
  border-radius: var(--radius);
  width: 100%;
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.report-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.report-modal-header h3 { margin: 0; font-size: 1rem; }

.btn-close-modal {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}

.report-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  line-height: 1.8;
}

.report-header-info {
  text-align: center;
  margin-bottom: 1rem;
}

.report-text {
  font-size: 0.9rem;
}

.report-loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.report-modal-footer {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.text-error { color: #ef4444; text-align: center; }

@media (max-width: 768px) {
  .care-team-layout { flex-direction: column; height: calc(100vh - 60px); }
  .care-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    z-index: 999;
    transition: right 0.3s;
    border-left: none;
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
  }
  .care-sidebar.show { right: 0; }
  .btn-toggle-sidebar { display: block; }
  .welcome-services { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .care-msg { max-width: 90%; }
}

.empty-state, .empty-state-lg {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.empty-state i, .empty-state-lg i { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.empty-state-lg { padding: 4rem 2rem; }
.empty-state-lg h3 { margin-bottom: 0.5rem; }

.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-content h1 { font-size: 5rem; color: var(--secondary); }
.error-content h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.error-content p { color: var(--text-muted); margin-bottom: 1.5rem; }

.text-muted { color: var(--text-muted); font-size: 0.85rem; }

.table-responsive { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table th, .table td {
  padding: 0.75rem 1rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.table th { background: var(--bg); font-weight: 600; white-space: nowrap; }

.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 2000;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.3s ease;
  max-width: 90%;
}

.toast-success { background: var(--success); color: white; }
.toast-error { background: var(--error); color: white; }

.toast-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  margin-right: 0.5rem;
}

.notification-popup {
  position: fixed;
  top: 80px;
  left: 1rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  max-width: 350px;
  border-right: 4px solid var(--secondary);
  animation: slideDown 0.3s ease;
}

.notif-popup-content { display: flex; align-items: center; gap: 0.75rem; }
.notif-popup-content i { font-size: 1.3rem; color: var(--secondary); }
.notif-popup-content strong { display: block; margin-bottom: 0.2rem; }
.notif-popup-content p { font-size: 0.85rem; color: var(--text-muted); }

.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
}

.medicine-card .card-footer { margin-top: auto; }

.complaint-admin-item { flex-direction: column; align-items: stretch; gap: 0.75rem; }

@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    background: var(--nav-bg);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.open { display: flex; }
  .nav-user-name { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 0; }
  .landing-content h1 { font-size: 1.8rem; }
  .auth-card { padding: 1.5rem; }
  .otp-digit { width: 40px; height: 48px; font-size: 1.2rem; }
  .nafath-code { font-size: 2.2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .welcome-card { flex-direction: column-reverse; text-align: center; }
  .welcome-info h1 { font-size: 1.3rem; }
  .banner-arrow { width: 32px; height: 32px; font-size: 0.8rem; }
  .ai-features { flex-direction: column; }
  .actions-grid { grid-template-columns: repeat(2, 1fr); }
}

.welcome-section { margin-bottom: 1.5rem; }
.welcome-card {
  background: linear-gradient(135deg, var(--primary) 0%, #1a3a47 100%);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.welcome-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(18, 169, 155, 0.2) 0%, transparent 70%);
  border-radius: 50%;
}
.welcome-info h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.welcome-info p {
  opacity: 0.85;
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}
.wave-emoji {
  display: inline-block;
  animation: wave 1.5s ease-in-out infinite;
  transform-origin: 70% 70%;
}
@keyframes wave {
  0%,100% { transform: rotate(0deg); }
  25% { transform: rotate(20deg); }
  50% { transform: rotate(-10deg); }
  75% { transform: rotate(15deg); }
}
.account-status {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}
.status-pill.verified {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}
.status-pill.unverified {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}
.status-pill.role-pill {
  background: rgba(18, 169, 155, 0.2);
  color: #5eead4;
}
.welcome-avatar { position: relative; z-index: 1; }
.avatar-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(18, 169, 155, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(18, 169, 155, 0.5);
}
.avatar-circle i { font-size: 1.8rem; color: var(--secondary); }

.action-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(18, 169, 155, 0.1), rgba(18, 169, 155, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  transition: all 0.3s;
}
.action-card:hover .action-icon-wrap {
  background: var(--secondary);
}
.action-card:hover .action-icon-wrap i { color: #fff; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.section-header h2 { margin: 0; font-size: 1.1rem; }
.view-all-link {
  font-size: 0.85rem;
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.view-all-link:hover { text-decoration: underline; }

.list-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(18, 169, 155, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--secondary);
}
.notif-icon-urgent { background: rgba(239, 68, 68, 0.1); color: var(--error); }
.notif-icon-high { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.notif-important { border-right: 3px solid var(--error); }

.ai-assistant-card {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}
.ai-card-inner {
  background: linear-gradient(135deg, var(--primary) 0%, #1a3a47 50%, #0d2b35 100%);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ai-card-glow {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(18, 169, 155, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}
.ai-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(18, 169, 155, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  position: relative;
  z-index: 1;
  border: 2px solid rgba(18, 169, 155, 0.4);
}
.ai-icon-wrap i { font-size: 1.6rem; color: var(--secondary); }
.ai-card-inner h3 { font-size: 1.3rem; margin-bottom: 0.5rem; position: relative; z-index: 1; }
.ai-card-inner p { opacity: 0.85; font-size: 0.9rem; margin-bottom: 1.2rem; position: relative; z-index: 1; }
.btn-ai-start {
  position: relative;
  z-index: 1;
  padding: 0.7rem 2rem;
  font-size: 1rem;
}
.ai-features {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.2rem;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}
.ai-features span {
  font-size: 0.8rem;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.ai-features i { color: var(--secondary); font-size: 0.7rem; }

.phone-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  overflow: hidden;
  transition: border-color 0.3s;
}
.phone-input-wrap:focus-within {
  border-color: var(--secondary);
}
.phone-prefix {
  padding: 0.7rem 0.8rem;
  background: rgba(18, 169, 155, 0.1);
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  border-left: 1px solid var(--border);
  direction: ltr;
  user-select: none;
}
.phone-with-prefix {
  border: none !important;
  background: transparent !important;
  flex: 1;
  padding: 0.7rem;
}
.phone-with-prefix:focus {
  outline: none;
  box-shadow: none;
}
.field-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.admin-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.banner-upload-form .form-row {
  display: flex;
  gap: 1rem;
}

.file-upload-area {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
  background: var(--input-bg);
}
.file-upload-area:hover,
.file-upload-area.drag-over {
  border-color: var(--secondary);
  background: rgba(18, 169, 155, 0.05);
}
.file-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.file-upload-content {
  pointer-events: none;
}
.file-upload-content i {
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 0.8rem;
}
.file-upload-content p {
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.file-upload-content span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.file-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.banners-admin-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.banner-admin-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--input-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.3s;
}
.banner-admin-item.banner-inactive {
  opacity: 0.5;
}
.banner-admin-preview {
  position: relative;
  width: 120px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.banner-admin-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.banner-type-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}
.banner-admin-info {
  flex: 1;
  min-width: 0;
}
.banner-admin-title {
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.banner-admin-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.banner-admin-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.banner-edit-inline input {
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text);
}
.banner-admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.btn-warning {
  background: var(--warning);
  color: #fff;
  border: none;
  cursor: pointer;
}
.btn-error {
  background: var(--error);
  color: #fff;
  border: none;
  cursor: pointer;
}
.btn-success {
  background: var(--success);
  color: #fff;
  border: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  .banner-admin-item {
    flex-direction: column;
    align-items: stretch;
  }
  .banner-admin-preview {
    width: 100%;
    height: 100px;
  }
  .banner-edit-inline .form-row {
    flex-direction: column;
  }
  .banner-admin-actions {
    justify-content: flex-end;
  }
  .phone-prefix {
    padding: 0.6rem;
    font-size: 0.85rem;
  }
}

.nav-login-btn {
  padding: 0.4rem 1rem !important;
  font-size: 0.85rem !important;
  border-radius: 20px !important;
}

.landing {
  background: var(--primary);
  min-height: 100vh;
}

.landing-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #101d23 0%, #0a1318 40%, #091a1f 100%);
  text-align: center;
  padding: 2rem 1rem;
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(18, 169, 155, 0.4);
  animation: particleFloat 6s ease-in-out infinite;
}

@keyframes particleFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50% { transform: translateY(-30px) scale(1.3); opacity: 0.7; }
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(18,169,155,0.08) 0%, transparent 60%);
  z-index: 0;
}

.landing-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.logo-glow {
  display: inline-block;
  margin-bottom: 1.5rem;
  position: relative;
}

.logo-glow::after {
  content: '';
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18,169,155,0.3), transparent 70%);
  z-index: -1;
  animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0.8; }
}

.landing-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.hero-title {
  color: #fff;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.title-line { display: block; }
.title-accent {
  color: var(--secondary);
  font-size: 3.5rem;
  display: block;
  background: linear-gradient(135deg, #12a99b, #0fd4c4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 1.15rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.hero-stat { text-align: center; }

.hero-stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--secondary);
  direction: ltr;
}

.hero-stat-label {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.15);
}

.landing-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-lg {
  padding: 0.85rem 2rem !important;
  font-size: 1.05rem !important;
  border-radius: 12px !important;
}

.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(18,169,155,0.4), transparent, rgba(18,169,155,0.4));
  z-index: -1;
  animation: btnGlow 2s ease-in-out infinite;
}

@keyframes btnGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.btn-ghost {
  background: transparent !important;
  color: rgba(255,255,255,0.8) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.05) !important;
  color: #fff !important;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.4);
  font-size: 1.5rem;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

.landing-features {
  background: var(--bg);
  padding: 5rem 1rem;
}

.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  background: rgba(18,169,155,0.1);
  color: var(--secondary);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card-premium {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card-premium.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card-premium:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary);
}

.feature-card-glow {
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(18,169,155,0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), #1a3040);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.feature-card-premium h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.feature-card-premium p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.feature-arrow {
  margin-top: 1rem;
  color: var(--secondary);
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s;
}

.feature-card-premium:hover .feature-arrow {
  opacity: 1;
  transform: translateX(0);
}

.landing-cta {
  background: linear-gradient(160deg, #101d23, #0a1318);
  padding: 5rem 1rem;
}

.cta-card {
  text-align: center;
  background: linear-gradient(135deg, rgba(18,169,155,0.1), rgba(18,169,155,0.02));
  border: 1px solid rgba(18,169,155,0.2);
  border-radius: 24px;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(18,169,155,0.15), transparent 70%);
  pointer-events: none;
}

.cta-card h2 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta-card p {
  color: rgba(255,255,255,0.6);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.landing-footer {
  background: #080d10;
  padding: 2rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}

.footer-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.5;
}

.footer-copy { color: rgba(255,255,255,0.3); font-size: 0.8rem; }

.hero-banner-wrap {
  position: relative;
  margin-top: -2rem;
  width: 100%;
}

.hero-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0d1e2a;
  border-radius: 0;
}

.banner-slides {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 6;
  overflow: hidden;
}

.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d1e2a;
  z-index: 0;
}

.banner-slide.active { opacity: 1; z-index: 1; }

.banner-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.banner-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  z-index: 2;
}

.banner-overlay h3 {
  color: #fff;
  font-size: 1.3rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.banner-gradient-bottom { display: none; }

.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-arrow:hover { background: rgba(0,0,0,0.7); }
.banner-prev { right: 15px; }
.banner-next { left: 15px; }

.banner-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1.5px solid rgba(255,255,255,0.3);
}

.banner-dot.active {
  background: var(--secondary);
  width: 22px;
  border-radius: 4px;
  border-color: var(--secondary);
}

.hero-banner-placeholder {
  position: relative;
  height: 250px;
  background: linear-gradient(160deg, var(--primary), #0a1318);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-placeholder-content { position: relative; z-index: 1; }

.hero-placeholder-icon {
  font-size: 3rem;
  color: var(--secondary);
  margin-bottom: 1rem;
  opacity: 0.7;
}

.hero-placeholder-content h2 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.hero-placeholder-content p {
  color: rgba(255,255,255,0.5);
  font-size: 0.95rem;
}

.dashboard-container { padding-top: 1.5rem; padding-bottom: 3rem; }

.welcome-section { margin-bottom: 2rem; }

.welcome-card-premium {
  background: linear-gradient(135deg, var(--primary), #1a3040);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  color: #fff;
}

.welcome-card-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 50%, rgba(18,169,155,0.15), transparent 60%);
  pointer-events: none;
}

.welcome-info { position: relative; z-index: 1; }

.welcome-info h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.welcome-info p {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.wave-emoji { display: inline-block; animation: wave 2s ease-in-out infinite; }

@keyframes wave {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(15deg); }
  50% { transform: rotate(-10deg); }
  75% { transform: rotate(15deg); }
}

.welcome-guest-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.account-status {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-pill.verified { background: rgba(16,185,129,0.2); color: #10b981; }
.status-pill.unverified { background: rgba(239,68,68,0.2); color: #ef4444; }
.status-pill.role-pill { background: rgba(18,169,155,0.2); color: #12a99b; }

.welcome-avatar { position: relative; z-index: 1; }

.avatar-circle-premium {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(18,169,155,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255,255,255,0.7);
}

.stat-card-premium {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  border: 1px solid var(--border);
}

.stat-card-premium:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-card-shine {
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(18,169,155,0.06), transparent 70%);
  pointer-events: none;
}

.stat-icon-premium {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--secondary), #0fd4c4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  flex-shrink: 0;
}

.stat-icon-premium.bg-green { background: linear-gradient(135deg, #10b981, #34d399); }
.stat-icon-premium.bg-amber { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.stat-icon-premium.bg-muted { background: linear-gradient(135deg, #6b7280, #9ca3af); }

.section-heading-inline {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

.section-heading-inline i { color: var(--secondary); }

.actions-grid-premium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.action-card-premium {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid var(--border);
  text-align: center;
}

.action-card-premium:hover {
  border-color: var(--secondary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.action-icon-glow {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(18,169,155,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--secondary);
  transition: all 0.3s;
}

.action-card-premium:hover .action-icon-glow {
  background: var(--secondary);
  color: #fff;
}

.action-card-premium span { font-size: 0.85rem; font-weight: 500; }

.dashboard-section-premium {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

.section-header h2 i { color: var(--secondary); }

.view-all-link {
  color: var(--secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.view-all-link:hover { text-decoration: underline; }

.list-items { display: flex; flex-direction: column; gap: 0.5rem; }

.list-item-premium {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
}

.list-item-premium:hover { background: var(--bg); }

.list-item-icon-premium {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(18,169,155,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  flex-shrink: 0;
}

.list-item-icon-premium.bg-green { background: rgba(16,185,129,0.1); color: #10b981; }

.list-item-info { flex: 1; min-width: 0; }
.list-item-info strong { font-size: 0.9rem; display: block; }
.list-item-info p { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.badge-primary { background: rgba(18,169,155,0.15); color: var(--secondary); }
.badge-success { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-warning { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-error { background: rgba(239,68,68,0.15); color: #ef4444; }

.notif-item { cursor: pointer; }
.notif-important { border-right: 3px solid var(--error); }

.notif-icon-urgent { background: rgba(239,68,68,0.1) !important; color: #ef4444 !important; }
.notif-icon-high { background: rgba(245,158,11,0.1) !important; color: #f59e0b !important; }
.notif-icon-normal { background: rgba(59,130,246,0.1) !important; color: #3b82f6 !important; }

.notif-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.empty-state-premium {
  text-align: center;
  padding: 2rem 1rem;
}

.empty-icon {
  font-size: 2.5rem;
  color: var(--border);
  margin-bottom: 0.75rem;
}

.empty-state-premium p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.care-team-card {
  background: linear-gradient(135deg, var(--primary), #1a3040) !important;
  border: 1px solid rgba(18,169,155,0.2) !important;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
}

.care-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

.care-card-glow {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(18,169,155,0.15), transparent 70%);
  pointer-events: none;
}

.care-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(18,169,155,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.care-card-inner h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.care-card-inner p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.care-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

.care-features span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

.care-features i { color: var(--secondary); font-size: 0.7rem; }

.guest-info-section { margin-top: 2rem; }

.guest-info-card {
  background: rgba(18,169,155,0.08);
  border: 1px solid rgba(18,169,155,0.2);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.guest-info-icon {
  font-size: 1.5rem;
  color: var(--secondary);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.guest-info-text h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.guest-info-text p { color: var(--text-muted); font-size: 0.9rem; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
}

.modal-form { padding: 1.5rem; }

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .navbar { padding: 0 0.5rem; }

  .nav-toggle { display: block; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    background: var(--nav-bg);
    flex-direction: column;
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 999;
  }

  .nav-menu.open { display: flex; }

  .nav-link { padding: 0.75rem 1rem; }

  .nav-user-name { display: none; }

  .nav-container { gap: 0.5rem; }

  .hero-title { font-size: 2rem; }
  .title-accent { font-size: 2.5rem; }

  .hero-stats-row { gap: 1rem; }
  .hero-stat-num { font-size: 1.5rem; }

  .landing-buttons { flex-direction: column; align-items: center; }
  .btn-lg { width: 100%; text-align: center; }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .cta-card { padding: 2.5rem 1.5rem; }
  .cta-card h2 { font-size: 1.5rem; }

  .footer-content { flex-direction: column; text-align: center; }
  .footer-brand { flex-direction: column; }

  .banner-slides { aspect-ratio: 16 / 8; }

  .welcome-card-premium {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem;
  }

  .welcome-info h1 { font-size: 1.3rem; }

  .welcome-guest-actions {
    justify-content: center;
  }

  .account-status { justify-content: center; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .actions-grid-premium {
    grid-template-columns: repeat(3, 1fr);
  }

  .action-card-premium {
    padding: 1rem 0.5rem;
  }

  .action-icon-glow {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .action-card-premium span { font-size: 0.75rem; }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .page-header { flex-direction: column; align-items: stretch; }
  .page-header h1 { font-size: 1.2rem; }

  .main-content { padding: 1rem 0; }
  .hero-banner-wrap { margin-top: -1rem; }
  .dashboard-container { padding-top: 1rem; }

  .guest-info-card {
    flex-direction: column;
    text-align: center;
  }

  .modal-card { max-width: 100%; margin: 0.5rem; }
  .modal-form { padding: 1rem; }
  .form-row { flex-direction: column; }

  .banner-arrow { width: 35px; height: 35px; font-size: 0.85rem; }
  .banner-dots { bottom: 85px; }

  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 600px; }

  .quick-actions { margin-bottom: 1.5rem; }

  .section-title { font-size: 1.5rem; }
  .landing-features { padding: 3rem 1rem; }
  .landing-cta { padding: 3rem 1rem; }
}

.chat-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.chat-tab {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.2s;
}

.chat-tab.active {
  background: var(--secondary);
  color: #fff;
}

.chat-rooms-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-room-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.chat-room-item:hover {
  border-color: var(--secondary);
  box-shadow: var(--shadow);
}

.chat-room-item.has-unread {
  border-right: 3px solid var(--secondary);
  background: rgba(18,169,155,0.03);
}

.chat-room-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #1a3040);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 1.2rem;
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}

.chat-room-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.chat-type-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 0.6rem;
  padding: 0.1rem 0.35rem;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
}

.chat-type-doctor { background: #3b82f6; }
.chat-type-support { background: #f59e0b; }
.chat-type-internal { background: #8b5cf6; }

.chat-room-info { flex: 1; min-width: 0; }

.chat-room-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}

.chat-room-top strong { font-size: 0.95rem; }

.chat-room-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.chat-room-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-room-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
  margin: 0;
}

.chat-unread-badge {
  background: var(--secondary);
  color: #fff;
  font-size: 0.7rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.new-chat-options { padding: 1.5rem; }

.new-chat-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  transition: all 0.2s;
}

.new-chat-option:hover {
  border-color: var(--secondary);
  background: rgba(18,169,155,0.03);
}

.new-chat-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(18,169,155,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.new-chat-icon.doctor-icon { background: rgba(59,130,246,0.1); color: #3b82f6; }

.new-chat-info { flex: 1; }
.new-chat-info h3 { font-size: 0.95rem; margin-bottom: 0.1rem; }
.new-chat-info p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }

.new-chat-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.new-chat-divider::before, .new-chat-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.doctors-list-chat { max-height: 300px; overflow-y: auto; }
.empty-state-sm { text-align: center; padding: 1rem; color: var(--text-muted); }

.chat-page-wrap {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
  background: var(--bg);
}

.chat-room-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 10;
}

.chat-back-btn {
  color: var(--text);
  text-decoration: none;
  font-size: 1.2rem;
  padding: 0.3rem;
}

.chat-room-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.chat-room-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #1a3040);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  flex-shrink: 0;
  overflow: hidden;
}

.chat-room-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.chat-room-header-info strong { font-size: 0.95rem; display: block; }

.chat-room-type-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat-room-header-actions { flex-shrink: 0; }

.chat-messages-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-system-msg {
  text-align: center;
  padding: 0.4rem 1rem;
  background: rgba(18,169,155,0.08);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  align-self: center;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-closed-msg {
  background: rgba(239,68,68,0.1);
  color: var(--error);
}

.chat-msg {
  display: flex;
  gap: 0.5rem;
  max-width: 75%;
  align-items: flex-end;
}

.chat-msg-me {
  align-self: flex-start;
  flex-direction: row-reverse;
}

.chat-msg-other {
  align-self: flex-end;
}

.chat-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #1a3040);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 0.8rem;
  flex-shrink: 0;
  overflow: hidden;
}

.chat-msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.chat-msg-content { max-width: calc(100% - 40px); }

.chat-msg-sender {
  font-size: 0.75rem;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 0.15rem;
  text-align: right;
}

.chat-bubble {
  padding: 0.75rem 1rem;
  border-radius: 16px;
  line-height: 1.6;
  font-size: 0.9rem;
  word-break: break-word;
}

.chat-msg-me .chat-bubble {
  background: var(--secondary);
  color: #fff;
  border-bottom-left-radius: 4px;
}

.chat-msg-other .chat-bubble {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-bottom-right-radius: 4px;
}

.chat-bubble p { margin: 0; }

.chat-msg-time {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.chat-msg-other .chat-msg-time {
  color: var(--text-muted);
}

.chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.chat-img-attach {
  display: block;
  max-width: 250px;
  border-radius: 8px;
  overflow: hidden;
}

.chat-img-attach img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  max-height: 200px;
  object-fit: cover;
}

.chat-file-attach {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  font-size: 0.8rem;
  transition: background 0.2s;
}

.chat-msg-other .chat-file-attach {
  background: var(--bg);
}

.chat-file-attach:hover { opacity: 0.8; }

.chat-file-attach i { font-size: 1.2rem; }
.chat-file-attach small { opacity: 0.7; }

.chat-input-area {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem;
}

.chat-input-preview {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  overflow-x: auto;
  margin-bottom: 0.5rem;
}

.file-preview-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.file-preview-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  display: block;
}

.file-preview-doc {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem;
  font-size: 0.75rem;
  background: var(--bg);
}

.file-preview-item button,
.file-preview-rm {
  position: absolute;
  top: 2px;
  left: 2px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.file-preview-doc .file-preview-rm {
  position: static;
  margin-right: auto;
  background: rgba(239,68,68,0.15);
  color: #ef4444;
}

.chat-input-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-attach-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.4rem;
  transition: color 0.2s;
}

.chat-attach-btn:hover { color: var(--secondary); }

.chat-input-form input[type="text"],
.chat-input-form textarea {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

.chat-input-form input[type="text"]:focus {
  border-color: var(--secondary);
}

.chat-send-btn {
  background: var(--secondary);
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chat-send-btn:hover { background: #0e8c80; }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.chat-header-actions { display: flex; gap: 0.5rem; }

@media (max-width: 768px) {
  .chat-msg { max-width: 88%; }
  .chat-room-preview { max-width: 150px; }
  .chat-room-header { padding: 0.5rem; }
  .chat-input-area { padding: 0.5rem; }
  .chat-img-attach { max-width: 180px; }
  .chat-page-wrap { height: calc(100vh - 60px); }
  .chat-tabs { gap: 0.25rem; }
  .chat-tab { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
}

.notif-page-list { display: flex; flex-direction: column; gap: 0.5rem; }

.notif-page-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}

.notif-page-item:hover { border-color: var(--secondary); }

.notif-page-item.unread {
  border-right: 3px solid var(--secondary);
  background: rgba(18,169,155,0.03);
}

.notif-page-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.notif-type-success { background: rgba(16,185,129,0.1); color: #10b981; }
.notif-type-info { background: rgba(59,130,246,0.1); color: #3b82f6; }
.notif-type-warning { background: rgba(245,158,11,0.1); color: #f59e0b; }
.notif-type-error { background: rgba(239,68,68,0.1); color: #ef4444; }

.notif-page-content { flex: 1; min-width: 0; }
.notif-page-content strong { font-size: 0.9rem; display: block; margin-bottom: 0.15rem; }
.notif-page-content p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.notif-page-time { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

.notif-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.push-permission-card {
  background: rgba(18,169,155,0.08);
  border: 1px solid rgba(18,169,155,0.2);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.push-permission-card p { margin: 0; font-size: 0.9rem; }
.push-permission-card i { color: var(--secondary); font-size: 1.2rem; }

.main-content { overflow-x: hidden; }
.main-content img, .main-content video { max-width: 100%; }
.main-content table { max-width: 100%; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.75rem; }
.page-header h1 { font-size: 1.3rem; display: flex; align-items: center; gap: 0.5rem; }

.admin-layout { display: flex; gap: 1.5rem; min-height: calc(100vh - 80px); }
.admin-sidebar { width: 260px; flex-shrink: 0; background: var(--card-bg); border-radius: var(--radius); padding: 1rem 0; position: sticky; top: 76px; height: fit-content; max-height: calc(100vh - 90px); overflow-y: auto; border: 1px solid var(--border); }
.admin-sidebar-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); margin-bottom: 0.5rem; }
.admin-sidebar-header h2 { font-size: 1rem; color: var(--secondary); display: flex; align-items: center; gap: 0.5rem; }
.admin-sidebar-header p { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }
.admin-sidebar-nav a { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1.25rem; color: var(--text); text-decoration: none; font-size: 0.88rem; transition: all 0.15s; border-right: 3px solid transparent; }
.admin-sidebar-nav a:hover, .admin-sidebar-nav a.active { background: rgba(18,169,155,0.06); color: var(--secondary); border-right-color: var(--secondary); }
.admin-sidebar-nav a i { width: 20px; text-align: center; font-size: 0.9rem; }
.admin-sidebar-nav .nav-section { font-size: 0.72rem; color: var(--text-muted); padding: 0.75rem 1.25rem 0.35rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.admin-main { flex: 1; min-width: 0; }

.admin-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.admin-stat-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; display: flex; align-items: center; gap: 1rem; transition: transform 0.15s, box-shadow 0.15s; }
.admin-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.admin-stat-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.admin-stat-icon.teal { background: rgba(18,169,155,0.1); color: var(--secondary); }
.admin-stat-icon.blue { background: rgba(59,130,246,0.1); color: #3b82f6; }
.admin-stat-icon.amber { background: rgba(245,158,11,0.1); color: #f59e0b; }
.admin-stat-icon.red { background: rgba(239,68,68,0.1); color: #ef4444; }
.admin-stat-icon.green { background: rgba(34,197,94,0.1); color: #22c55e; }
.admin-stat-icon.purple { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.admin-stat-icon.orange { background: rgba(245,158,11,0.1); color: #f59e0b; }
.admin-stat-info h3 { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.admin-stat-info p { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }

.admin-section { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.25rem; overflow: hidden; }
.admin-section-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.admin-section-header h3 { font-size: 0.95rem; display: flex; align-items: center; gap: 0.5rem; }
.admin-section-body { padding: 1rem 1.25rem; }
.admin-section-body .list-item { padding: 0.75rem 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
[data-theme="dark"] .admin-section-body .list-item { border-bottom-color: rgba(255,255,255,0.04); }
.admin-section-body .list-item:last-child { border-bottom: none; }

.admin-quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.75rem; }
.admin-quick-card { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1rem; border-radius: var(--radius); background: var(--card-bg); border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: all 0.2s; text-align: center; }
.admin-quick-card:hover { border-color: var(--secondary); background: rgba(18,169,155,0.04); transform: translateY(-2px); box-shadow: var(--shadow); }
.admin-quick-card i { font-size: 1.5rem; }
.admin-quick-card span { font-size: 0.8rem; font-weight: 600; }

.empty-state-premium { text-align: center; padding: 2.5rem 1rem; }
.empty-state-premium .empty-icon { font-size: 2.5rem; color: var(--text-muted); opacity: 0.3; margin-bottom: 0.75rem; }
.empty-state-premium h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.empty-state-premium p { font-size: 0.85rem; color: var(--text-muted); }

.role-nav-section { font-size: 0.68rem; color: rgba(255,255,255,0.35); padding: 0.5rem 0.5rem 0.25rem; letter-spacing: 0.5px; display: none; }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-card { background: var(--card-bg); border-radius: 16px; width: 100%; overflow: hidden; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-header { padding: 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h2 { font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.1rem; cursor: pointer; padding: 0.25rem; }
.modal-form { padding: 1.25rem; }
.modal-form .form-group { margin-bottom: 0.85rem; }
.modal-form .form-group label { display: block; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.3rem; font-weight: 500; }
.modal-form .form-group input, .modal-form .form-group textarea, .modal-form .form-group select { width: 100%; padding: 0.6rem 0.85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--input-bg); color: var(--text); font-family: inherit; font-size: 0.88rem; }
.modal-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.modal-actions { padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: flex; gap: 0.5rem; justify-content: flex-start; }

@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; position: static; max-height: none; }
  .admin-sidebar-nav { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.5rem; }
  .admin-sidebar-nav a { padding: 0.5rem 0.75rem; border-radius: 8px; border-right: none; font-size: 0.78rem; }
  .admin-sidebar-nav .nav-section { display: none; }
  .admin-stats-row { grid-template-columns: repeat(2, 1fr); }
  .modal-form .form-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .admin-quick-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ========== PWA ========== */
.pwa-install-btn {
  animation: pwa-pulse 2s ease-in-out infinite;
  color: var(--accent) !important;
}
@keyframes pwa-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.pwa-update-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  font-family: inherit;
  box-shadow: 0 8px 32px rgba(18,169,155,0.35);
  z-index: 10000;
  animation: slideUpBanner 0.4s ease;
}
@keyframes slideUpBanner {
  from { opacity: 0; transform: translateX(-50%) translateY(30px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.pwa-update-banner button {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
}
.pwa-update-banner button:hover {
  background: rgba(255,255,255,0.35);
}
.pwa-offline-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #e74c3c;
  color: #fff;
  text-align: center;
  padding: 0.4rem;
  font-size: 0.82rem;
  z-index: 10001;
  display: none;
}
.pwa-offline-indicator.show { display: block; }

/* ========== Payment Methods ========== */
.payment-method-option {
  flex:1;
  min-width:90px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:0.35rem;
  padding:0.75rem 0.5rem;
  border:2px solid var(--border);
  border-radius:12px;
  cursor:pointer;
  transition:all 0.2s;
  font-size:0.78rem;
  text-align:center;
  background:var(--bg-secondary);
}
.payment-method-option i { font-size:1.3rem; }
.payment-method-option:hover { border-color:var(--accent); }
.payment-method-option.selected { border-color:var(--accent); background:rgba(18,169,155,0.08); color:var(--accent); }

.payment-overlay {
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.6);
  backdrop-filter:blur(4px);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
  animation:fadeIn 0.3s ease;
}
.payment-modal {
  background:var(--card-bg);
  border-radius:20px;
  padding:2rem 1.75rem;
  width:90%;
  max-width:360px;
  animation:slideUpBanner 0.4s ease;
}
.apple-pay-modal { background:#fff; color:#000; }
.apple-pay-header { display:flex; align-items:center; justify-content:center; gap:0.3rem; margin-bottom:1rem; }
.payment-amount { text-align:center; font-size:1.8rem; font-weight:700; margin:0.5rem 0; }
.payment-store { text-align:center; font-size:0.85rem; color:#666; margin-bottom:1rem; }
.apple-pay-biometric { text-align:center; }
.apple-pay-biometric p { font-size:0.82rem; color:#666; }
.payment-progress { height:6px; background:var(--border); border-radius:6px; overflow:hidden; margin-top:1rem; }
.payment-progress-bar { height:100%; width:0; background:var(--accent); border-radius:6px; animation:payProgress 2.5s ease forwards; }
@keyframes payProgress { 0%{width:0} 40%{width:40%} 70%{width:75%} 100%{width:100%} }
@keyframes pulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.08);opacity:0.85} }

/* ========== Forgot Password Modal ========== */
.forgot-overlay {
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.6);
  backdrop-filter:blur(4px);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
  animation:fadeIn 0.3s ease;
}
.forgot-modal {
  background:var(--card-bg);
  border-radius:20px;
  padding:2rem 1.75rem;
  width:90%;
  max-width:400px;
  animation:slideUpBanner 0.4s ease;
}
.forgot-modal h2 { font-size:1.2rem; margin-bottom:0.5rem; text-align:center; }
.forgot-modal p { font-size:0.85rem; color:var(--text-muted); text-align:center; margin-bottom:1.25rem; line-height:1.6; }
.forgot-step { display:none; }
.forgot-step.active { display:block; }

/* ================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ================================================================ */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 0.4rem 0 max(0.4rem, env(safe-area-inset-bottom));
    box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
    justify-content: space-around;
    align-items: flex-end;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.22rem;
    padding: 0.3rem 0.6rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 52px;
    transition: color 0.2s;
    position: relative;
  }

  .mobile-nav-item i {
    font-size: 1.25rem;
    transition: transform 0.2s;
  }

  .mobile-nav-item.active {
    color: var(--secondary);
  }

  .mobile-nav-item.active i {
    transform: translateY(-2px);
  }

  .mobile-nav-item:active i {
    transform: scale(0.9);
  }

  /* Center floating button */
  .mobile-nav-center {
    position: relative;
    top: -12px;
    color: var(--text-muted);
  }

  .mobile-nav-center-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), #0e8f83);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(18,169,155,0.45);
    transition: transform 0.2s, box-shadow 0.2s;
  }

  .mobile-nav-center-btn i {
    font-size: 1.3rem;
    color: #fff;
  }

  .mobile-nav-center:active .mobile-nav-center-btn {
    transform: scale(0.92);
    box-shadow: 0 2px 10px rgba(18,169,155,0.35);
  }

  .mobile-nav-center span {
    font-size: 0.6rem;
    color: var(--secondary);
    font-weight: 700;
  }

  /* Notification dot */
  .mobile-notif-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-notif-dot {
    position: absolute;
    top: -3px;
    left: -3px;
    width: 9px;
    height: 9px;
    background: var(--error);
    border-radius: 50%;
    border: 2px solid var(--card-bg);
  }

  /* Adjust main content for bottom nav */
  .main-content {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .chat-page-wrap {
    height: calc(100vh - 60px - 64px) !important;
  }

  /* Hide desktop footer on mobile when logged in */
  .footer {
    display: none;
  }
}

/* ================================================================
   MOBILE NAVBAR IMPROVEMENTS
   ================================================================ */
@media (max-width: 768px) {
  .navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .nav-container {
    height: 56px;
    padding: 0 1rem;
  }

  .nav-logo {
    font-size: 1.15rem;
  }

  .nav-logo-img {
    width: 30px;
    height: 30px;
  }

  .nav-menu {
    top: 56px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 0.75rem;
    gap: 0.25rem;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }

  .nav-link {
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
  }

  .nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.1);
  }

  /* Smaller action icons in top nav */
  .nav-actions {
    gap: 0.25rem;
  }

  .nav-icon-btn {
    font-size: 1rem;
    padding: 0.4rem;
  }

  .nav-user-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
    gap: 0.3rem;
  }
}

/* ================================================================
   MOBILE BANNER IMPROVEMENTS
   ================================================================ */
@media (max-width: 768px) {
  .banner-slides {
    aspect-ratio: 2/1;
  }

  .hero-banner {
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
  }

  .hero-banner-placeholder {
    border-radius: var(--radius-sm);
    aspect-ratio: 2/1;
  }
}

/* ================================================================
   MOBILE DASHBOARD IMPROVEMENTS
   ================================================================ */
@media (max-width: 768px) {
  .dashboard-container {
    padding: 0 0.75rem;
  }

  .welcome-card-premium {
    border-radius: 14px;
    padding: 1.1rem;
    margin-bottom: 1rem;
  }

  .welcome-info h1 {
    font-size: 1.2rem;
  }

  .welcome-info p {
    font-size: 0.85rem;
  }

  .account-status {
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.6rem;
  }

  .status-pill {
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
  }

  .quick-services-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.6rem !important;
  }

  .service-card-mini {
    padding: 0.75rem 0.4rem !important;
    border-radius: 12px !important;
  }

  .service-icon-mini {
    width: 38px !important;
    height: 38px !important;
    font-size: 0.95rem !important;
    border-radius: 10px !important;
    margin-bottom: 0.4rem !important;
  }

  .service-label-mini {
    font-size: 0.68rem !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .stat-card {
    padding: 0.9rem;
    gap: 0.75rem;
  }

  .stat-icon {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  .stat-info h3 {
    font-size: 1.3rem;
  }

  .stat-info p {
    font-size: 0.78rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .dashboard-section {
    padding: 1.1rem;
    border-radius: 14px;
  }

  .actions-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
  }

  .action-card {
    padding: 1rem 0.5rem;
    gap: 0.5rem;
    border-radius: 12px;
  }

  .action-card i {
    font-size: 1.3rem;
  }

  .action-card span {
    font-size: 0.72rem;
    text-align: center;
  }
}

/* ================================================================
   MOBILE AUTH PAGE IMPROVEMENTS
   ================================================================ */
@media (max-width: 768px) {
  .auth-page {
    padding: 1rem;
    align-items: flex-start;
    padding-top: 2rem;
  }

  .auth-card {
    padding: 1.5rem 1.25rem;
    border-radius: 16px;
    max-width: 100%;
  }

  .auth-header h1 {
    font-size: 1.25rem;
  }

  .auth-tabs {
    gap: 0;
  }

  .auth-tab {
    font-size: 0.82rem;
    padding: 0.65rem 0.5rem;
  }

  .nafath-tab-icon {
    width: 18px;
    height: 18px;
  }

  .social-login-btns {
    gap: 0.6rem;
  }

  .btn-social {
    padding: 0.7rem;
    font-size: 0.88rem;
    border-radius: 10px;
  }

  .otp-inputs {
    gap: 0.4rem;
  }

  .otp-digit {
    width: 38px !important;
    height: 46px !important;
    font-size: 1.1rem !important;
    border-radius: 10px;
  }
}

/* ================================================================
   MOBILE CARD & LIST IMPROVEMENTS
   ================================================================ */
@media (max-width: 768px) {
  .card {
    padding: 1rem;
    border-radius: 14px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .list-item {
    padding: 0.85rem;
    border-radius: 10px;
  }

  .page-header {
    margin-bottom: 1rem;
  }

  .page-header h1 {
    font-size: 1.15rem;
  }

  .container {
    padding: 0 0.875rem;
  }

  .main-content {
    padding-top: 1rem;
  }

  .form-card {
    padding: 1.25rem;
    border-radius: 14px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .table th, .table td {
    padding: 0.6rem 0.75rem;
    font-size: 0.82rem;
  }
}

/* ================================================================
   MOBILE CONSULTATION / MEDICAL IMPROVEMENTS
   ================================================================ */
@media (max-width: 768px) {
  .consultation-card {
    border-radius: 14px;
    padding: 1rem;
  }

  .consultation-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .detail-actions {
    flex-direction: column;
  }

  .detail-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ================================================================
   MOBILE TOAST / NOTIFICATIONS POSITION
   ================================================================ */
@media (max-width: 768px) {
  .toast {
    top: 68px;
    font-size: 0.88rem;
    padding: 0.7rem 1.1rem;
    max-width: 94%;
  }

  .notification-popup {
    top: 68px;
    left: 0.75rem;
    right: 0.75rem;
    max-width: unset;
  }
}

/* ================================================================
   MOBILE MODAL IMPROVEMENTS
   ================================================================ */
@media (max-width: 768px) {
  .modal-card {
    border-radius: 16px 16px 0 0;
    max-height: 88vh;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-form .form-row {
    grid-template-columns: 1fr;
  }

  .forgot-modal {
    padding: 1.5rem 1.25rem;
    border-radius: 20px 20px 0 0;
  }

  .payment-modal {
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 100%;
  }
}

/* ================================================================
   ACTIVE NAV ITEM DETECTION (script adds class)
   ================================================================ */
.mobile-nav-item.active i {
  color: var(--secondary);
}

.lang-toggle-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lang-toggle-btn .lang-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

html[dir="ltr"] body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  text-align: left;
}

html[dir="ltr"] .navbar {
  direction: ltr;
}

html[dir="ltr"] .nav-container {
  flex-direction: row;
}

html[dir="ltr"] .nav-menu {
  direction: ltr;
}

html[dir="ltr"] .nav-user-dropdown .dropdown-menu {
  right: auto;
  left: 0;
}

html[dir="ltr"] .mobile-bottom-nav {
  direction: ltr;
}

html[dir="ltr"] .card,
html[dir="ltr"] .dashboard-card,
html[dir="ltr"] .stat-card {
  text-align: left;
}

html[dir="ltr"] .form-group label {
  text-align: left;
}

html[dir="ltr"] .toast {
  right: auto;
  left: 1rem;
}

html[dir="ltr"] .notification-popup {
  right: auto;
  left: 1rem;
}

html[dir="ltr"] .sidebar {
  right: auto;
  left: 0;
  border-right: 1px solid var(--border);
  border-left: none;
}

html[dir="ltr"] .main-with-sidebar {
  margin-right: 0;
  margin-left: 260px;
}

html[dir="ltr"] .footer {
  direction: ltr;
  text-align: center;
}

/* ========== Pay Button – Prominent ========== */
@keyframes payGlow {
  0%,100% { box-shadow: 0 6px 24px rgba(18,169,155,0.35), 0 0 0 0 rgba(18,169,155,0.25); }
  50%      { box-shadow: 0 10px 36px rgba(18,169,155,0.5), 0 0 0 8px rgba(18,169,155,0); }
}
.btn-pay-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1.1rem 1.5rem;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #12a99b 0%, #0d8a7e 100%);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 24px rgba(18,169,155,0.35);
  animation: payGlow 2.4s infinite;
  position: relative;
  overflow: hidden;
}
.btn-pay-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-pay-main:hover::before { opacity: 1; }
.btn-pay-main:hover { transform: translateY(-2px); box-shadow: 0 10px 36px rgba(18,169,155,0.45); }
.btn-pay-main:active { transform: translateY(0); }
.btn-pay-main:disabled {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  box-shadow: none;
  animation: none;
  cursor: not-allowed;
  opacity: 0.75;
}
.btn-pay-main.apple { background: linear-gradient(135deg, #1c1c1e 0%, #3a3a3c 100%); box-shadow: 0 6px 24px rgba(0,0,0,0.4); }
.btn-pay-main.card  { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); box-shadow: 0 6px 24px rgba(37,99,235,0.4); }

/* sticky pay bar on mobile */
.pay-sticky-bar {
  position: sticky;
  bottom: 70px;
  z-index: 100;
  padding: 0.75rem 0 0;
  background: linear-gradient(transparent, var(--bg) 30%);
}
@media(min-width:601px){ .pay-sticky-bar { position: static; padding: 0; background: none; } }

/* ── ROLE CONTROL PANELS ── */
.role-panel-header { margin-bottom: 1.25rem; }
.role-panel-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1.25rem; border-radius: 50px;
  font-size: 0.88rem; font-weight: 700;
}
.doctor-badge { background: linear-gradient(135deg,#e0f2f1,#b2dfdb); color: #00695c; border: 1.5px solid #80cbc4; }
.pharmacist-badge { background: linear-gradient(135deg,#e8f5e9,#c8e6c9); color: #2e7d32; border: 1.5px solid #a5d6a7; }
.company-badge { background: linear-gradient(135deg,#e3f2fd,#bbdefb); color: #1565c0; border: 1.5px solid #90caf9; }
.insurance-badge { background: linear-gradient(135deg,#f3e5f5,#e1bee7); color: #7b1fa2; border: 1.5px solid #ce93d8; }

.role-control-panel { margin-bottom: 2rem; }
.control-panel-grid { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; }
@media (max-width: 900px) { .control-panel-grid { grid-template-columns: 1fr; } }

.control-panel-main { background: var(--card); border-radius: 20px; padding: 1.5rem; border: 1px solid var(--border); box-shadow: var(--shadow); }
.control-panel-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }

.control-action-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.9rem 1.1rem; border-radius: 14px;
  background: var(--surface); border: 1.5px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: all 0.2s; position: relative;
}
.control-action-card:hover { background: var(--accent-light); border-color: var(--accent); transform: translateX(-3px); }
html[dir="ltr"] .control-action-card:hover { transform: translateX(3px); }
.control-action-card.primary { background: linear-gradient(135deg, var(--accent-light), rgba(18,169,155,0.06)); border-color: var(--accent); }
.ca-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-size: 1rem;
}
.ca-icon.bg-blue { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.ca-icon.bg-teal { background: linear-gradient(135deg, #12a99b, #0d8a7f); }
.ca-icon.bg-green { background: linear-gradient(135deg, #16a34a, #15803d); }
.ca-icon.bg-amber { background: linear-gradient(135deg, #d97706, #b45309); }
.ca-icon.bg-red { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.ca-icon.bg-purple { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.ca-icon.bg-muted { background: linear-gradient(135deg, #64748b, #475569); }
.ca-info { flex: 1; }
.ca-info strong { display: block; font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 0.15rem; }
.ca-info small { font-size: 0.75rem; color: var(--muted); }
.ca-badge {
  background: var(--accent); color: #fff;
  font-size: 0.72rem; font-weight: 700;
  padding: 0.15rem 0.5rem; border-radius: 50px; flex-shrink: 0;
}
.ca-badge.notif { background: #dc2626; }
.ql-badge { background: var(--accent); color: #fff; font-size: 0.65rem; font-weight: 700; padding: 0.1rem 0.4rem; border-radius: 50px; margin-inline-start: 4px; }

/* ── AI ASSISTANT PANEL (SIDE) ── */
.control-panel-side { display: flex; flex-direction: column; gap: 1rem; }
.ai-assistant-panel {
  background: linear-gradient(145deg, #0a2e2c 0%, #0d3d3a 60%, #0e4840 100%);
  border-radius: 20px; padding: 1.5rem; color: #fff; position: relative; overflow: hidden;
  border: 1px solid rgba(18,169,155,0.3);
}
.ai-panel-glow {
  position: absolute; top: -40px; right: -40px; width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(18,169,155,0.35), transparent 70%);
  pointer-events: none;
}
.ai-panel-icon { margin-bottom: 0.85rem; }
.ai-assistant-panel h3 { font-size: 1rem; font-weight: 800; margin-bottom: 0.5rem; }
.ai-assistant-panel p { font-size: 0.8rem; color: rgba(255,255,255,0.7); line-height: 1.7; margin-bottom: 1rem; }
.btn-ai-start {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.15); border: 1.5px solid rgba(255,255,255,0.25);
  color: #fff; padding: 0.6rem 1.25rem; border-radius: 10px;
  text-decoration: none; font-size: 0.85rem; font-weight: 600; font-family: inherit;
  transition: all 0.2s;
}
.btn-ai-start:hover { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.5); transform: translateY(-1px); }

/* ── QUICK LINKS PANEL ── */
.quick-links-panel { background: var(--card); border-radius: 16px; padding: 1.1rem; border: 1px solid var(--border); }
.quick-links-panel h4 { font-size: 0.82rem; font-weight: 700; color: var(--muted); margin-bottom: 0.75rem; }
.quick-link-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.75rem; border-radius: 10px; text-decoration: none;
  color: var(--text); font-size: 0.83rem; font-weight: 500;
  transition: all 0.15s; border: 1px solid transparent;
}
.quick-link-item:hover { background: var(--accent-light); color: var(--accent); border-color: var(--border); }
.quick-link-item i { width: 16px; color: var(--accent); font-size: 0.8rem; }

/* ── FLOATING AI BUTTON ── */
.floating-ai-btn {
  position: fixed; bottom: 90px; left: 20px; z-index: 999;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #12a99b, #0d6b62);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(18,169,155,0.5);
  text-decoration: none; transition: all 0.25s;
  border: 2px solid rgba(255,255,255,0.3);
}
html[dir="rtl"] .floating-ai-btn { left: auto; right: 20px; }
.floating-ai-btn:hover { transform: scale(1.1) translateY(-2px); box-shadow: 0 10px 36px rgba(18,169,155,0.6); }
.floating-ai-btn img { width: 30px; height: 30px; object-fit: contain; filter: brightness(0) invert(1); }
.floating-ai-pulse {
  position: absolute; top: -3px; right: -3px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #22c55e; border: 2px solid var(--bg,#fff);
  animation: pulseGreen 2s infinite;
}
@keyframes pulseGreen {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}
