/* Dashboard CSS - Chota-native styling */

:root {
  /* Override Chota's default colors */
  --color-primary: #CB2622;
  --color-primary-dark: #a81f1c;
  --color-dark: #212529;
  --color-light: #f8f9fa;
  --color-grey: #6c757d;
  --color-border: rgba(0, 0, 0, 0.1);

  /* App-specific layout */
  --sidebar-width: 280px;
  --navbar-height: 48px;

  /* Override Chota's grid/sizing to work with 16px base font */
  --grid-gutter: 20px;
  --grid-maxWidth: 1920px;
  --font-size: 1rem;
}

html {
  font-size: 16px; /* Override chota's 62.5% to restore normal sizing */
}

/* Chota button sizing fix for 16px base */
.button, [type=button], [type=reset], [type=submit], button {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 1.1rem;
  font-weight: 500;
  width: auto;
}

/* Button spacing - ensure buttons have margin when adjacent */
.button + .button,
button + button,
button + .button,
.button + button,
a.button + a.button,
a.button + button,
button + a.button {
  margin-left: 0.5rem;
}

/* Base */
body {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

/* Environment Banner */
#env-banner {
  text-align: center;
  color: white;
  text-transform: uppercase;
  z-index: 10000;
  position: relative;
  padding: 2px 0;
}

.env-production {
  background-color: red;
}

.env-staging {
  background-color: green;
}

/* Loader */
#loader {
  position: fixed;
  width: 100%;
  height: 100vh;
  background: #21242d url("/static/img/loading.gif") no-repeat center;
  z-index: 999;
  opacity: 0.7;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  background-color: var(--color-dark);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.navbar-brand {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
  background-color: rgba(0, 0, 0, 0.25);
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: var(--sidebar-width);
}

.navbar-brand:hover {
  color: #fff;
}

/* Navbar Dropdown */
.navbar .dropdown {
  position: relative;
}

.navbar .dropdown-toggle {
  background-color: var(--color-grey);
  border: none;
  color: #fff;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  margin-right: 1rem;
}

.navbar .dropdown-toggle::after {
  content: '';
  display: inline-block;
  margin-left: 0.5rem;
  vertical-align: middle;
  border-top: 0.3em solid;
  border-right: 0.3em solid transparent;
  border-bottom: 0;
  border-left: 0.3em solid transparent;
}

.navbar .dropdown-toggle:hover {
  background-color: #5a6268;
}

.navbar .dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  min-width: 160px;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  z-index: 1000;
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
}

.navbar .dropdown-menu.show {
  display: block;
}

.navbar .dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-dark);
  text-decoration: none;
}

.navbar .dropdown-item:hover {
  background-color: var(--color-light);
}

/* General Dropdown (outside navbar) */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown .dropdown-toggle {
  cursor: pointer;
}

.dropdown .dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  min-width: 160px;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  z-index: 1000;
  list-style: none;
  padding: 0.5rem 0;
  margin: 0.25rem 0 0;
}

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

.dropdown .dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-dark);
  text-decoration: none;
}

.dropdown .dropdown-item:hover {
  background-color: var(--color-light);
}

/* Mobile Toggle Button */
.navbar-toggler {
  display: none;
  position: absolute;
  top: 0.25rem;
  right: 1rem;
  padding: 0.25rem 0.75rem;
  font-size: 1.25rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.55);
}

.navbar-toggler:hover {
  color: rgba(255, 255, 255, 0.75);
}

.navbar-toggler-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  width: var(--sidebar-width);
  padding: var(--navbar-height) 0 0;
  box-shadow: inset -1px 0 0 var(--color-border);
  background-color: var(--color-light);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-sticky {
  position: relative;
  top: 0;
  height: calc(100vh - var(--navbar-height));
  padding: 0.5rem 1rem;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Sidebar Navigation - Override chota's horizontal .nav */
.sidebar .nav {
  display: block;
  min-height: auto;
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar .nav .nav-item {
  display: block;
  margin-bottom: 0.25rem;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  color: var(--color-dark);
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.15s ease-in-out;
}

.sidebar .nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.sidebar .nav-link.active {
  background-color: var(--color-primary);
  color: #fff;
}

.sidebar .nav-link i {
  margin-right: 0.5rem;
  font-size: 1rem;
}

/* Collapsible Sections */
.collapse-content {
  display: none;
  padding-left: 1rem;
}

.collapse-content.show {
  display: block;
}

.sidebar .nav-link[data-collapse-toggle]::after {
  content: '';
  display: inline-block;
  margin-left: auto;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform 0.2s;
}

.sidebar .nav-link[data-collapse-toggle][aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* Main Content Area */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 1rem 1.5rem;
  min-height: calc(100vh - var(--navbar-height));
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100vw - var(--sidebar-width));
  min-width: 0;
}

.main-content.full-width {
  margin-left: 0;
  width: 100%;
  max-width: 100vw;
  min-width: 0;
}

/* Container */
.container-fluid {
  width: 100%;
  padding-left: 15px;
  padding-right: 15px;
}

.container-fluid > .row {
  margin-left: 0;
  margin-right: 0;
}

/* Force Chota grid rows to fill full width */
.main-content .row {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* Fix Chota columns to use full available space */
.main-content [class*="col-"] {
  margin-left: 0;
  margin-right: 0;
  padding-left: calc(var(--grid-gutter) / 2);
  padding-right: calc(var(--grid-gutter) / 2);
}

/* Ensure cards fill their columns */
.main-content .card {
  width: 100%;
}

/* Tables should fill width */
.main-content .table {
  width: 100%;
}

.form-narrow {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Calendar and Agenda components - ensure full width */
#calendar,
#agenda {
  width: 100% !important;
  min-width: 100%;
}

#calendar .tui-full-calendar-layout,
#agenda .tui-full-calendar-layout {
  width: 100% !important;
}

/* Dashboard filter forms - inline display for right-aligned filters */
.dashboard-filter-form {
  display: inline-block;
  vertical-align: middle;
}

.dashboard-filter-form .form-control,
.dashboard-filter-form .form-select {
  display: inline-block;
  width: auto;
}

.dashboard-filter-form .dashboard-date-input {
  width: 11rem;
}

/* Forms - Extend Chota's form styling */
.form-label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-dark);
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 4px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input.form-control.form-control {
  padding: 0.375rem 0.75rem;
  border: 1px solid #ced4da;
}

.form-control:focus {
  border-color: var(--color-primary);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(203, 38, 34, 0.25);
}

.form-select {
  display: block;
  width: 100%;
  padding: 0.375rem 2.25rem 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-dark);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  background-origin: padding-box;
  border: 1px solid #ced4da;
  border-radius: 4px;
  appearance: none;
}

.form-select:focus {
  border-color: var(--color-primary);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(203, 38, 34, 0.25);
}

/* Checkboxes and Radio */
.form-check {
  display: flex;
  align-items: center;
  padding-left: 0;
  margin-bottom: 0.5rem;
}

.form-check-input {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  cursor: pointer;
}

.form-check-label {
  cursor: pointer;
}

/* Input Groups */
.input-group {
  display: flex;
  width: 100%;
}

.input-group .form-control {
  flex: 1;
  border-radius: 4px 0 0 4px;
}

.input-group .button {
  border-radius: 0 4px 4px 0;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  font-size: 1rem;
  color: #666;
  background-color: #e9ecef;
  border: 1px solid #ccc;
  border-right: 0;
  border-radius: 4px 0 0 4px;
}

.input-group-text + .form-control {
  border-radius: 0 4px 4px 0;
}

/* Chota button overrides for primary color */
.button.primary,
button.primary,
[type="submit"].primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.button.primary:hover,
button.primary:hover,
[type="submit"].primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

/* Button sizes - Chota doesn't have these */
.button.small {
  padding: 0.5rem 1rem;
  font-size: 1rem;
}

/* Button close */
.button-close {
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  padding: 0.25em;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border: 0;
  border-radius: 0.25rem;
  opacity: 0.5;
  cursor: pointer;
}

.button-close:hover {
  opacity: 0.75;
}

/* Hour Selection Buttons (Appointment) */
.btn-hour {
  background-color: var(--color-grey);
  border-color: var(--color-grey);
  color: #fff;
}

.btn-hour:hover {
  background-color: #5a6268;
}

.btn-hour.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Tables - Extend Chota's table styling */
.table {
  width: 100%;
  margin-bottom: 1rem;
  margin-top: 1rem;
  border-collapse: collapse;
  font-size: 1.1rem;
  clear: both;
}

/* Ensure spacing between buttons/elements and tables */
.button + .table,
button + .table,
a + .table,
.button + .table-responsive,
button + .table-responsive,
a + .table-responsive {
  margin-top: 1rem;
}

.table th,
.table td {
  padding: 0.875rem 1rem;
  vertical-align: top;
  border-top: 1px solid #dee2e6;
  font-size: 1.1rem;
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid #dee2e6;
  background-color: var(--color-light);
  font-size: 1.1rem;
  font-weight: 600;
}

.table small {
  font-size: 1rem;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.table-sm th,
.table-sm td {
  padding: 0.3rem;
}

.table-responsive {
  display: block;
  width: calc(100% + 3rem);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1rem;
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.table-responsive > .table {
  margin-bottom: 0;
}

.table-responsive > .table th,
.table-responsive > .table td {
  padding: 0.5rem 0.5rem;
  font-size: 0.95rem;
}

.table-responsive > .table thead th {
  font-size: 0.95rem;
}

/* Table row colors */
.table-secondary,
.table-secondary > th,
.table-secondary > td {
  background-color: #e9ecef;
}

.table-success,
.table-success > th,
.table-success > td {
  background-color: #d4edda;
}

.table-danger,
.table-danger > th,
.table-danger > td {
  background-color: #f8d7da;
}

.table-warning,
.table-warning > th,
.table-warning > td {
  background-color: #fff3cd;
}

.table-info,
.table-info > th,
.table-info > td {
  background-color: #d1ecf1;
}

.table-primary,
.table-primary > th,
.table-primary > td {
  background-color: #cce5ff;
}

/* Text colors */
.text-danger {
  color: #dc3545 !important;
}

.text-success {
  color: #28a745 !important;
}

.text-primary {
  color: var(--color-primary) !important;
}

.text-warning {
  color: #856404 !important;
}

.text-info {
  color: #17a2b8 !important;
}

/* Alerts */
.alert {
  position: relative;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 4px;
}

.alert-primary {
  color: #004085;
  background-color: #cce5ff;
  border-color: #b8daff;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 1050;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
  display: block;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: 1.75rem auto;
  max-width: 500px;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.3rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem;
  border-top: 1px solid #dee2e6;
  gap: 0.5rem;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25em 0.5em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
}

.badge-primary,
.bg-primary {
  background-color: var(--color-primary);
}

.badge-secondary,
.bg-secondary {
  background-color: var(--color-grey);
}

.badge-success,
.bg-success {
  background-color: #28a745;
}

.badge-danger,
.bg-danger {
  background-color: #dc3545;
}

.badge-warning,
.bg-warning {
  background-color: #ffc107;
  color: #212529;
}

/* Cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.25rem;
  margin-bottom: 1rem;
}

.card-header {
  padding: 0.75rem 1.25rem;
  background-color: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-body {
  flex: 1 1 auto;
  padding: 1.25rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.card-text {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0;
}

.card-footer {
  padding: 0.75rem 1.25rem;
  background-color: rgba(0, 0, 0, 0.03);
  border-top: 1px solid rgba(0, 0, 0, 0.125);
}

/* Pagination */
.pagination {
  display: flex;
  padding-left: 0;
  list-style: none;
  border-radius: 0.25rem;
}

.page-item {
  margin: 0 2px;
}

.page-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--color-primary);
  text-decoration: none;
  background-color: #fff;
  border: 1px solid #dee2e6;
}

.page-link:hover {
  background-color: #e9ecef;
}

.page-item.active .page-link {
  color: #fff;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.page-item.disabled .page-link {
  color: var(--color-grey);
  pointer-events: none;
  background-color: #fff;
}

/* List Groups (Autocomplete) */
.list-group {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  margin-bottom: 0;
  margin-top: 0;
  list-style: none;
  border-radius: 0 0 0.25rem 0.25rem;
  position: absolute;
  width: 100%;
  z-index: 1000;
  background: #fff;
  border: 1px solid #ced4da;
  border-top: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.list-group:empty {
  display: none;
}

.list-group-item {
  position: relative;
  display: block;
  padding: 0.75rem 1.25rem;
  background-color: #fff;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.075);
  cursor: pointer;
}

.list-group-item:first-child {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.list-group-item:last-child {
  border-bottom-right-radius: inherit;
  border-bottom-left-radius: inherit;
  border-bottom: none;
}

.list-group-item + .list-group-item {
  border-top-width: 0;
}

.list-group-item:hover,
.list-group-item.active {
  background-color: var(--color-light);
}

/* Wrapper for autocomplete inputs */
.form-control + .list-group {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
}

/* Progress */
.progress {
  display: flex;
  height: 1rem;
  overflow: hidden;
  font-size: 0.75rem;
  background-color: #e9ecef;
  border-radius: 0.25rem;
  margin-top: 1rem;
}

.progress-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  background-color: var(--color-primary);
  transition: width 0.6s ease;
}

/* Step Wizard Styles */
/* SmartWizard / Step Wizard Styles */
.step-wizard,
#smartwizard {
  margin-bottom: 1rem;
  width: 100%;
}

#smartwizard > .nav,
.step-wizard-nav {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  border-bottom: 2px solid #dee2e6;
}

#smartwizard > .nav .nav-item,
.step-wizard-nav .nav-item {
  flex: 1;
}

#smartwizard > .nav .nav-link,
.step-wizard-nav .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  color: var(--color-grey);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
}

#smartwizard > .nav .nav-link .num,
.step-wizard-nav .nav-link .num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: #dee2e6;
  color: var(--color-grey);
  font-weight: bold;
  margin-bottom: 0.5rem;
}

#smartwizard > .nav .nav-link.active,
.step-wizard-nav .nav-link.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

#smartwizard > .nav .nav-link.active .num,
.step-wizard-nav .nav-link.active .num {
  background-color: var(--color-primary);
  color: #fff;
}

#smartwizard > .nav .nav-link.done,
.step-wizard-nav .nav-link.done {
  color: #28a745;
}

#smartwizard > .nav .nav-link.done .num,
.step-wizard-nav .nav-link.done .num {
  background-color: #28a745;
  color: #fff;
}

#smartwizard .tab-content .tab-pane,
.step-wizard-content .tab-pane {
  display: none;
  padding: 1rem 0;
}

#smartwizard .tab-content .tab-pane.active,
.step-wizard-content .tab-pane.active {
  display: block;
}

.step-wizard-toolbar {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-top: 1px solid #dee2e6;
  margin-top: 1rem;
}

.step-wizard-toolbar-bottom {
  margin-top: 1rem;
}

#appointment-dates-wrapper .tui-datepicker,
#appointment-dates-wrapper .tui-datepicker-type-date,
#appointment-dates-wrapper .tui-calendar {
  width: 100%;
}

#appointment-dates-wrapper .tui-datepicker {
  position: relative;
}

/* Autocomplete Styles */
.autocomplete-wrapper {
  position: relative;
}

.autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #dee2e6;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.autocomplete-results:empty {
  display: none;
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
}

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

.autocomplete-item:hover,
.autocomplete-item.selected {
  background-color: var(--color-light);
}

.list-group-item.selected {
  background-color: var(--color-light);
}

/* List group autocomplete - left align */
.list-group {
  text-align: left;
}

.list-group-item {
  text-align: left;
}

/* ============================================
   UTILITY CLASSES - Chota doesn't have these
   ============================================ */

/* Display utilities */
.is-hidden {
  display: none !important;
}

.is-block {
  display: block !important;
}

.is-flex {
  display: flex !important;
}

.is-inline-block,
.d-inline-block {
  display: inline-block;
}

.d-inline {
  display: inline !important;
}

/* Width utilities */
.w-auto {
  width: auto !important;
}

/* Small form elements */
.form-select-sm {
  padding: 0.25rem 2.25rem 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* Text utilities */
.is-bold,
.fw-bold {
  font-weight: bold !important;
}

.text-center,
.text-align-center {
  text-align: center !important;
}

.text-left,
.text-start {
  text-align: left !important;
}

.text-end,
.text-right {
  text-align: right !important;
}

.text-muted,
.text-grey {
  color: var(--color-grey) !important;
}

/* Heading size utilities */
.h1, h1 { font-size: 2.5rem; }
.h2, h2 { font-size: 2rem; }
.h3, h3 { font-size: 1.75rem; }
.h4, h4 { font-size: 1.5rem; }
.h5, h5 { font-size: 1.35rem; font-weight: 600; }
.h6, h6 { font-size: 1.1rem; }

/* Font weight utilities */
.fw-normal { font-weight: 400 !important; }

/* Float utilities */
.float-end,
.pull-right {
  float: right !important;
}

.float-start,
.pull-left {
  float: left !important;
}

.clearfix::after {
  display: block;
  clear: both;
  content: "";
}

/* Margins - Chota doesn't have these */
.m-0 { margin: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.m-3 { margin: 1rem !important; }
.m-4 { margin: 1.5rem !important; }
.m-5 { margin: 3rem !important; }
.m-auto { margin: auto !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mb-auto { margin-bottom: auto !important; }

.ms-0 { margin-left: 0 !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.ms-auto { margin-left: auto !important; }

.me-0 { margin-right: 0 !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.me-auto { margin-right: auto !important; }

.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* Padding - Chota doesn't have these */
.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pt-4 { padding-top: 1.5rem !important; }
.pt-5 { padding-top: 3rem !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 1rem !important; }

.ps-0 { padding-left: 0 !important; }
.ps-3 { padding-left: 1rem !important; }

.pe-0 { padding-right: 0 !important; }
.pe-3 { padding-right: 1rem !important; }

.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }

/* Flex Utilities */
.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

/* Position */
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-sticky { position: sticky !important; }
.position-fixed { position: fixed !important; }

/* Width/Height */
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

/* Border */
.border { border: 1px solid #dee2e6 !important; }
.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid #dee2e6 !important; }
.border-bottom { border-bottom: 1px solid #dee2e6 !important; }
.rounded { border-radius: 0.25rem !important; }

/* Shadow */
.shadow { box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; }
.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; }

/* Images */
.img-thumbnail {
  padding: 0.25rem;
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  max-width: 100%;
  height: auto;
}

.img-fluid {
  max-width: 100%;
  height: auto;
}

/* Error Text */
.error {
  color: #dc3545;
  font-size: 0.875rem;
}

/* Link styles */
a {
  text-decoration: underline;
}

a:hover {
  text-decoration: underline;
}

a.button,
a.nav-link,
a.navbar-brand,
a.dropdown-item,
a.page-link {
  text-decoration: none;
}

.link-dark {
  color: var(--color-dark) !important;
}

.link-dark:hover {
  color: #000 !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Mobile: sidebar hidden, toggle visible */
@media (max-width: 599px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .navbar-toggler {
    display: block;
  }

  .navbar .dropdown {
    display: none;
  }

  .modal-dialog {
    max-width: 100%;
    margin: 0.5rem;
  }

  .modal-body {
    max-height: 60vh;
    overflow-y: auto;
  }

  /* Hide on mobile */
  .hide-mobile {
    display: none !important;
  }

  .step-wizard-nav .nav-link {
    padding: 0.5rem;
    font-size: 0.875rem;
  }

  .step-wizard-nav .nav-link .num {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
  }
}

/* Show only on mobile */
@media (min-width: 600px) {
  .show-mobile-only {
    display: none !important;
  }
}

/* Auth pages (login, register, etc.) */
body.text-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 0;
  background-color: #f5f5f5;
}

.form-signin {
  width: 100%;
  max-width: 330px;
  padding: 15px;
  margin: 0 auto;
}

.form-signin .form-control {
  margin-bottom: 0.5rem;
}

.form-signin img {
  max-width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Print styles */
@media print {
  .sidebar,
  .navbar,
  .button,
  .no-print {
    display: none !important;
  }

  .main-content {
    margin-left: 0;
    padding: 0;
  }
}
