@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --secondary: #1e293b;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body { 
  font-family: 'Inter', system-ui, -apple-system, sans-serif; 
  background: var(--bg); 
  color: var(--text); 
  margin: 0; 
  padding: 0; 
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar { 
  background: var(--card-bg); 
  border-bottom: 1px solid var(--border); 
  padding: 12px 32px; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  z-index: 100; 
  position: sticky; 
  top: 0;
  gap: 10px;
}
.navbar h2 { 
  margin: 0; 
  font-size: 1.25rem; 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  color: var(--secondary); 
  font-weight: 700;
}
.navbar .brand { 
  color: var(--primary); 
  font-weight: 800; 
  background: #f5f3ff; 
  padding: 4px 10px; 
  border-radius: 6px; 
  font-size: 0.75rem; 
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Toolbar & Layout */
.toolbar { 
  background: var(--card-bg); 
  padding: 16px 32px; 
  display: flex; 
  justify-content: space-between;
  align-items: center; 
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
}

/* Tabs */
.tab-container { 
  display: flex; 
  gap: 4px; 
  background: #f1f5f9; 
  padding: 4px; 
  border-radius: 8px; 
}
.tab-btn { 
  padding: 8px 16px; 
  border: none; 
  background: transparent; 
  border-radius: 6px; 
  font-weight: 600; 
  color: var(--text-light); 
  cursor: pointer; 
  transition: all 0.2s; 
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tab-btn.active { 
  background: white; 
  color: var(--primary); 
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); 
}
.tab-btn:hover:not(.active) { 
  color: var(--secondary);
  background: rgba(0,0,0,0.03);
}

/* Buttons */
button.btn-primary { 
  background: var(--primary); 
  color: white; 
  padding: 10px 20px; 
  border: none; 
  border-radius: 8px; 
  font-size: 0.875rem; 
  font-weight: 600; 
  cursor: pointer; 
  transition: all 0.2s; 
  display: inline-flex; 
  align-items: center; 
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
button.btn-primary:hover { 
  background: var(--primary-hover); 
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
button.btn-outline { 
  background: white; 
  border: 1px solid var(--border); 
  color: var(--secondary); 
  padding: 10px 16px; 
  border-radius: 8px; 
  font-weight: 600; 
  font-size: 0.875rem;
  cursor: pointer; 
  transition: all 0.2s;
}
button.btn-outline:hover { 
  background: #f8fafc; 
  border-color: #cbd5e1;
}

/* Grid System */
.grid-container { 
  padding: 24px 32px; 
  height: calc(100vh - 140px); 
  box-sizing: border-box; 
}
.table-wrapper { 
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background: white; 
  border-radius: 12px; 
  box-shadow: var(--shadow); 
  border: 1px solid var(--border); 
}

table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 1000px;}
th, td { padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 0.875rem; vertical-align: middle;}

thead th { 
  position: sticky; 
  top: 0; 
  z-index: 10; 
  font-weight: 600; 
  text-align: left; 
  color: var(--text-light); 
  background: #f8fafc; 
  text-transform: uppercase; 
  font-size: 0.75rem; 
  letter-spacing: 0.05em;
}

.col-sticky { 
  position: sticky; 
  left: 0; 
  background: white; 
  border-right: 1px solid var(--border); 
  z-index: 11;
}
tr:hover td { background-color: #f8fafc; }

/* Status & Badges */
.status-pill { 
  padding: 4px 10px; 
  border-radius: 9999px; 
  font-size: 0.75rem; 
  font-weight: 600; 
  display: inline-flex; 
  align-items: center; 
  gap: 4px;
  background: #f1f5f9;
  color: #475569;
}
.status-pill.done { background: #dcfce7; color: #15803d; }
.status-pill.maintenance { background: #e0e7ff; color: #4338ca; }
.status-pill.execution { background: #fef9c3; color: #a16207; }
.status-pill.contract { background: #dbeafe; color: #1d4ed8; }
.status-pill.quote { background: #fef3c7; color: #92400e; }

/* Ticket Badges (v14.0) */
.badge-open { background: #fee2e2; color: #b91c1c; }
.badge-progress { background: #fef9c3; color: #a16207; }
.badge-done { background: #dcfce7; color: #15803d; }
.badge-closed { background: #f1f5f9; color: #475569; }

.badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

/* Action Buttons */
.btn-action { 
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 16px; 
  font-size: 0.813rem; 
  font-weight: 600;
  border-radius: 8px; 
  border: 1px solid var(--border); 
  background: white; 
  color: var(--secondary); 
  cursor: pointer; 
  transition: all 0.2s; 
  box-sizing: border-box;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  line-height: normal;
  outline: none;
  appearance: none;
  gap: 8px;
}

.btn-action.btn-dark {
  background: #1e293b;
  color: white;
  border: none;
}
.btn-action.btn-dark:hover { background: #334155; }

.btn-action.btn-white {
  background: white;
  color: #64748b;
  width: 42px;
  padding: 0;
}
.btn-action.btn-white:hover { 
  border-color: var(--primary); 
  color: var(--primary);
  background: #f5f3ff;
}

/* Drawer UI */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(2px);
  z-index: 2050;
  display: none;
}
.drawer { 
  position: fixed; 
  top: 10px; 
  right: -100%; 
  width: 1000px; 
  max-width: calc(100% - 20px); 
  height: calc(100% - 20px); 
  background: #fdfdfd; 
  border-radius: 20px;
  box-shadow: -20px 0 50px -10px rgb(0 0 0 / 0.15); 
  z-index: 2100; 
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
  display: flex; 
  flex-direction: column; 
  overflow: hidden;
}
.drawer-body input, .drawer-body select, .drawer-body textarea {
  box-sizing: border-box !important;
}
.drawer.open { right: 0; }

.drawer-content { 
  display: flex; 
  flex-direction: column; 
  height: 100%; 
  width: 100%; 
  overflow: hidden;
  flex: 1;
}

.drawer-header { 
  flex-shrink: 0;
  padding: 24px 32px; 
  border-bottom: 1px solid var(--border); 
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.btn-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 20px;
  line-height: 1;
}
.btn-close:hover {
  background: #fff1f2;
  color: var(--danger);
  border-color: #fecaca;
}

.drawer-body { 
  padding: 32px; 
  overflow-y: auto !important; 
  flex: 1; 
  min-height: 0;
  background: #fbfcfd; 
}
.drawer-footer { 
  padding: 20px 32px; 
  border-top: 1px solid var(--border); 
  background: white; 
  display: flex; 
  justify-content: flex-end; 
  gap: 12px;
}

/* Stepper Minimalist (v11.7) */
.stepper { 
  display: flex; 
  gap: 8px;
  margin-bottom: 24px; 
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border);
}
.step { 
  padding: 10px 16px;
  border-radius: 0;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-light);
  font-weight: 500;
  position: relative;
  font-size: 0.9rem;
}
.step.active {
  color: var(--primary);
  font-weight: 700;
}
.step.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
}
.phase-box {
  background: white;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
}
  border: 1px solid transparent;
}
.step:hover:not(.active) {
  background: rgba(255, 255, 255, 0.5);
  color: var(--secondary);
}
.step.active { 
  background: white; 
  color: var(--primary);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  border-color: rgba(79, 70, 229, 0.1);
}
.step-icon { 
  display: none; /* Removed icons for a cleaner look */
}
.step-label { 
  text-transform: none; 
  letter-spacing: normal;
}

/* Panels & Forms v6.9 */
.drawer-pane { 
  display: none; 
  background: white; 
  padding: 32px; 
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
  animation: fadeIn 0.3s ease;
}
.drawer-pane.active { display: block; }

.drawer-pane h3 { 
  margin: 0 0 24px 0; 
  font-size: 1.125rem; 
  color: var(--secondary); 
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 12px;
}

.drawer-pane h4 {
  margin: 24px 0 16px 0;
  font-size: 0.95rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

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

.form-group { margin-bottom: 0; } /* Managed by standard-row gap */
.form-group label { 
  display: block; 
  font-size: 0.813rem; 
  font-weight: 600; 
  color: var(--text-light); 
  margin-bottom: 8px; 
}

/* Global Input Override for Drawer */
.drawer-body input, 
.drawer-body select, 
.drawer-body textarea {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  background: white;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--secondary);
}

.drawer-body input:focus, 
.drawer-body select:focus, 
.drawer-body textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
  outline: none;
}

.drawer-body textarea { height: auto; padding: 12px; min-height: 80px; }

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

/* Forms */
.form-group { margin-bottom: 0; }
.form-group label { font-size: 0.813rem; font-weight: 600; color: #475569; margin-bottom: 8px; display: block; }
.form-group input, .form-group select, .form-group textarea { 
  width: 100%; 
  height: 42px;
  border: 1px solid var(--border); 
  border-radius: 8px; 
  padding: 0 12px; 
  font-size: 0.875rem;
  transition: all 0.2s;
  background: #f8fafc;
  box-sizing: border-box;
}

/* Modal Grid System */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 30px;
}
.modal-grid .full-width {
  grid-column: 1 / -1;
}
.modal-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { 
  border-color: var(--primary); 
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
  background: white;
  outline: none;
}

.action-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

/* User Profile */
.user-profile { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  padding: 6px 12px; 
  background: #f1f5f9; 
  border-radius: 8px; 
  font-size: 0.813rem; 
  font-weight: 600;
}
.logout-btn { color: var(--danger); text-decoration: none; font-size: 0.75rem; margin-left: 4px; }
.logout-btn:hover { text-decoration: underline; }

.login-overlay { 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background: #f1f5f9; /* Soft background */
  background-image: radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.05) 0, transparent 50%), 
                    radial-gradient(at 50% 0%, rgba(99, 102, 241, 0.05) 0, transparent 50%);
  display: flex; 
  justify-content: center; 
  align-items: center; 
  z-index: 9999; 
}
.login-card { 
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 48px; 
  border-radius: 24px; 
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05);
  animation: fadeIn 0.5s ease-out;
}
.login-header {
  text-align: center;
  margin-bottom: 40px;
}
.login-logo {
  width: 56px;
  height: 56px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
  border-radius: 14px;
  margin: 0 auto 20px;
  box-shadow: 0 8px 16px -4px rgba(79, 70, 229, 0.3);
}
.login-header h2 {
  color: var(--secondary);
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.login-header p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 10px 0 0;
}
.login-body .form-group {
  margin-bottom: 20px;
}
.login-body .form-group label {
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 8px;
  display: block;
}
.login-body .input-wrapper {
  position: relative;
  width: 100%;
}
.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  opacity: 0.5;
  pointer-events: none;
  z-index: 2;
}
.login-body input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.2s;
  box-sizing: border-box;
  display: block;
}
.login-body input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
  outline: none;
}
.login-error {
  color: #ef4444;
  font-size: 0.8rem;
  min-height: 20px;
  margin-top: -10px;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 500;
}
.btn-login {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 5px;
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.2);
}
.btn-login:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 12px 20px -3px rgba(79, 70, 229, 0.3);
}
.btn-login:active {
  transform: translateY(1px);
}

/* Modals Overlay Fix */
.modal-overlay { 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background: rgba(15, 23, 42, 0.4); 
  backdrop-filter: blur(4px); 
  display: none; 
  justify-content: center; 
  align-items: center; 
  z-index: 3000; 
}
.modal-content { 
  background: white; 
  padding: 32px; 
  border-radius: 16px; 
  box-shadow: var(--shadow-lg); 
  border: 1px solid var(--border); 
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Modal Form Buttons - Fix width */
.modal-content .btn-primary, 
.modal-content .btn-outline {
  width: auto;
  min-width: 120px;
  justify-content: center;
}

/* Missing Badges for Clients/Infra */
.badge.domain { background: #dcfce7; color: #15803d; }
.badge.hosting { background: #dbeafe; color: #1d4ed8; }
.badge.vps { background: #fee2e2; color: #991b1b; }

.table-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.813rem;
  background: #f8fafc;
  transition: all 0.2s;
  color: var(--text);
}
.table-input:hover { background: #f1f5f9; border-color: var(--border); }
.table-input:focus { background: white; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); outline: none; }

.password-wrapper { display: flex; align-items: center; position: relative; }
.password-wrapper input { padding-right: 32px; font-family: monospace; letter-spacing: 2px;}
.toggle-pass { 
  position: absolute; 
  right: 4px; 
  background: transparent; 
  border: none; 
  cursor: pointer; 
  color: var(--text-light); 
  font-size: 0.9rem; 
  padding: 6px; 
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toggle-pass:hover { color: var(--primary); background: #f1f5f9;}

/* Tab Panes */
.tab-pane { 
  display: none; 
  height: 100%;
}
.tab-pane.active { 
  display: block; 
  animation: fadeIn 0.4s ease-out; 
}

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

/* Cards (Used in Settings & Infas) */
.card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
}
.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
.card-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
}
.card-body {
  padding: 24px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* Drawer Grid System v3.1 */
.drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 30px;
  margin-bottom: 20px;
}
.drawer-grid .full-width {
  grid-column: 1 / -1;
}
.drawer-pane h3 {
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
  color: var(--secondary);
  font-size: 1.1rem;
}
.drawer-pane .form-group label {
  margin-bottom: 8px;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.85rem;
}

/* Lean Delete Button v6.4 */
.btn-delete-small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #fff1f2;
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}
.btn-delete-small:hover {
  background: #fecaca;
  color: #b91c1c;
  transform: scale(1.1);
}
/* Progress & Technical Execution (v14.4) */
.progress-container {
  margin-bottom: 24px;
  background: #f0f9ff;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #bae6fd;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.progress-info {
  display: flex;
  flex-direction: column;
}
.progress-title {
  font-weight: 700;
  color: #0369a1;
  font-size: 0.938rem;
}
.progress-subtitle {
  font-size: 0.813rem;
  color: #075985;
  margin-top: 2px;
}
.progress-track {
  width: 180px;
  height: 10px;
  background: #e0f2fe;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #bae6fd;
}
.progress-fill {
  height: 100%;
  background: var(--success);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.execution-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  transition: all 0.2s;
  border-left: 6px solid var(--warning);
}
.execution-card.done {
  border-left-color: var(--success);
}
.execution-card:hover {
  box-shadow: var(--shadow);
  transform: translateX(4px);
}
.execution-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.execution-title {
  font-weight: 700;
  color: var(--secondary);
  font-size: 1rem;
  line-height: 1.4;
}
.execution-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: var(--bg);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.813rem;
}
.meta-label {
  color: var(--text-light);
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}
.meta-value {
  font-weight: 700;
  color: var(--secondary);
}
.meta-value.expiry {
  color: var(--danger);
}

.date-shortcut-mini {
  background: #fffbeb;
  color: #d97706;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 0.55rem;
  font-weight: 900;
  cursor: pointer;
  border: 1px solid #fef3c7;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  line-height: 1;
}
.date-shortcut-mini:hover {
  background: #fcd34d;
  color: #78350f;
  transform: scale(1.1);
}
/* Support Ticket Conversation (v14.10.14) */
.ticket-thread {
  max-height: 400px;
  overflow-y: auto;
  padding: 15px;
  background: #f8fafc;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.5;
  position: relative;
  word-wrap: break-word;
}
.chat-bubble.admin {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-bubble.client {
  align-self: flex-start;
  background: white;
  color: var(--text-main);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.chat-meta {
  font-size: 0.65rem;
  margin-bottom: 4px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.chat-meta.admin { justify-content: flex-end; color: var(--text-light); }
.chat-meta.client { justify-content: flex-start; color: var(--text-light); }

.reply-area {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  transition: all 0.2s;
}
.reply-area:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
/* Rich Editor Toolbar (v14.10.16) */
.editor-toolbar {
  display: flex;
  gap: 5px;
  padding: 8px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-bottom: none;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  align-items: center;
}
.editor-toolbar button {
  background: transparent;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: #4b5563;
  font-weight: 800;
  font-size: 0.85rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.editor-toolbar button:hover {
  background: #f3f4f6;
  color: var(--primary);
}
.editor-toolbar .divider {
  width: 1px;
  height: 18px;
  background: #e5e7eb;
  margin: 0 5px;
}

/* Global Font Fix for Form Elements */
input, textarea, select, button {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

textarea.with-toolbar {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}
