/* ============================================================
   components.css — buttons, cards, forms, tables, badges,
                    toasts, modals, spinners
   Web Oshkosh Aurora Design System — Dashboard Edition
   ============================================================ */

/* ------ Buttons ------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  white-space: nowrap;
  background: none;
  color: var(--text);
  font-family: 'Inter', sans-serif;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #00d1ff, #4cd6ff);
  color: #001f28;
  border-color: transparent;
  box-shadow: 0 0 16px rgba(0, 209, 255, 0.25);
}

/* Prevent anchor :hover from overriding button text color */
a.btn-primary,
a.btn-primary:hover {
  color: #001f28;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(0, 209, 255, 0.45);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-danger {
  background: rgba(255, 180, 171, 0.15);
  color: var(--danger);
  border-color: rgba(255, 180, 171, 0.25);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(255, 180, 171, 0.25);
  border-color: rgba(255, 180, 171, 0.45);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: #a4e6ff;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(0, 209, 255, 0.08);
  border-color: rgba(0, 209, 255, 0.25);
}

.btn-sm {
  padding: 0.3rem 0.625rem;
  font-size: 0.8125rem;
}

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

/* ------ Cards ------ */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

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

.card-header h3 {
  font-size: 0.9375rem;
  color: var(--text);
}

.card-footer {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  text-align: center;
}

/* ------ Forms ------ */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(47, 52, 69, 0.4);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  font-family: 'Inter', sans-serif;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: rgba(47, 52, 69, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 209, 255, 0.12);
}

/* select arrow */
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23859399' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* Dropdown option list background */
.form-group select option,
.filter-bar select option {
  background: #1a1f2f;
  color: var(--text);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

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

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ------ Tables ------ */
.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table thead th {
  text-align: left;
  padding: 0.625rem 0.875rem;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table tbody td {
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  color: var(--text);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover td {
  background: rgba(0, 209, 255, 0.04);
}

.table-empty {
  text-align: center;
  padding: 2.5rem;
  color: var(--text-muted);
}

/* ------ Badges ------ */
.badge {
  display: inline-block;
  padding: 0.2rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  text-transform: capitalize;
}

/* Request status */
.badge-submitted   { background: rgba(0,  209, 255, 0.12); color: #a4e6ff; }
.badge-in_progress { background: rgba(255, 213, 156, 0.12); color: #ffd59c; }
.badge-completed   { background: rgba(74,  222, 128, 0.12); color: #4ade80; }
.badge-declined    { background: rgba(255, 180, 171, 0.12); color: #ffb4ab; }

/* Priority */
.badge-high   { background: rgba(255, 180, 171, 0.12); color: #ffb4ab; }
.badge-normal { background: rgba(164, 230, 255, 0.08); color: var(--text-muted); }
.badge-low    { background: rgba(74,  222, 128, 0.10); color: #4ade80; }

/* Site status */
.badge-active      { background: rgba(74,  222, 128, 0.12); color: #4ade80; }
.badge-inactive    { background: rgba(164, 230, 255, 0.06); color: var(--text-muted); }
.badge-maintenance { background: rgba(255, 213, 156, 0.12); color: #ffd59c; }

/* Account status */
.badge-enabled  { background: rgba(74,  222, 128, 0.12); color: #4ade80; }
.badge-disabled { background: rgba(255, 180, 171, 0.12); color: #ffb4ab; }

/* ------ Stat cards ------ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
}

.stat-card .stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

/* ------ Admin dashboard cards ------ */
.dash-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .dash-top-row { grid-template-columns: 1fr; }
}

.dash-todo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dash-todo-list li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
}

.dash-todo-list li a:hover {
  background: rgba(255, 255, 255, 0.04);
}

.dash-todo-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.375rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  background: rgba(0, 209, 255, 0.12);
  color: var(--accent);
  flex-shrink: 0;
}

.dash-mrr-values {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dash-mrr-primary {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.dash-mrr-secondary {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.dash-mrr-clients {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.badge-accent {
  background: rgba(0, 209, 255, 0.12);
  color: var(--accent);
}

/* ------ Toast ------ */
#toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast-item {
  padding: 0.75rem 1.125rem;
  padding-left: 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(26, 31, 47, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: auto;
}

.toast-item.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-info    { border-left: 3px solid var(--accent); }

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

.modal {
  background: rgba(26, 31, 47, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 480px;
  padding: 1.5rem;
}

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

.modal-header h3 {
  font-size: 1rem;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.15s;
}

.modal-close:hover {
  color: var(--accent);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

/* ------ Invite result box ------ */
.invite-result {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(0, 209, 255, 0.05);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 209, 255, 0.15);
}

.invite-result p {
  font-size: 0.8125rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.invite-url-box {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.invite-url-box input {
  flex: 1;
  font-size: 0.8125rem;
  padding: 0.4rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(47, 52, 69, 0.4);
  color: var(--accent);
}

/* ------ Spinner ------ */
.spinner {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(0, 209, 255, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-lg {
  width: 2.5rem;
  height: 2.5rem;
  border-width: 3px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-center {
  display: flex;
  justify-content: center;
  padding: 3rem;
}

/* ------ Inline detail row (requests table) ------ */
tr.request-row-active td {
  background: rgba(0, 209, 255, 0.06);
  border-bottom: none;
}

#inlineDetailRow td {
  padding: 0 !important;
  border-bottom: 1px solid var(--border);
}

.inline-detail-panel {
  background: rgba(20, 25, 42, 0.85);
  border-top: 1px solid rgba(0, 209, 255, 0.12);
  padding: 1.25rem 1.25rem 1rem;
  animation: slideDown 0.18s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.inline-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  color: var(--text);
}

.detail-actions {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.detail-actions .form-group {
  margin-bottom: 0;
}

/* ------ Features list ------ */
.features-list {
  list-style: none;
  padding: 0;
}

.features-list li {
  padding: 0.25rem 0;
  color: var(--text);
  font-size: 0.875rem;
}

.features-list li::before {
  content: '✓ ';
  color: var(--success);
  font-weight: 700;
}

/* ------ Invoice list ------ */
.invoice-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0.875rem;
  background: rgba(74, 222, 128, 0.05);
  border: 1px solid rgba(74, 222, 128, 0.12);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}

.invoice-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.invoice-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s;
}

.invoice-row:hover {
  border-color: rgba(0, 209, 255, 0.2);
}

.invoice-row.invoice-row-open {
  border-color: rgba(0, 209, 255, 0.25);
}

.invoice-row-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(47, 52, 69, 0.25);
  user-select: none;
}

.invoice-row-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.invoice-number {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
}

.invoice-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.invoice-row-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.invoice-amount {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
}

.invoice-chevron {
  color: var(--text-muted);
  font-size: 1.125rem;
  transition: transform 0.2s;
  line-height: 1;
}

.invoice-row.invoice-row-open .invoice-chevron {
  transform: rotate(90deg);
}

.invoice-row-detail {
  display: none;
  padding: 0.875rem 1rem;
  background: rgba(20, 25, 42, 0.6);
  border-top: 1px solid var(--border-subtle);
  flex-direction: column;
  gap: 0.5rem;
}

.invoice-row.invoice-row-open .invoice-row-detail {
  display: flex;
}

.invoice-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.invoice-detail-item > span:first-child {
  color: var(--text-muted);
}

.invoice-detail-item > span:last-child {
  color: var(--text);
  font-weight: 500;
}

.invoice-detail-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.375rem;
}

/* ------ Filter bar ------ */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-bar select {
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(47, 52, 69, 0.4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23859399' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  color: var(--text);
  cursor: pointer;
  appearance: none;
  outline: none;
  transition: border-color 0.2s;
  font-family: 'Inter', sans-serif;
}

.filter-bar select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 209, 255, 0.12);
}

/* ------ Toggle group ------ */
.toggle-group {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.toggle-btn {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.toggle-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.toggle-btn.active {
  background: var(--accent);
  color: var(--bg);
}

/* ------ Onboarding stepper ------ */
.stepper-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.stepper-modal {
  background: rgba(26, 31, 47, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.stepper-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.stepper-progress {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.stepper-progress-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}

.stepper-progress-dot.active {
  background: var(--accent);
}

.stepper-progress-dot.done {
  background: var(--success);
}

.stepper-step-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stepper-step-label span {
  color: var(--accent);
}

.stepper-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.stepper-body h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.stepper-body p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

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

.stepper-footer-right {
  display: flex;
  gap: 0.5rem;
}

/* ------ Upload area (onboarding) ------ */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--accent);
  background: rgba(0, 209, 255, 0.04);
}

.upload-area p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.upload-file-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.upload-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(47, 52, 69, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
}

.upload-file-item .file-name {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.upload-file-item .file-status {
  font-size: 0.75rem;
  color: var(--success);
}

.upload-file-item .file-status.uploading {
  color: var(--accent);
}

.upload-file-item .file-status.error {
  color: var(--danger);
}

/* ------ Preview card ------ */
.preview-card {
  padding: 1.25rem;
  border: 1px solid rgba(0, 209, 255, 0.15);
  border-radius: var(--radius-lg);
  background: rgba(0, 209, 255, 0.03);
}

.preview-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* ------ Timeline (event log) ------ */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.4375rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.25rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -1.125rem;
  top: 0.375rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--bg);
}

.timeline-dot.system {
  background: var(--accent);
}

.timeline-dot.admin {
  background: var(--warning);
}

.timeline-dot.client {
  background: var(--success);
}

.timeline-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.timeline-content {
  font-size: 0.875rem;
  color: var(--text);
}

.timeline-content .badge {
  margin-right: 0.375rem;
}

/* Event type badge colors */
.badge-system  { background: rgba(0, 209, 255, 0.12); color: #a4e6ff; }
.badge-admin   { background: rgba(255, 213, 156, 0.12); color: #ffd59c; }
.badge-client  { background: rgba(74, 222, 128, 0.12); color: #4ade80; }

/* Color swatch (intake display) */
.color-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
}

.color-swatch-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
}

/* Onboarding status badges */
.badge-pending_review    { background: rgba(0, 209, 255, 0.12); color: #a4e6ff; }
.badge-approved          { background: rgba(74, 222, 128, 0.12); color: #4ade80; }
.badge-changes_requested { background: rgba(255, 213, 156, 0.12); color: #ffd59c; }

/* ------ Notification bell ------ */
.bell-wrap {
  position: relative;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem;
}

.bell-icon {
  color: var(--accent);
  display: block;
  transition: opacity 0.15s, transform 0.15s;
}

.bell-wrap:hover .bell-icon {
  opacity: 0.75;
  transform: scale(1.08);
}

.bell-badge {
  position: absolute;
  top: -1px;
  right: -3px;
  background: var(--accent);
  color: #001f28;
  font-size: 0.6rem;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  box-shadow: 0 0 8px rgba(0, 209, 255, 0.5);
}

/* ------ Notification list ------ */
.notif-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.15s;
}

.notif-item:hover {
  background: rgba(0, 209, 255, 0.04);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 0.375rem;
}

.notif-dot.unread {
  background: var(--accent);
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 0.125rem;
}

.notif-title.unread {
  font-weight: 600;
}

.notif-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 0.25rem;
}

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

/* ------ Sidebar cards (page-layout right column) ------ */
.sidebar-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.sidebar-card-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* ------ Responsive table → stacked cards on mobile ------ */
@media (max-width: 768px) {
  .responsive-table thead { display: none; }

  .responsive-table tbody tr {
    display: block;
    border-radius: var(--radius);
    border: 1px solid var(--card-border);
    padding: 12px 14px;
    margin-bottom: 10px;
    background: var(--card-bg);
  }

  .responsive-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border: none;
    font-size: 14px;
  }

  .responsive-table tbody td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-right: 12px;
  }

  /* Remove last-child border from table when stacked */
  .responsive-table tbody tr:last-child {
    margin-bottom: 0;
  }

  /* Stack two-column form rows on mobile */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Stack inline profile/plan grids on mobile */
  #profileView,
  .plan-detail-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ------ Quota progress ------ */
.quota-bar {
  display: flex;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.quota-pip {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  transition: background 0.3s;
}

.quota-pip.used {
  background: var(--accent);
}

.quota-pip.over {
  background: var(--danger);
}
