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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #f5f5f5;
  min-height: 100vh;
  display: flex;
  color: #2c2c2c;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: white;
  border-right: 1px solid #e0e0e0;
  padding: 20px;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-header { padding: 15px 10px 25px 10px; border-bottom:1px solid #e0e0e0; margin-bottom: 30px; }
.sidebar-header img { width:100%; max-width:200px; height:auto; display:block; margin:0 auto; }
.sidebar-header .logo-tagline { margin-top:10px; text-align:center; font-size:14px; color:var(--muted); }

.nav-section { margin-bottom: 30px; }
.nav-section-title {
  font-size: 12px; text-transform: uppercase; color: #999; letter-spacing: 1px; margin-bottom: 15px; font-weight: 600;
}

.nav-chip {
  display: block; width:100%;
  padding: 12px 20px; margin-bottom: 8px;
  background: #000; border: 1px solid #000; border-radius: 25px;
  color: #fff; text-decoration: none; font-size: 14px; font-weight: 500;
  transition: all 0.2s ease; cursor: pointer; text-align: center;
}
.nav-chip:hover { background: #333; border-color: #333; transform: translateX(5px); }
.nav-chip[aria-current="page"] { background:#444; color:#fff; border-color:#444; }
.nav-chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Main */
.main-content { margin-left: 250px; flex: 1; padding: 20px; width: calc(100% - 250px); }

.container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}
.container.full-width { border-radius: 0; box-shadow: none; }

.header {
  background: #2c2c2c; color: white; padding: 30px;
  display: flex; justify-content: space-between; align-items: center;
}
.header h1 { font-size: 24px; font-weight: 500; }

.controls {
  padding: 20px 30px; background: #fafafa; border-bottom: 1px solid #e0e0e0;
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
}

/* Reusable card layout to match home page styling */
.section-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}
.section-card .section-header {
  background: #2c2c2c;
  color: #fff;
  padding: 20px 30px;
}
.section-card .section-header h2 {
  margin: 0;
  font-size: 20px;
}
.section-card .section-body {
  padding: 20px 30px;
}

/* Buttons */
button {
  padding: 10px 18px; border: 1px solid #d0d0d0; border-radius: 20px;
  font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s ease;
  display: inline-flex; align-items: center; gap: 8px; background: white; color: #2c2c2c;
}
button:hover { background:#f5f5f5; border-color:#999; }
.btn-dark { background:#2c2c2c; color:#fff; border-color:#2c2c2c; }
.btn-dark:hover { background:#404040; border-color:#404040; }

/* Table */
.table-container { padding:20px; overflow-x:auto; max-height:600px; overflow-y:auto; }
table { width:100%; border-collapse: separate; border-spacing: 0 8px; }
th {
  background:#fafafa; padding:12px 10px; text-align:left; font-weight:600; color:#666;
  font-size:13px; text-transform:uppercase; letter-spacing:.5px;
  border-bottom:2px solid #e0e0e0; position: sticky; top:0; z-index:10;
}
td { padding:8px; background:#fff; }
tr { background:#fff; }

.search-input {
  flex:1; max-width:400px; padding:10px 20px; border:1px solid #e0e0e0; border-radius:25px; font-size:14px; background:#fff; outline:none;
}
.search-input:focus { border-color:#666; box-shadow:0 0 0 2px rgba(0,0,0,.05); }

.chip-input {
  display:inline-block; padding:8px 14px; background:#f5f5f5; border:1px solid #e0e0e0;
  border-radius:20px; font-size:14px; min-width:100px; width:100%; transition:all .2s ease; outline:none; font-family:inherit;
}
input[type="date"].chip-input { padding:7px 14px; }
input[type="file"].chip-input { padding:6px 14px; }
.chip-input:hover { background:white; border-color:#999; }
.chip-input:focus { background:white; border-color:#666; box-shadow:0 0 0 2px rgba(0,0,0,.05); }

.chip-select {
  display:inline-block; padding:8px 14px; background:#f5f5f5; border:1px solid #e0e0e0; border-radius:20px; font-size:14px; min-width:140px; width:100%; transition:all .2s ease; outline:none; font-family:inherit; cursor:pointer;
}
.chip-select:hover { background:white; border-color:#999; }
.chip-select:focus { background:white; border-color:#666; box-shadow:0 0 0 2px rgba(0,0,0,.05); }

/* Toggle switch */
.toggle {
  appearance: none;
  width: 40px;
  height: 20px;
  background: #e0e0e0;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: background 0.2s ease;
  margin-right: 8px;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.toggle:checked {
  background: #2c2c2c;
}
.toggle:checked::after {
  transform: translateX(20px);
}

.status-awaiting { background:#fff3cd; border-color:#ffc107; }
.status-placed   { background:#d4edda; border-color:#28a745; }
.status-refunded { background:#f8d7da; border-color:#dc3545; }
.status-paid { background:#d4edda; border-color:#28a745; }
.status-disputed { background:#fff3cd; border-color:#ffc107; }

.readonly .chip-input:disabled,
.readonly .chip-select:disabled {
  background:#e9e9e9;
  color:#777;
  cursor:not-allowed;
}

.delete-btn { background:#f5f5f5; color:#666; padding:6px 12px; border-radius:15px; font-size:12px; border:1px solid #e0e0e0; }
.delete-btn:hover { background:#e0e0e0; border-color:#999; }
.place-btn { background:#2c2c2c; color:#fff; padding:6px 12px; border-radius:15px; font-size:12px; border:1px solid #2c2c2c; margin-right:4px; }
.place-btn:hover { background:#404040; border-color:#404040; }

/* Modals */
.modal {
  position: fixed; top:0; left:0; width:100%; height:100%;
  background: rgba(0,0,0,0.5); z-index:1000;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal[hidden] { display:none; }
.modal-content {
  background:white; padding:30px; border-radius:12px; max-width:500px; width:90%;
  box-shadow:0 10px 40px rgba(0,0,0,.2);
}
.modal-buttons { display:flex; gap:10px; justify-content:flex-end; }

/* Toast */
.email-notification {
  position: fixed; top: 20px; right: 20px; background: white; padding: 20px; border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15); display: none; max-width: 350px; z-index: 2000;
}
.email-notification h3 { margin-bottom: 10px; color: #2c2c2c; font-size: 16px; }
.email-notification p { color: #666; font-size: 14px; line-height: 1.5; }

/* Placeholder */
.placeholder-content { padding: 40px; text-align:center; color:#666; }
.placeholder-content h2 { font-size: 32px; margin-bottom: 20px; color: #2c2c2c; }
.placeholder-content p { font-size: 16px; line-height:1.6; max-width:600px; margin:0 auto; }
.integration-list {
  list-style: none;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.integration-list li {
  background: #f5f5f5;
  padding: 20px;
  border-radius: 8px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.integration-icon {
  width: 32px;
  height: 32px;
}
.stats-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap:20px; padding:20px; }
.stat-card { background:#f5f5f5; padding:25px; border-radius:12px; text-align:center; }
.stat-card h3 { color:#999; font-size:14px; text-transform:uppercase; margin-bottom:10px; }
.stat-card .number { font-size:36px; font-weight:bold; color:#2c2c2c; }

/* Calendar demo */
/* Improved calendar styling for better visual clarity */
.calendar-wrapper {
  padding:40px;
  max-width:700px;
  margin:0 auto;
  background:#fff;
  border-radius:12px;
  box-shadow:0 4px 12px rgba(0,0,0,.05);
}
.calendar-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
}
.calendar-header h2 {
  font-size:24px;
  font-weight:600;
  flex:1;
  text-align:center;
}
.calendar-header button {
  background:#f5f5f5;
  border:1px solid #e0e0e0;
  border-radius:50%;
  cursor:pointer;
  width:32px;
  height:32px;
  font-size:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .2s,border-color .2s;
}
.calendar-header button:hover {
  background:#e0e0e0;
  border-color:#999;
}
.calendar-range {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:center;
  margin-bottom:10px;
}
.calendar-range input,
.calendar-range button {
  padding:6px 8px;
}
.calendar-table {
  width:100%;
  border-collapse:separate;
  border-spacing:4px;
}
.calendar-table th,
.calendar-table td {
  border:1px solid #e0e0e0;
  width:14.28%;
  padding:12px;
  text-align:center;
  background:#fff;
  border-radius:8px;
  height:80px;
  vertical-align:top;
}
.calendar-table tbody td:nth-child(1),
.calendar-table tbody td:nth-child(7) {
  color:#9b2c2c;
}
.calendar-table th {
  background:#fafafa;
  font-weight:600;
  color:#666;
}
.calendar-table td:hover {
  background:#f5f5f5;
}
.calendar-table td.today {
  background:#e0f7ff;
  border-color:#4f46e5;
  box-shadow:0 0 0 2px rgba(79,70,229,.2) inset;
  font-weight:700;
}
.calendar-table td.holiday {
  background:#fff8e1;
  border-color:#f0c36d;
}
.calendar-table .chip {
  display:block;
  margin:4px auto 0;
  background:#34a853;
  border-color:#34a853;
  color:#fff;
}
.calendar-table .range-bar {
  position:absolute;
  display:flex;
  align-items:center;
  justify-content:center;
  height:32px;
  margin-top:0;
  cursor:pointer;
  z-index:1;
  background:#34a853;
  border-color:#34a853;
  color:#fff;
  font-size:14px;
}
.calendar-table .holiday-chip {
  background:#ffecb3;
  border-color:#f0c36d;
}

.calendar-table td.has-event {
  background:#e6ffe6;
  border-color:#34a853;
  box-shadow:0 0 0 2px rgba(52,168,83,.2) inset;
}

.month-events {
  margin-top:16px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.month-events .chip {
  width:fit-content;
  padding:6px 12px;
  font-size:14px;
}

/* Journeys */
.journeys-container { display:flex; flex-direction:column; gap:24px; }
.journey-canvas {
  position:relative;
  min-height:400px;
  background-image:radial-gradient(#e0e0e0 1px, transparent 1px);
  background-size:24px 24px;
}
.journey-node {
  position:absolute;
  width:220px;
  background:#fff;
  border:1px solid #e0e0e0;
  border-radius:8px;
  padding:12px;
  box-shadow:0 2px 4px rgba(0,0,0,0.05);
}
.node-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
}
.node-icons .icon { margin-left:6px; cursor:pointer; }
.node-stats { font-size:12px; color:#555; }
.journey-line {
  position:absolute;
  background:#999;
}
.journey-line.vertical { width:2px; }
.journey-line.horizontal { height:2px; }
.journey-circle {
  position:absolute;
  width:20px;
  height:20px;
  border:2px solid #999;
  border-radius:50%;
  background:#fff;
}
.journey-label {
  position:absolute;
  font-size:12px;
  background:#fff;
  border:1px solid #ccc;
  border-radius:12px;
  padding:2px 8px;
  white-space:nowrap;
}

/* Patient details modal */
.pd-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px 20px; }
.pd-field label { display:block; font-size:12px; color:#777; margin-bottom:4px; text-transform:uppercase; letter-spacing:.3px; }
.pd-value {
  background:#f9f9f9; border:1px solid #e0e0e0; border-radius:8px; padding:10px 12px; font-size:14px; color:#2c2c2c; min-height:38px; display:flex; align-items:center;
}
.pd-input {
  width:100%;
  background:#f9f9f9;
  border:1px solid #e0e0e0;
  border-radius:8px;
  padding:10px 12px;
  font-size:14px;
  color:#2c2c2c;
}
.pd-span-2 { grid-column: span 2; }

.row-actions { display:flex; gap:8px; align-items:center; }
.view-btn {
  background:#f5f5f5; color:#2c2c2c; border:1px solid #e0e0e0; border-radius:15px; padding:6px 12px; font-size:12px; cursor:pointer;
}
.view-btn:hover { background:#fff; border-color:#999; }

.view-btn.refund-btn {
  background: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}
.view-btn.refund-btn:hover {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}
.chip {
  display:inline-block;
  padding:2px 8px;
  background:#fafafa;
  border:1px solid #e0e0e0;
  border-radius:999px;
  font-size:12px;
  margin-top:4px;
}

.chip-badge {
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  margin-left:8px;
  color:#fff;
}

.chip-badge.bpi {
  background:linear-gradient(135deg,#FFD54F 0%,#FFC107 100%);
  color:#333;
}

.chip-badge.prorx {
  background:linear-gradient(135deg,#64B5F6 0%,#2196F3 100%);
}
.bubble-chip {
  display:flex;
  align-items:center;
  gap:8px;
  padding:12px 20px;
  background:#fff;
  border:1px solid #e0e0e0;
  border-radius:999px;
  box-shadow:0 2px 4px rgba(0,0,0,0.05);
  font-size:16px;
  margin:8px 0;
  flex-wrap:wrap;
}
.bubble-chip input,
.bubble-chip select,
.bubble-chip button {
  margin:0;
}
.patient-chip {
  background:#e0f7fa;
  border-color:#b2ebf2;
  color:#006064;
}
.chip-action {
  background:#007bff; color:#fff; border:1px solid #007bff; padding:8px 14px; border-radius:18px; font-size:13px; cursor:pointer;
}
.chip-action:hover { background:#0056b3; border-color:#0056b3; }

#orders-submitted-page #ordersSubmittedTable td {
  padding:8px;
}

#ordersSubmittedTable tbody tr {
  cursor:pointer;
}

#ordersSubmittedTable .chip {
  margin:2px 0;
}

#ordersSubmittedTable .status-received {
  background:#e0f7fa;
  border-color:#b2ebf2;
  color:#006064;
}

#ordersSubmittedTable .status-shipped {
  background:#e8f5e9;
  border-color:#c8e6c9;
  color:#1b5e20;
}

#ordersSubmittedTable .status-delivered {
  background:#fff3e0;
  border-color:#ffe0b2;
  color:#e65100;
}

#uploadedFiles,
#libraryFiles {
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

#uploadedFiles li,
#libraryFiles li {
  margin:0;
}

.modal-content.modal-xxl { max-width:1100px; width:95%; }

/* Tiny helpers */
.small-label { font-size:12px; color:#777; margin-bottom:4px; display:block; }
.muted { color:#777; font-size:13px; }
.divider { height:1px; background:#eee; margin:14px 0; }

.email-status { margin-top:6px; font-size:0.95rem; }
.email-status.ok { color:#0a7f2e; }
.email-status.err { color:#c1002a; }

/* Minimal styles for GLP tools inside Providers */
.glp-card { background:#fff; border:1px solid #eee; border-radius:8px; padding:20px; }
.glp-main-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.glp-tabs { display:flex; border-bottom:2px solid #eee; margin:10px 0 20px; }
.glp-tab { border:0; background:none; padding:10px 14px; cursor:pointer; color:#666; }
.glp-tab.active { color:#111; border-bottom:2px solid #111; font-weight:600; margin-bottom:-2px; }
.glp-tab-content { display:none; }
.glp-tab-content.active { display:block; }
.glp-form-group { margin-bottom:14px; }
.glp-form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.glp-button { background:#333; color:#fff; border:0; padding:10px 16px; border-radius:6px; cursor:pointer; }
.glp-button.glp-reset { background:#dc3545; }
.glp-chips { display:flex; flex-wrap:wrap; gap:8px; }
.glp-chip { border:1px solid #ddd; border-radius:16px; padding:6px 10px; font-size:12px; cursor:pointer; user-select:none; }
.glp-chip.active { background:#e7f1ff; border-color:#b8daff; }

/* Responsive */
@media (max-width: 900px){
  .main-content { margin-left: 0; }
  .sidebar { position: static; height:auto; }
  .glp-form-row { grid-template-columns:1fr; }
  .pd-grid { grid-template-columns:1fr; }
}

/* =========================
   Legacy GLP‑1 Tools
   Scope: #glp-tools-root
   ========================= */
#glp-tools-root {
  --bg: #f5f5f5;
  --card: #fff;
  --text: #333;
  --muted: #555;
  --border: #ddd;
  --primary: #007bff;
  --primary-hover: #0056b3;
  --danger: #dc3545;
  --danger-hover: #c82333;
  --success: #28a745;
  --accent: #17a2b8;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
}

/* Card container */
#glp-tools-root .glp-card {
  background: var(--card);
  padding: 24px 24px 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

/* Header */
#glp-tools-root .glp-main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 12px;
}
#glp-tools-root .glp-main-header h1 { margin: 0; font-size: 22px; }

/* Tabs */
#glp-tools-root .glp-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 18px;
}
#glp-tools-root .glp-tab {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  color: #666;
  border-bottom: 2px solid transparent;
}
#glp-tools-root .glp-tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
  font-weight: 600;
}

/* Tab content */
#glp-tools-root .glp-tab-content { display: none; }
#glp-tools-root .glp-tab-content.active { display: block; }
#glp-tools-root .glp-tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
#glp-tools-root .glp-tab-header h2 { margin: 0; font-size: 18px; }

/* Forms */
#glp-tools-root .glp-form-group { margin-bottom: 16px; }
#glp-tools-root label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
}
#glp-tools-root input,
#glp-tools-root select,
#glp-tools-root textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  box-sizing: border-box;
}
#glp-tools-root input:focus,
#glp-tools-root select:focus,
#glp-tools-root textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0,123,255,.08);
}
#glp-tools-root textarea { resize: vertical; min-height: 90px; }
#glp-tools-root .glp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Sections */
#glp-tools-root .glp-comments {
  background: #f6faff;
  border: 1px solid #cfe2ff;
  border-radius: 8px;
  padding: 12px;
}
#glp-tools-root .glp-email {
  background: #f0fff4;
  border: 1px solid #b8e6c1;
  border-radius: 8px;
  padding: 12px;
}

/* Email validation feedback */
#glp-tools-root .glp-email-status {
  margin-top: 6px;
  font-size: 12px;
  color: var(--success);
  display: none;
}
#glp-tools-root .glp-email-status.error {
  color: var(--danger);
  display: block;
}

/* Buttons */
#glp-tools-root .glp-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #333;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
#glp-tools-root .glp-button:hover { background: #555; border-color: #555; }
#glp-tools-root .glp-button.glp-reset {
  background: var(--danger);
  border-color: var(--danger);
}
#glp-tools-root .glp-button.glp-reset:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
}
#glp-tools-root .glp-button.glp-copy-instructions,
#glp-tools-root .glp-button.glp-copy-soap,
#glp-tools-root .glp-button.glp-generate-instructions {
  background: var(--primary);
  border-color: var(--primary);
}
#glp-tools-root .glp-button.glp-copy-instructions:hover,
#glp-tools-root .glp-button.glp-copy-soap:hover,
#glp-tools-root .glp-button.glp-generate-instructions:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Chips */
#glp-tools-root .glp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
#glp-tools-root .glp-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 12px;
  background: #fff;
  cursor: pointer;
  user-select: none;
}
#glp-tools-root .glp-chip.active { background: #e7f1ff; border-color: #b8daff; }
#glp-tools-root .glp-chip:focus { outline: 2px solid #b8daff; outline-offset: 2px; }

/* Instructions box */
#glp-tools-root #glp-instructions-box {
  display: none;
  margin-top: 16px;
  padding: 16px;
  background: #f9f9f9;
  border: 1px solid var(--border);
  border-radius: 8px;
}
#glp-tools-root #glp-instructions-content {
  line-height: 1.7;
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  background: #fff;
  padding: 14px;
  border-radius: 6px;
  max-height: 50vh;
  overflow: auto;
}
#glp-tools-root a.payment-url {
  color: var(--primary);
  text-decoration: underline;
  word-break: break-word;
}
#glp-tools-root a.payment-url:hover { color: var(--primary-hover); }

/* Helpers */
#glp-tools-root .muted { color: var(--muted); font-size: 12px; }

/* Responsive */
@media (max-width: 768px) {
  #glp-tools-root .glp-form-row { grid-template-columns: 1fr; }
  #glp-tools-root .glp-main-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@keyframes pulse { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }

/* Order Guide iframe */
.provider-availability-frame,
.order-guide-frame,
.journeys-frame,
.reviews-frame {
  width: 100%;
  height: 80vh;
  border: none;
}

/* Place Order controls */
.place-order-controls {
  padding: 20px 30px;
  background: #fafafa;
  border-bottom: 1px solid #e0e0e0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.place-order-controls label {
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
  color: #666;
}

.place-order-controls .chip-input,
.place-order-controls .chip-select {
  width: 100%;
}

/* Patient info */
.patient-info .info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 40px;
}

.patient-info .label {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 4px;
}

/* Prescription form */
.prescription-form .fields {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.prescription-form .form-group.full-width {
  grid-column: 1 / -1;
}

.prescription-form input:disabled,
.prescription-form textarea:disabled {
  background:#e9e9e9;
  color:#777;
  cursor:not-allowed;
}

.prescription-form .actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* Prescription detail */

.prescription-detail {
  display: none;
}

.prescription-detail pre {
  white-space: pre-wrap;
  font-family: inherit;
  margin: 0;
  padding: 12px;
  background: #f8f8f8;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
}


.prescription-detail .actions {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.prescription-detail.show {
  display: block;
}

/* RX instructions */
.rx-instructions pre {
  white-space: pre-wrap;
  background: #f8f8f8;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  padding: 12px;
  margin-top: 12px;
}

/* Admin Tools */
.admin-tools .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.admin-tools .controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-tools .chart-container {
  position: relative;
  height: 300px;
  margin-bottom: 24px;
}

#issues-page .chart-container {
  position: relative;
  height: 300px;
  margin-top: 24px;
}

#issuesTable {
  border-collapse: separate;
  border-spacing: 0 8px;
}

#issuesTable tr.bubble-chip {
  display: table-row;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  padding: 0;
}

#issuesTable tr.bubble-chip:nth-child(even) {
  background: #f9f9f9;
}

#issuesTable tr.bubble-chip td {
  padding: 12px 20px;
}

#issuesTable tr.issue-overdue {
  color: #e74c3c;
}

#issuesTable tr.issue-urgent {
  color: #e67e22;
}

.admin-tools .stats-comparison p {
  margin: 4px 0;
}

.admin-tools .stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f0f8ff;
  border: 1px solid #cce5ff;
  border-radius: 50%;
  padding: 24px;
  aspect-ratio: 1/1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.admin-tools .stat-chip .label {
  font-size: 18px;
  color: #555;
  text-align: center;
  margin-bottom: 8px;
}

.admin-tools .stat-chip .value {
  font-size: 32px;
  font-weight: 700;
}

.admin-tools .stat-chip:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.admin-tools .stat-chip.active {
  background: #e6f0ff;
  border-color: #99c5ff;
}

/* Previous dashboard table styles removed as the dashboard now only shows summary cards */


/* Login Page */
body.login-page {
  align-items: center;
  justify-content: center;
}

body.login-page .login-logo {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 150px;
}
body.login-page .logo-tagline {
  position: absolute;
  top: 80px;
  left: 20px;
  font-size: 14px;
  color: var(--muted);
}

.login-container {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 320px;
}

.login-container h1 {
  text-align: center;
  margin-bottom: 20px;
}

.login-container label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.login-container input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  font-size: 14px;
}

.login-container button {
  width: 100%;
}

/* Google Sign-In Styles */
.google-signin-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin: 20px 0;
}

/* User Management Styles */
.form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row select {
  flex: 1;
  min-width: 150px;
}

/* User management specific row actions */
.user-management .row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* User management specific chip actions */
.user-management .chip-action {
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid #d0d0d0;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.user-management .chip-action:hover {
  background: #f5f5f5;
  border-color: #999;
}

.user-management .chip-action.delete-btn {
  color: #dc3545;
  border-color: #dc3545;
}

.user-management .chip-action.delete-btn:hover {
  background: #dc3545;
  color: white;
}

/* Permissions Modal */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.modal-header h3 {
  margin: 0;
  color: #2c2c2c;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #666;
}

.modal-footer {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.permission-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #eee;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.permission-item:hover {
  background-color: #f8f9fa;
}

.permission-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.permission-item input[type="checkbox"] {
  margin: 0;
}

.permission-item span {
  font-size: 14px;
  user-select: none;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: 1px solid #6c757d;
}

.btn-secondary:hover {
  background: #5a6268;
  border-color: #545b62;
}

/* Status indicators - more specific selectors to avoid conflicts */
.user-management .status-paid,
.chip-select.status-paid {
  background-color: #d4edda;
  color: #155724;
}

.user-management .status-disputed,
.chip-select.status-disputed {
  background-color: #fff3cd;
  color: #856404;
}

.user-management .status-refunded,
.chip-select.status-refunded {
  background-color: #f8d7da;
  color: #721c24;
}

/* Success message styles */
.status-message.success {
  color: #155724;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  padding: 8px 12px;
  border-radius: 4px;
  margin-top: 10px;
}

/* Admin Tools Styles */
.admin-section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e0e0e0;
}

.admin-section:last-child {
  border-bottom: none;
}

.admin-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #2c2c2c;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: #f8f9fa;
  color: #495057;
  cursor: pointer;
  margin-right: 5px;
  transition: all 0.2s ease;
}

.btn-sm:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.btn-danger {
  background: #dc3545;
  border-color: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
  border-color: #bd2130;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 10px;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 8px;
  width: 16px;
  height: 16px;
}

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.permission-item {
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #f8f9fa;
}

.permission-item .checkbox-label {
  margin-bottom: 0;
}

/* Admin status message */
#adminStatus {
  margin-bottom: 20px;
}

/* User table enhancements */
#usersTable td:last-child {
  white-space: nowrap;
}

/* Activity filter */
#activityUserFilter {
  max-width: 200px;
  margin-right: 10px;
}

/* Form enhancements for user modals */
.form-group {
  margin-bottom: 15px;
}

.small-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 14px;
  color: #495057;
}

.chip-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  transition: border-color 0.2s ease;
}

.chip-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.modal-content h2 {
  margin-bottom: 20px;
  font-size: 20px;
  font-weight: 600;
}

