/* ==========================================================================
   OptiTourPlan — Enterprise Modern UI Refresh
   ========================================================================== */

:root {
  --otp-font: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --otp-font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --otp-bg: #f1f5f9;
  --otp-surface: #ffffff;
  --otp-border: #e2e8f0;
  --otp-border-light: #f1f5f9;
  --otp-text: #0f172a;
  --otp-text-muted: #64748b;
  --otp-text-subtle: #94a3b8;
  --otp-primary: #ea580c;
  --otp-primary-hover: #c2410c;
  --otp-primary-light: #fff7ed;
  --otp-accent: #2563eb;
  --otp-accent-light: #eff6ff;
  --otp-success: #059669;
  --otp-success-light: #ecfdf5;
  --otp-warning: #d97706;
  --otp-warning-light: #fffbeb;
  --otp-danger: #dc2626;
  --otp-danger-light: #fef2f2;
  --otp-radius-sm: 6px;
  --otp-radius: 10px;
  --otp-radius-lg: 14px;
  --otp-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --otp-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
  --otp-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --otp-spacing: 16px;
  --otp-header-height: 60px;
  --otp-header-offset: calc(var(--otp-header-height) + 5px);
}

/* Fixed navbar offset — #main in app.css sets margin-top: 10px (ID beats class) */
#main.main.otp-main-fullwidth {
  margin-top: var(--otp-header-offset);
  min-height: calc(100vh - var(--otp-header-offset));
  padding-top: 0;
}

/* Full-width layout chain (planning + app shell) */
html, body {
  width: 100%;
  max-width: 100%;
  font-family: var(--otp-font);
}

ui-view {
  display: block;
  width: 100%;
  max-width: 100%;
}

.otp-main-fullwidth,
.otp-content-fullwidth,
.otp-ui-view {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.otp-main-fullwidth {
  padding: 0 !important;
  margin-left: 0;
  margin-right: 0;
}

.otp-ui-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: calc(100vh - var(--otp-header-offset));
}

.otp-ui-view > * {
  width: 100%;
  max-width: 100%;
  flex: 1;
  box-sizing: border-box;
}

/* Typography override on planning screen */
.otp-planning-detail,
.otp-planning-detail .btn,
.otp-planning-detail input,
.otp-planning-detail select {
  font-family: var(--otp-font);
}

.otp-planning-detail {
  background: var(--otp-bg);
  color: var(--otp-text);
  padding: 12px 16px 16px;
  min-height: calc(100vh - 65px);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

/* ==========================================================================
   KPI Bar
   ========================================================================== */

.otp-kpi-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  background: var(--otp-surface);
  border: 1px solid var(--otp-border);
  border-radius: var(--otp-radius-lg);
  box-shadow: var(--otp-shadow);
  padding: 14px 16px;
  margin-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .otp-kpi-bar {
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    align-items: center;
  }
}

.otp-kpi-bar__planning {
  min-width: 0;
}

.otp-kpi-bar__title {
  font-family: var(--otp-font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--otp-text);
  margin: 0 0 2px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.otp-kpi-bar__subtitle {
  font-size: 12px;
  color: var(--otp-text-muted);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.otp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.otp-kpi-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--otp-bg);
  border: 1px solid var(--otp-border-light);
  border-radius: var(--otp-radius);
  padding: 7px 10px;
  min-width: 0;
}

.otp-kpi-card--highlight {
  background: var(--otp-primary-light);
  border-color: #fed7aa;
}

.otp-kpi-card--warning {
  background: var(--otp-warning-light);
  border-color: #fde68a;
}

.otp-kpi-card__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--otp-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.otp-kpi-card__icon--blue { background: var(--otp-accent-light); color: var(--otp-accent); }
.otp-kpi-card__icon--green { background: var(--otp-success-light); color: var(--otp-success); }
.otp-kpi-card__icon--orange { background: var(--otp-primary-light); color: var(--otp-primary); }
.otp-kpi-card__icon--red { background: var(--otp-danger-light); color: var(--otp-danger); }

.otp-kpi-card__value {
  font-family: var(--otp-font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--otp-text);
  line-height: 1.1;
  white-space: nowrap;
}

.otp-kpi-card__label {
  font-size: 10px;
  font-weight: 600;
  color: var(--otp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Main layout
   ========================================================================== */

.otp-planning-body {
  display: flex;
  flex: 1;
  gap: 12px;
  min-height: 0;
  width: 100%;
  max-width: 100%;
}

.otp-sidebar {
  flex: 0 0 380px;
  width: 380px;
  max-width: 42%;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  background: var(--otp-surface);
  border: 1px solid var(--otp-border);
  border-radius: var(--otp-radius-lg);
  box-shadow: var(--otp-shadow);
  overflow: hidden;
}

.otp-map-panel {
  flex: 1 1 auto;
  display: flex;
  overflow: hidden;
  min-width: 0;
  width: 100%;
}

.otp-map-card {
  flex: 1;
  margin: 0 !important;
  border-radius: var(--otp-radius-lg) !important;
  box-shadow: var(--otp-shadow) !important;
  border: 1px solid var(--otp-border) !important;
  overflow: hidden;
}

/* ==========================================================================
   Sidebar tabs
   ========================================================================== */

.otp-sidebar-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 12px 0;
  border-bottom: 1px solid var(--otp-border);
  background: var(--otp-surface);
}

.otp-sidebar-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  background: transparent;
  border-radius: var(--otp-radius-sm) var(--otp-radius-sm) 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--otp-text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  margin-bottom: -1px;
}

.otp-sidebar-tab:hover {
  color: var(--otp-text);
  background: var(--otp-bg);
}

.otp-sidebar-tab.active {
  color: var(--otp-primary);
  background: var(--otp-primary-light);
  border-bottom: 2px solid var(--otp-primary);
}

.otp-sidebar-tab__badge {
  background: var(--otp-border);
  color: var(--otp-text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 20px;
}

.otp-sidebar-tab.active .otp-sidebar-tab__badge {
  background: var(--otp-primary);
  color: #fff;
}

.otp-sidebar-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* ==========================================================================
   Sidebar toolbar (sticky search)
   ========================================================================== */

.otp-sidebar-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--otp-surface);
  padding: 12px;
  border-bottom: 1px solid var(--otp-border-light);
}

.otp-search-input {
  width: 100%;
  border: 1px solid var(--otp-border);
  border-radius: var(--otp-radius-sm);
  padding: 8px 12px 8px 34px;
  font-size: 13px;
  color: var(--otp-text);
  background: var(--otp-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat 10px center;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.otp-search-input:focus {
  outline: none;
  border-color: var(--otp-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background-color: var(--otp-surface);
}

.otp-sidebar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
  align-items: center;
}

.otp-sidebar-filters md-checkbox {
  margin: 0;
}

.otp-sidebar-filters md-checkbox .md-label {
  font-size: 12px;
  color: var(--otp-text-muted);
}

.otp-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--otp-text-muted);
  border-bottom: 1px solid var(--otp-border-light);
}

/* ==========================================================================
   Customer / Driver cards list
   ========================================================================== */

.otp-card-list-scroll,
.otp-card-list-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 8px 12px 12px;
}

.otp-card-list-scroll {
  overflow-y: auto;
}

.otp-card-list-area > table.otp-card-list-table {
  flex: 1 1 auto;
  min-height: 0;
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
}

.otp-card-list-area > [ng-table-pagination],
.otp-list-panel__body--paged > [ng-table-pagination] {
  display: none !important;
}

.otp-card-list-area > .otp-table-pager,
.otp-list-panel__body--paged > .otp-table-pager {
  flex: 0 0 auto;
  padding-top: 8px;
  border-top: 1px solid var(--otp-border-light);
  background: var(--otp-surface);
}

.otp-card-list-scroll::-webkit-scrollbar,
.otp-list-panel__body--paged > table.otp-card-list-table::-webkit-scrollbar {
  width: 6px;
}

.otp-card-list-scroll::-webkit-scrollbar-thumb,
.otp-list-panel__body--paged > table.otp-card-list-table::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.otp-card-list-table {
  width: 100%;
  border: none !important;
  margin: 0 !important;
}

.otp-card-list-table thead {
  display: none;
}

.otp-card-list-table tbody > tr.otp-ng-table-header {
  display: none !important;
}

.otp-card-list-table tbody > tr {
  display: block !important;
  border: none !important;
  background: transparent !important;
  margin-bottom: 8px;
}

.otp-card-list-table tbody > tr > td {
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
  border: none !important;
}

.otp-entity-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--otp-surface);
  border: 1px solid var(--otp-border);
  border-radius: var(--otp-radius);
  padding: 10px 12px;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.otp-entity-card md-checkbox {
  margin: 0;
  flex-shrink: 0;
  padding-top: 1px;
}

.otp-entity-card:hover {
  box-shadow: var(--otp-shadow-sm);
  border-color: #cbd5e1;
}

.otp-entity-card--not-planned {
  background: var(--otp-danger-light);
  border-color: #fecaca;
}

.otp-entity-card__index {
  font-size: 11px;
  font-weight: 600;
  color: var(--otp-text-subtle);
  min-width: 20px;
  padding-top: 2px;
}

.otp-entity-card__body {
  flex: 1;
  min-width: 0;
}

.otp-entity-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.otp-entity-card__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--otp-text);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.otp-entity-card__name:hover {
  color: var(--otp-accent);
}

.otp-entity-card__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.otp-entity-card__edit {
  color: var(--otp-text-subtle);
  font-size: 13px;
  padding: 2px 6px;
  border-radius: var(--otp-radius-sm);
  transition: color 0.15s, background 0.15s;
}

.otp-entity-card__edit:hover {
  color: var(--otp-accent);
  background: var(--otp-accent-light);
}

.otp-entity-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.otp-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--otp-bg);
  color: var(--otp-text-muted);
  border: 1px solid var(--otp-border);
}

.otp-badge--weight {
  background: var(--otp-accent-light);
  color: var(--otp-accent);
  border-color: #bfdbfe;
}

.otp-badge--qty {
  background: var(--otp-success-light);
  color: var(--otp-success);
  border-color: #a7f3d0;
}

.otp-badge--success {
  background: var(--otp-success-light);
  color: var(--otp-success);
  border-color: #a7f3d0;
}

.otp-badge--danger {
  background: var(--otp-danger-light);
  color: var(--otp-danger);
  border-color: #fecaca;
}

.otp-badge--warning {
  background: var(--otp-warning-light);
  color: var(--otp-warning);
  border-color: #fde68a;
}

.otp-badge--muted {
  background: var(--otp-bg);
  color: var(--otp-text-subtle);
  border-color: var(--otp-border);
}

.otp-badge--clickable {
  cursor: pointer;
  transition: opacity 0.15s;
}

.otp-badge--clickable:hover {
  opacity: 0.85;
}

.otp-list-panel__toolbar--filters {
  justify-content: flex-start;
}

.otp-list-panel__toolbar--filters .otp-search-input {
  flex: 1 1 180px;
  max-width: 260px;
}

.otp-data-card--muted {
  opacity: 0.88;
  border-color: #fde68a;
  background: #fffbeb;
}

.otp-entity-card__input {
  width: 72px;
  border: 1px solid var(--otp-border);
  border-radius: var(--otp-radius-sm);
  padding: 3px 6px;
  font-size: 12px;
  text-align: right;
}

.otp-entity-card__input:focus {
  outline: none;
  border-color: var(--otp-accent);
}

/* ng-table pagination in card list */
.otp-card-list-table + [ng-table-pagination],
.otp-card-list-table + .ng-table-pager,
.otp-card-list-scroll .ng-table-pager,
.otp-card-list-area [ng-table-pagination],
.otp-list-panel__body--paged > [ng-table-pagination] {
  margin-top: 0;
  padding-top: 8px;
  border-top: 1px solid var(--otp-border-light);
  flex-shrink: 0;
}

.otp-card-list-scroll .ng-table-pager .pagination,
.otp-card-list-area .ng-table-pager .pagination,
.otp-list-panel__body--paged .ng-table-pager .pagination {
  margin: 0;
  justify-content: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0;
  list-style: none;
}

.otp-card-list-scroll .ng-table-pager .pagination > li > a,
.otp-card-list-scroll .ng-table-pager .page-link,
.otp-card-list-area .ng-table-pager .page-link,
.otp-list-panel__body--paged .ng-table-pager .page-link {
  border-radius: var(--otp-radius-sm);
  font-size: 12px;
  color: var(--otp-text-muted);
  border: 1px solid var(--otp-border);
  padding: 6px 10px;
  text-decoration: none;
}

.otp-card-list-scroll .ng-table-pager .pagination > .active > a,
.otp-card-list-area .ng-table-pager .page-item.active .page-link,
.otp-list-panel__body--paged .ng-table-pager .page-item.active .page-link {
  background: var(--otp-primary);
  border-color: var(--otp-primary);
  color: #fff;
}

/* ==========================================================================
   Action bar
   ========================================================================== */

.otp-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0 4px;
}

.otp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--otp-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  text-decoration: none !important;
}

.otp-btn--primary {
  background: var(--otp-primary);
  color: #fff !important;
  border-color: var(--otp-primary);
  box-shadow: 0 1px 2px rgba(234, 88, 12, 0.25);
}

.otp-btn--primary:hover:not([disabled]) {
  background: var(--otp-primary-hover);
  border-color: var(--otp-primary-hover);
}

.otp-btn--primary[disabled],
.otp-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.otp-btn--secondary {
  background: var(--otp-surface);
  color: var(--otp-text) !important;
  border-color: var(--otp-border);
}

.otp-btn--secondary:hover {
  background: var(--otp-bg);
  border-color: #cbd5e1;
}

.otp-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Gantt / Timeline modernized
   ========================================================================== */

.otp-gantt-panel {
  --otp-gantt-row-height: 48px;
  background: var(--otp-surface);
  border: 1px solid var(--otp-border);
  border-radius: var(--otp-radius-lg);
  box-shadow: var(--otp-shadow);
  padding: 12px;
  margin-top: 8px;
  overflow: hidden;
}

.otp-gantt-panel .gantt {
  border-radius: var(--otp-radius);
  overflow: hidden;
  border: 1px solid var(--otp-border-light);
}

.otp-gantt-panel .gantt-header-row {
  background: var(--otp-bg) !important;
  border-bottom: 1px solid var(--otp-border) !important;
}

.otp-gantt-panel .gantt-header-row .gantt-column-header {
  font-family: var(--otp-font);
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--otp-text-muted) !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 8px !important;
  line-height: 1.2;
  box-sizing: border-box;
}

/* Keep table + timeline row heights in sync (table uses .gantt-row-label, chart uses .gantt-row) */
.otp-gantt-panel .gantt-row.gantt-row-height,
.otp-gantt-panel .gantt-row-label.gantt-row-height,
.otp-gantt-panel .gantt-table-content .gantt-row-label,
.otp-gantt-panel .gantt-tree-body .gantt-row-label.gantt-row-height {
  height: var(--otp-gantt-row-height) !important;
  min-height: var(--otp-gantt-row-height) !important;
  max-height: var(--otp-gantt-row-height) !important;
  box-sizing: border-box;
}

.otp-gantt-panel .gantt-row {
  border-bottom: 1px solid var(--otp-border-light) !important;
  transition: background 0.12s;
}

.otp-gantt-panel .gantt-row:nth-child(even) {
  background: #fafbfc;
}

.otp-gantt-panel .gantt-row:hover {
  background: var(--otp-accent-light) !important;
}

.otp-gantt-panel .gantt-row-label {
  font-family: var(--otp-font);
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--otp-text) !important;
  padding: 0 10px !important;
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.otp-gantt-panel .gantt-table-row .gantt-label-text {
  padding-top: 0 !important;
  line-height: 1.2;
}

.otp-gantt-panel .gantt-column-name {
  font-weight: 600 !important;
}

.otp-gantt-panel .gantt-task {
  border-radius: 6px !important;
  opacity: 0.92;
  transition: opacity 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}

.otp-gantt-panel .gantt-task:hover {
  opacity: 1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
  z-index: 10;
}

.otp-gantt-panel .gantt-task-content {
  font-family: var(--otp-font);
  font-size: 11px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  padding: 2px 6px !important;
}

.otp-gantt-panel .gantt-table-column {
  border-right: 1px solid var(--otp-border-light) !important;
}

.otp-gantt-panel .gantt-column-distance,
.otp-gantt-panel .gantt-column-duration,
.otp-gantt-panel .gantt-column-weight,
.otp-gantt-panel .gantt-column-quantity {
  font-size: 12px !important;
  color: var(--otp-text-muted) !important;
}

.otp-gantt-panel .gantt-side {
  background: var(--otp-surface) !important;
}

.otp-gantt-panel .gantt-scrollable {
  min-height: 220px;
}

.otp-gantt-panel .fa-eye,
.otp-gantt-panel .fa-eye-slash {
  color: var(--otp-accent);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--otp-radius-sm);
  transition: background 0.15s;
}

.otp-gantt-panel .fa-eye:hover,
.otp-gantt-panel .fa-eye-slash:hover {
  background: var(--otp-accent-light);
}

/* Map markers — jovendo-style dots */
.leaflet-marker-icon.otp-marker-wrap,
.otp-marker-wrap {
  background: transparent !important;
  border: none !important;
}

.otp-marker-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  display: block;
}

.otp-marker-dot--label {
  width: 16px;
  height: 16px;
  line-height: 12px;
  text-align: center;
  font-family: var(--otp-font);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
}

.otp-planning-detail .otp-card-list-table {
  width: 100% !important;
  max-width: 100%;
}

.otp-planning-detail .otp-card-list-table tbody {
  display: block;
  width: 100%;
}

.otp-planning-detail .otp-card-list-table tbody > tr {
  display: block !important;
  width: 100%;
  box-sizing: border-box;
}

.otp-planning-detail .otp-card-list-table tbody > tr > td {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.otp-planning-detail .otp-entity-card {
  width: 100%;
  box-sizing: border-box;
}

.otp-planning-detail .otp-card-list-area {
  width: 100%;
  box-sizing: border-box;
}

.otp-planning-detail .order,
.otp-planning-detail .driver {
  background: transparent !important;
  border: none !important;
}

.otp-entity-card__meta .otp-badge--tw {
  background: var(--otp-accent-light);
  color: var(--otp-accent);
  border-color: #bfdbfe;
  font-size: 11px;
}

/* Legacy overrides scoped to planning detail */
.otp-planning-detail .editable,
.otp-planning-detail .editable-click,
.otp-planning-detail a.editable-click {
  text-decoration: none;
  color: var(--otp-text);
  border-bottom: dashed 1px var(--otp-text-muted);
}

.otp-planning-detail .dropdown-menu {
  z-index: 9999;
  min-width: 200px;
  max-height: 240px;
  overflow-y: auto;
  border-radius: var(--otp-radius);
  box-shadow: var(--otp-shadow-md);
  border: 1px solid var(--otp-border);
}

/* ==========================================================================
   List pages (Plannings, Customers, Drivers)
   ========================================================================== */

.otp-page {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 16px 24px;
  min-height: calc(100vh - 65px);
  background: var(--otp-bg);
  font-family: var(--otp-font);
  animation: otp-fade-in 0.25s ease-out;
}

@keyframes otp-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.otp-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.otp-page-header__title {
  font-family: var(--otp-font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--otp-text);
  margin: 0 0 4px;
}

.otp-page-header__subtitle {
  font-size: 13px;
  color: var(--otp-text-muted);
  margin: 0;
}

.otp-page-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Executive dashboard strip */
.otp-dashboard {
  background: var(--otp-surface);
  border: 1px solid var(--otp-border);
  border-radius: var(--otp-radius-lg);
  box-shadow: var(--otp-shadow);
  padding: 16px;
  margin-bottom: 16px;
}

.otp-dashboard__title {
  font-family: var(--otp-font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--otp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px;
}

.otp-dashboard__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

/* List panel */
.otp-list-panel {
  background: var(--otp-surface);
  border: 1px solid var(--otp-border);
  border-radius: var(--otp-radius-lg);
  box-shadow: var(--otp-shadow);
  overflow: hidden;
  width: 100%;
}

.otp-list-panel__toolbar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--otp-border-light);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.otp-list-panel__body {
  padding: 12px 16px 16px;
}

.otp-list-panel__body--paged {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 320px);
  min-height: 200px;
  overflow: hidden;
  width: 100%;
}

.otp-list-panel__body--paged > table.otp-card-list-table {
  flex: 1 1 auto;
  min-height: 0;
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
}

.otp-list-panel__body--paged > [ng-table-pagination] {
  flex: 0 0 auto;
  padding-top: 12px;
  background: var(--otp-surface);
}

.otp-list-panel__scroll {
  max-height: calc(100vh - 320px);
  overflow-y: auto;
}

.otp-list-panel__scroll::-webkit-scrollbar {
  width: 6px;
}

.otp-list-panel__scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

/* Data cards (list items) */
.otp-data-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--otp-surface);
  border: 1px solid var(--otp-border);
  border-radius: var(--otp-radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.12s;
  cursor: default;
}

.otp-data-card:hover {
  box-shadow: var(--otp-shadow);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.otp-data-card--clickable {
  cursor: pointer;
}

.otp-data-card__index {
  font-size: 12px;
  font-weight: 600;
  color: var(--otp-text-subtle);
  min-width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.otp-data-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--otp-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: var(--otp-accent-light);
  color: var(--otp-accent);
}

.otp-data-card__icon--orange { background: var(--otp-primary-light); color: var(--otp-primary); }
.otp-data-card__icon--green { background: var(--otp-success-light); color: var(--otp-success); }
.otp-data-card__icon--blue { background: var(--otp-accent-light); color: var(--otp-accent); }

.otp-data-card__body {
  flex: 1;
  min-width: 0;
}

.otp-data-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--otp-text);
  margin: 0 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.otp-data-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.otp-data-card__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
  margin-left: auto;
}

@media (min-width: 768px) {
  .otp-data-card__actions {
    flex-direction: row;
    align-items: center;
  }
}

.otp-btn--xs {
  padding: 5px 10px;
  font-size: 12px;
}

.otp-btn--danger {
  background: var(--otp-danger-light);
  color: var(--otp-danger) !important;
  border-color: #fecaca;
}

.otp-btn--danger:hover {
  background: #fee2e2;
}

.otp-btn--info {
  background: var(--otp-accent-light);
  color: var(--otp-accent) !important;
  border-color: #bfdbfe;
}

.otp-btn--info:hover {
  background: #dbeafe;
}

.otp-btn--success {
  background: var(--otp-success-light);
  color: var(--otp-success) !important;
  border-color: #a7f3d0;
}

.otp-btn--success:hover {
  background: #d1fae5;
}

/* ng-table card mode for list pages */
.otp-page .otp-card-list-table {
  width: 100% !important;
  max-width: 100%;
}

.otp-page .otp-card-list-table tbody {
  display: block;
  width: 100%;
}

.otp-page .otp-card-list-table tbody > tr.otp-ng-table-header {
  display: none !important;
}

.otp-page .otp-card-list-table tbody > tr {
  display: block !important;
  width: 100%;
  border: none !important;
  background: transparent !important;
  margin-bottom: 0;
  box-sizing: border-box;
}

.otp-page .otp-card-list-table tbody > tr > td {
  display: block !important;
  width: 100% !important;
  max-width: 100%;
  padding: 0 !important;
  border: none !important;
  box-sizing: border-box;
}

.otp-page [ng-table-pagination] {
  display: block;
}

.otp-page .ng-table-pager {
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--otp-border-light);
}

.otp-page .ng-table-pager .pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.otp-page .ng-table-pager .pagination > .active > a,
.otp-page .ng-table-pager .page-item.active .page-link {
  background: var(--otp-primary);
  border-color: var(--otp-primary);
  color: #fff;
}

.otp-page .ng-table-pager .page-link {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: var(--otp-radius-sm);
  border: 1px solid var(--otp-border);
  color: var(--otp-text-muted);
}

/* ==========================================================================
   Modern modals
   ========================================================================== */

/* Modern modals (global) */
.modal .modal-content {
  border: none;
  border-radius: var(--otp-radius-lg);
  box-shadow: var(--otp-shadow-md);
  overflow: hidden;
  animation: otp-modal-in 0.2s ease-out;
}

@keyframes otp-modal-in {
  from { opacity: 0; transform: scale(0.97) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal .modal-header {
  background: var(--otp-bg);
  border-bottom: 1px solid var(--otp-border);
  padding: 16px 20px;
}

.modal .modal-title {
  font-family: var(--otp-font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--otp-text);
}

.modal .modal-body {
  padding: 20px;
  font-family: var(--otp-font);
}

.modal .modal-footer {
  background: var(--otp-bg);
  border-top: 1px solid var(--otp-border);
  padding: 12px 20px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.modal .form-control {
  border-radius: var(--otp-radius-sm);
  border-color: var(--otp-border);
  font-family: var(--otp-font);
  font-size: 13px;
}

.modal .form-control:focus {
  border-color: var(--otp-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.modal .control-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--otp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.modal .modal-header .close {
  opacity: 0.5;
  font-size: 24px;
}

.modal .modal-header .close:hover {
  opacity: 1;
}

/* Explicit table pagination (uib-pagination) */
.otp-table-pager {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
  border-top: 1px solid var(--otp-border-light);
  background: var(--otp-surface);
}

.otp-table-pager .pagination {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.otp-table-pager .pagination > li > a,
.otp-table-pager .pagination > li > span {
  border-radius: var(--otp-radius-sm);
  font-size: 12px;
  color: var(--otp-text-muted);
  border-color: var(--otp-border);
  padding: 6px 10px;
}

.otp-table-pager .pagination > .active > a,
.otp-table-pager .pagination > .active > span {
  background: var(--otp-primary);
  border-color: var(--otp-primary);
  color: #fff;
}

.otp-map-panel {
  border-radius: var(--otp-radius-lg);
  overflow: hidden;
}

.otp-map-panel .leaflet-container {
  font-family: var(--otp-font);
  border-radius: var(--otp-radius-lg);
}

/* Leaflet map popup */
.otp-map-popup-wrap .leaflet-popup-content-wrapper {
  border-radius: var(--otp-radius);
  box-shadow: var(--otp-shadow-md);
  padding: 0;
  overflow: hidden;
}

.otp-map-popup-wrap .leaflet-popup-content {
  margin: 0;
  min-width: 220px;
  line-height: 1.4;
}

.otp-map-popup-wrap .leaflet-popup-tip {
  box-shadow: var(--otp-shadow-sm);
}

.otp-map-popup__title {
  font-family: var(--otp-font-display);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 14px 8px;
  color: var(--otp-text);
  border-bottom: 1px solid var(--otp-border-light);
}

.otp-map-popup__address {
  font-size: 12px;
  color: var(--otp-text-muted);
  padding: 0 14px 8px;
  margin: 0;
}

.otp-map-popup__address i {
  margin-right: 4px;
}

.otp-map-popup__details {
  padding: 8px 14px 12px;
}

.otp-map-popup__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--otp-text);
  padding: 3px 0;
}

.otp-map-popup__row i {
  width: 14px;
  text-align: center;
  color: var(--otp-text-muted);
  flex-shrink: 0;
}

.otp-entity-card__meta .otp-entity-card__input {
  flex-shrink: 0;
}

/* Brand logo (navbar + auth screens) */
#header .otp-header-brand {
  flex: 0 0 auto;
  max-width: min(240px, 34vw);
  height: 100%;
  overflow: hidden;
}

#header .logo {
  width: auto;
  max-width: 100%;
  line-height: 0;
}

#header .logo img.otp-brand-logo,
img.otp-brand-logo {
  display: block;
  height: 42px;
  width: auto;
  max-width: min(280px, 55vw);
  max-height: 42px;
  object-fit: contain;
  object-position: left center;
}

.otp-brand-logo--auth {
  display: block;
  width: min(320px, 88vw);
  height: auto;
  max-height: 72px;
  object-fit: contain;
  margin: 0 auto;
}

/* ==========================================================================
   Header / Navbar — align typography with app (Inter, not Nunito)
   ========================================================================== */

#header.header.fixed-top {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--otp-header-height);
  padding: 0 20px;
  z-index: 1040;
  font-family: var(--otp-font);
  background: var(--otp-surface);
  box-shadow: var(--otp-shadow-sm);
  border-bottom: 1px solid var(--otp-border-light);
  overflow: visible;
}

#header .otp-header-nav,
#header .otp-header-nav__list,
#header .nav-item.dropdown {
  overflow: visible;
}

#header .nav-item.dropdown {
  position: relative;
}

#header .header-nav .dropdown-menu {
  z-index: 1055;
  margin-top: 8px;
  min-width: 180px;
  background: var(--otp-surface);
  border: 1px solid var(--otp-border);
  border-radius: var(--otp-radius);
  box-shadow: var(--otp-shadow-md);
  padding: 6px 0;
}

#header .header-nav .dropdown-menu.show {
  display: block;
}

#header .header-nav .dropdown-menu .dropdown-item {
  font-family: var(--otp-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--otp-text);
  padding: 8px 14px;
}

#header .header-nav .dropdown-menu .dropdown-item:hover {
  background: var(--otp-bg);
  color: var(--otp-text);
}

#header .otp-header-nav {
  display: flex;
  align-items: center;
  height: 100%;
  margin-left: 8px;
}

#header .otp-header-nav > ul,
#header .otp-header-nav__list {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  height: 100%;
}

#header .otp-header-nav__list--right {
  gap: 10px;
}

#header .otp-header-nav .nav-item {
  display: flex;
  align-items: center;
  height: 100%;
}

#header .otp-nav-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  font-family: var(--otp-font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: var(--otp-text-muted);
  text-decoration: none !important;
  border-radius: var(--otp-radius-sm);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

#header .otp-nav-link:hover {
  color: var(--otp-text);
  background: var(--otp-bg);
}

#header .nav-item.active .otp-nav-link {
  color: var(--otp-primary);
  background: var(--otp-primary-light);
  font-weight: 600;
}

#header .otp-header-nav--right {
  margin-left: auto;
  padding-right: 4px;
}

#header .otp-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 8px;
  font-size: 18px;
  color: var(--otp-text-muted);
  border-radius: var(--otp-radius-sm);
  text-decoration: none !important;
  transition: color 0.15s, background 0.15s;
}

#header .otp-nav-icon:hover {
  color: var(--otp-text);
  background: var(--otp-bg);
}

#header .otp-nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  font-family: var(--otp-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--otp-text);
  text-decoration: none !important;
  border-radius: var(--otp-radius-sm);
  border: 1px solid var(--otp-border);
  background: var(--otp-surface);
  transition: border-color 0.15s, background 0.15s;
}

#header .otp-nav-user:hover {
  border-color: #cbd5e1;
  background: var(--otp-bg);
}

#header .otp-nav-user i {
  font-size: 18px;
  color: var(--otp-text-muted);
}

#header .otp-nav-user__name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#header .header-nav .profile.dropdown-menu {
  font-family: var(--otp-font);
  font-size: 14px;
  border: 1px solid var(--otp-border);
  border-radius: var(--otp-radius);
  box-shadow: var(--otp-shadow-md);
}

#header .header-nav .profile .dropdown-item {
  font-size: 14px;
  font-weight: 500;
  color: var(--otp-text);
}

#header .header-nav .profile .dropdown-item i {
  color: var(--otp-text-muted);
  width: 18px;
}

@media (max-width: 991px) {
  #header .otp-header-nav:not(.otp-header-nav--right) {
    display: none;
  }

  #header .otp-nav-user__name {
    display: none;
  }
}

/* ==========================================================================
   Account pages (settings, password)
   ========================================================================== */

.otp-account-page {
  font-family: var(--otp-font);
}

.otp-form-panel {
  background: var(--otp-surface);
  border: 1px solid var(--otp-border);
  border-radius: var(--otp-radius-lg);
  box-shadow: var(--otp-shadow);
  padding: 24px;
  max-width: 920px;
}

.otp-form-panel--narrow {
  max-width: 520px;
}

.otp-form-panel .alert {
  border-radius: var(--otp-radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
}

.otp-form-grid {
  display: grid;
  gap: 16px 20px;
  margin-bottom: 20px;
}

.otp-form-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.otp-form-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 768px) {
  .otp-form-grid--2,
  .otp-form-grid--3 {
    grid-template-columns: 1fr;
  }
}

.otp-form-panel .form-group {
  margin-bottom: 0;
}

.otp-form-panel label.control-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--otp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.otp-form-panel .form-control {
  height: 40px;
  padding: 8px 12px;
  font-family: var(--otp-font);
  font-size: 14px;
  color: var(--otp-text);
  background: var(--otp-surface);
  border: 1px solid var(--otp-border);
  border-radius: var(--otp-radius-sm);
  box-shadow: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.otp-form-panel .form-control:focus {
  border-color: var(--otp-primary);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
  outline: none;
}

.otp-form-panel select.form-control {
  appearance: auto;
}

.otp-form-panel .help-block {
  font-size: 12px;
  color: var(--otp-danger);
  margin: 4px 0 0;
}

.otp-form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--otp-border-light);
  margin-top: 4px;
}

.otp-planning-mode {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--otp-border);
  border-radius: var(--otp-radius);
  background: var(--otp-bg);
}

.otp-planning-mode__title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--otp-text);
}

.otp-planning-mode__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.otp-planning-mode__option {
  margin: 0;
}

.otp-planning-mode__hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--otp-text-muted);
}

.otp-daily-orders-hint {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: var(--otp-radius-sm);
  background: var(--otp-primary-light);
  color: var(--otp-primary);
  font-size: 13px;
}

.otp-import-columns {
  margin-top: 16px;
}

.otp-import-columns__title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}

.otp-import-columns__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.otp-import-columns__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin: 0;
}

.otp-import-columns__item--disabled {
  opacity: 0.7;
}

/* ==========================================================================
   Auth pages (login, reset)
   ========================================================================== */

.otp-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  width: 100%;
  background: var(--otp-bg);
}

.otp-auth__aside {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: linear-gradient(145deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
  overflow: hidden;
}

.otp-auth__aside::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(249, 115, 22, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.12) 0%, transparent 50%);
  pointer-events: none;
}

.otp-auth__aside-inner {
  position: relative;
  max-width: 420px;
  color: #fff;
}

.otp-auth__aside-logo {
  width: min(260px, 85%);
  height: auto;
  max-height: 56px;
  margin-bottom: 32px;
  object-fit: contain;
}

.otp-auth__aside-title {
  font-family: var(--otp-font-display);
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.otp-auth__aside-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.65;
  margin: 0 0 28px;
}

.otp-auth__aside-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.otp-auth__aside-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
}

.otp-auth__aside-list li i {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.2);
  color: #F97316;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
}

.otp-auth__main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.otp-auth__card {
  width: 100%;
  max-width: 420px;
  background: var(--otp-surface);
  border: 1px solid var(--otp-border);
  border-radius: var(--otp-radius-lg);
  box-shadow: var(--otp-shadow-md);
  padding: 36px 32px 32px;
}

.otp-auth__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--otp-text-muted);
  margin-bottom: 24px;
  transition: color 0.15s ease;
}

.otp-auth__back:hover {
  color: var(--otp-primary);
  text-decoration: none;
}

.otp-auth__header {
  text-align: center;
  margin-bottom: 28px;
}

.otp-auth__logo {
  height: 44px;
  width: auto;
  max-width: min(260px, 90%);
  margin: 0 auto 20px;
  object-fit: contain;
}

.otp-auth__title {
  font-family: var(--otp-font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--otp-text);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.otp-auth__subtitle {
  font-size: 0.9375rem;
  color: var(--otp-text-muted);
  margin: 0;
}

.otp-auth__alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--otp-radius);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.otp-auth__alert--error {
  background: var(--otp-danger-light);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: var(--otp-danger);
}

.otp-auth__alert i {
  flex-shrink: 0;
  margin-top: 2px;
}

.otp-auth__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.otp-auth__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.otp-auth__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--otp-text);
  margin: 0;
}

.otp-auth__input-wrap {
  position: relative;
}

.otp-auth__input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--otp-text-subtle);
  font-size: 0.875rem;
  pointer-events: none;
}

.otp-auth__input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  font-family: var(--otp-font);
  font-size: 0.9375rem;
  color: var(--otp-text);
  background: var(--otp-bg);
  border: 1px solid var(--otp-border);
  border-radius: var(--otp-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}

.otp-auth__input::placeholder {
  color: var(--otp-text-subtle);
}

.otp-auth__input:hover {
  border-color: #CBD5E1;
}

.otp-auth__input:focus {
  outline: none;
  border-color: var(--otp-primary);
  background: var(--otp-surface);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.otp-auth__submit {
  width: 100%;
  margin-top: 4px;
  padding: 13px 20px;
  font-family: var(--otp-font);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #F97316;
  border: none;
  border-radius: var(--otp-radius);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.35);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.otp-auth__submit:hover {
  background: #EA580C;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4);
  transform: translateY(-1px);
}

.otp-auth__submit:active {
  transform: translateY(0);
}

.otp-auth__demo {
  width: 100%;
  margin-top: 12px;
  padding: 13px 20px;
  font-family: var(--otp-font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--otp-primary);
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--otp-radius);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.otp-auth__demo:hover:not(:disabled) {
  background: #DBEAFE;
  border-color: #93C5FD;
  transform: translateY(-1px);
}

.otp-auth__demo:disabled {
  opacity: 0.7;
  cursor: wait;
}

.otp-auth__demo-note {
  margin: 16px 0 0;
  font-size: 0.8125rem;
  color: var(--otp-text-muted);
  text-align: center;
  line-height: 1.5;
}

.otp-auth__footer {
  text-align: center;
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--otp-border-light);
}

.otp-auth__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--otp-text-muted);
  transition: color 0.15s ease;
}

.otp-auth__link:hover {
  color: var(--otp-primary);
  text-decoration: none;
}

@media (min-width: 901px) {
  .otp-auth__header .otp-auth__logo {
    display: none;
  }
}

@media (max-width: 900px) {
  .otp-auth {
    grid-template-columns: 1fr;
  }

  .otp-auth__aside {
    display: none;
  }

  .otp-auth__main {
    min-height: 100vh;
    padding: 24px 16px;
  }

  .otp-auth__card {
    padding: 28px 24px 24px;
    box-shadow: var(--otp-shadow);
  }
}
