/* static/css/style.css */

/* ===== VARIABLES ===== */
:root {
  --primary-color: #102A71;
  --navbar-color: #1a659e;
  --secondary-color: #F5C400;
  --accent-color: #8e3c36;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --gray-light: #e9ecef;
  --gray: #6c757d;
  --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-heading: 'Calibri', 'Georgia', 'Times New Roman', serif;
  --transition: all 0.3s ease;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --border-radius: 4px;
  /* Neutral Colors */
  --bg-color: #f8fafc;
  --panel-bg: #ffffff;
  --text-primary: #102A71;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --hover-bg: #f1f5f9;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  /* iOS Color Palette */
  --ios-primary: #007AFF;
  --ios-primary-dark: #0056CC;
  --ios-secondary: #5856D6;
  --ios-green: #34C759;
  --ios-red: #FF3B30;
  --ios-orange: #FF9500;
  --ios-yellow: #FFCC00;
  --ios-teal: #5AC8FA;
  --ios-purple: #AF52DE;
  --ios-pink: #FF2D55;
  
  /* Neutrals (iOS Gray Scale) */
  --ios-gray-1: #8E8E93;
  --ios-gray-2: #AEAEB2;
  --ios-gray-3: #C7C7CC;
  --ios-gray-4: #D1D1D6;
  --ios-gray-5: #E5E5EA;
  --ios-gray-6: #F2F2F7;
  
  /* Background Colors */
  --ios-bg-primary: #FFFFFF;
  --ios-bg-secondary: #F2F2F7;
  --ios-bg-tertiary: #FFFFFF;
  --ios-bg-grouped: #F2F2F7;
  --ios-bg-grouped-secondary: #FFFFFF;
  
  /* Text Colors */
  --ios-text-primary: #000000;
  --ios-text-secondary: #8E8E93;
  --ios-text-tertiary: #C7C7CC;
  --ios-text-quaternary: #D1D1D6;
  --ios-text-on-color: #FFFFFF;
  
  /* Border Colors */
  --ios-border-primary: #C7C7CC;
  --ios-border-secondary: #E5E5EA;
  --ios-border-tertiary: #F2F2F7;
  
  /* Elevation (Shadows) */
  --ios-shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.12);
  --ios-shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
  --ios-shadow-prominent: 0 8px 24px rgba(0, 0, 0, 0.18);
  --ios-shadow-inset: inset 0 1px 1px rgba(0, 0, 0, 0.1);
  
  /* Typography */
  --ios-font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  --ios-font-family-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  
  /* Spacing */
  --ios-spacing-xs: 4px;
  --ios-spacing-sm: 8px;
  --ios-spacing-md: 12px;
  --ios-spacing-lg: 16px;
  --ios-spacing-xl: 20px;
  --ios-spacing-2xl: 24px;
  --ios-spacing-3xl: 32px;
  --ios-spacing-4xl: 40px;
  
  /* Border Radius */
  --ios-radius-sm: 6px;
  --ios-radius-md: 10px;
  --ios-radius-lg: 14px;
  --ios-radius-xl: 20px;
  --ios-radius-full: 9999px;
  
  /* Transitions */
  --ios-transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --ios-transition-medium: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --ios-transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-index layers */
  --ios-z-dropdown: 1000;
  --ios-z-sticky: 1020;
  --ios-z-fixed: 1030;
  --ios-z-modal-backdrop: 1040;
  --ios-z-modal: 1050;
  --ios-z-popover: 1060;
  --ios-z-tooltip: 1070;
  --ios-modal-overlay: rgba(0, 0, 0, 0.5);
  --ios-modal-overlay-dark: rgba(0, 0, 0, 0.7);
  --ios-modal-backdrop-blur: 5px;
  --ios-modal-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  --ios-modal-shadow-hover: 0 25px 50px rgba(0, 0, 0, 0.2);
  
  /* Modal sizes */
  --ios-modal-sm: 400px;
  --ios-modal-md: 550px;
  --ios-modal-lg: 700px;
  --ios-modal-xl: 900px;
  --ios-modal-full: 95%;
  
  /* iOS Modal specific animations */
  --ios-modal-transition-enter: 0.4s cubic-bezier(0.2, 0.9, 0.4, 1);
  --ios-modal-transition-leave: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --navbar-height: 60px;
  --footer-height: 35px;
}

/* ===============================
   GLOBAL LAYOUT BASE
================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}


a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--success-color);
}

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

/* ==========================================================================
   Containers & Layout
   ========================================================================== */
.container {
  width: min(100%, 1600px);
  margin-inline: auto;
  padding-inline: clamp(0.75rem, 2vw, 1.5rem);
}

.container-fluid {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;

  height: calc(100dvh - var(--navbar-height));
  min-height: 0;

  overflow-x: hidden;
  overflow-y: auto;
}

/* ===============================
   TWO-PANEL LAYOUT
================================ */
.panel-layout {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
}

/* LEFT PANEL */
.panel-left {
  flex: 0 0 clamp(260px, 22vw, 420px);
  max-width: clamp(260px, 22vw, 420px);
  min-width: 240px;

  overflow-y: auto;
  border-right: 1px solid var(--gray-light);
  padding: clamp(0.5rem, 1vw, 1rem);

  background: #f9f9f9;
  transition: var(--transition);
}

/* RIGHT PANEL */
.panel-right {
  flex: 1 1 auto;
  min-width: 0;

  overflow-y: auto;
  padding: clamp(0.5rem, 1vw, 1rem);

  transition: var(--transition);
}

.panel-left h3, .panel-right h3 {
  border-bottom: 2px solid var(--gray-light);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Full responsive single-page container */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Navbar = fixed height */
.navbar {
  flex-shrink: 0;
}

/* Footer always at bottom */
footer {
  flex-shrink: 0;
}

/* ===============================
   PAGE CONTAINER (main content)
================================ */
.page-container {
  flex: 1 1 auto;
  min-height: calc(100dvh - var(--navbar-height));

  width: min(100%, 1400px);
  margin-inline: auto;

  padding-inline: clamp(0.75rem, 2vw, 2rem);
  padding-block: clamp(0.75rem, 2vh, 1.5rem);
  /* padding-top: calc(var(--navbar-height) + 0.2rem); */
  overflow-x: hidden;
}

.page-container.full-width {
  width: 100%;
  max-width: none;
  padding-inline: clamp(0.5rem, 1vw, 1rem);
}

.page-container.with-footer {
  min-height: calc(100dvh - var(--navbar-height) - var(--footer-height));
}

.container-fluid.with-footer {
  height: calc(100dvh - var(--navbar-height) - var(--footer-height));
}

/* Large screens */
@media (min-width: 1600px) {
  .page-container {
    width: min(100%, 1600px);
  }
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, .h1 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--ios-spacing-lg);
}

h2, .h2 {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: var(--ios-spacing-md);
}

h3, .h3 {
  font-size: 1.125rem;
  font-weight: 550;
  line-height: 1.4;
  margin-bottom: var(--ios-spacing-md);
}

h4, .h4 {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: var(--ios-spacing-sm);
}

h5, .h5 {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: var(--ios-spacing-sm);
}

h6, .h6 {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: var(--ios-spacing-sm);
}

p {
  margin-bottom: var(--ios-spacing-md);
  line-height: 1.47059;
}

.small-text {
  font-size: 0.8125rem;
  color: var(--ios-text-secondary);
}

.caption {
  font-size: 0.75rem;
  color: var(--ios-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lead {
  font-size: 1.25rem;
  font-weight: 300;
}

.toastify {
  /* position: fixed !important; */
  z-index: 2000 !important;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--ios-spacing-sm) var(--ios-spacing-md);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  border: none;
  border-radius: var(--ios-radius-md);
  transition: all var(--ios-transition-fast);
  user-select: none;
  gap: var(--ios-spacing-sm);
  min-height: 40px; /* iOS minimum touch target */
}


.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  opacity: 0.9;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background-color: var(--ios-primary);
  color: var(--ios-text-on-color);
}

.btn-primary:hover {
  background-color: var(--ios-primary-dark);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--ios-text-on-color);
}

.btn-secondary:hover {
  background-color: #4A49C4;
  box-shadow: 0 4px 12px rgba(88, 86, 214, 0.3);
}

.btn-success {
  background-color: var(--ios-green);
  color: var(--ios-text-on-color);
}

.btn-danger {
  background-color: var(--ios-red);
  color: var(--ios-text-on-color);
}

.btn-warning {
  background-color: var(--ios-orange);
  color: var(--ios-text-primary);
}

.btn-outline {
  background-color: transparent;
  color: var(--ios-primary);
  border: 1px solid var(--ios-border-primary);
}

.btn-outline:hover {
  background-color: var(--ios-gray-6);
  border-color: var(--ios-primary);
}

.btn-ghost {
  background-color: transparent;
  color: var(--ios-text-primary);
}

.btn-ghost:hover {
  background-color: var(--ios-gray-6);
}

.btn-sm {
  padding: var(--ios-spacing-sm) var(--ios-spacing-md);
  font-size: 0.875rem;
  min-height: 36px;
}

.btn-lg {
  padding: var(--ios-spacing-lg) var(--ios-spacing-2xl);
  font-size: 1rem;
  min-height: 52px;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-icon {
  padding: var(--ios-spacing-sm);
  min-height: auto;
  border-radius: var(--ios-radius-full);
}

/* Action buttons */
.action-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.btn-action {
  padding: 0.275rem 0.65rem;
  border: none;
  border-radius: var(--ios-radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.btn-edit {
  background-color: rgba(255, 193, 7, 0.1);
  color: var(--warning-color);
  border: 1px solid rgba(255, 193, 7, 0.2);
}

.btn-edit:hover {
  background-color: var(--warning-color);
  color: white;
}

.btn-delete {
  background-color: rgba(220, 53, 69, 0.1);
  color: var(--danger-color);
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.btn-delete:hover {
  background-color: var(--danger-color);
  color: white;
}


/* mobile menu */
.no-scroll {
  overflow: hidden;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 999;
}

.overlay.active {
    display: block;
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero-bg.jpg') no-repeat center center/cover;
  color: #fff;
  padding: 6rem 0;
  text-align: center;
}

.hero h1 {
  color: #fff;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* ===== CONTENT SECTIONS ===== */
.section {
  padding: 1.5rem 1rem;
}

.section-title {
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--secondary-color);
  margin: 0.5rem auto;
}

.section-light {
  background-color: var(--light-color);
}

/* ===== CARDS ===== */
.card {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  margin-bottom: 1.5rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

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

/* ===== FORM STYLES ===== */
.form-section {
  background-color: var(--ios-bg-primary);
  border-radius: var(--ios-radius-lg);
  padding: var(--ios-spacing-xl);
  margin-bottom: var(--ios-spacing-xl);
  box-shadow: var(--ios-shadow-subtle);
}

.form-header {
  margin-bottom: var(--ios-spacing-2xl);
  padding-bottom: var(--ios-spacing-lg);
  border-bottom: 1px solid var(--ios-border-secondary);
}

.form-title {
  color: var(--ios-primary-dark);
  /* margin-bottom: 0.5rem; */
  font-size: 1.2rem;
  font-weight: 600;
  /* color: var(--ios-text-primary); */
  /* margin-bottom: var(--ios-spacing-sm); */
}

.form-subtitle {
  /* color: var(--gray); */
  /* font-size: 1.1rem; */
  font-size: 0.9375rem;
  color: var(--ios-text-secondary);
  /* line-height: 1.4; */
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--ios-spacing-xl);
  /* gap: 1rem; */
  margin-bottom: 1rem;
}

.form-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: var(--ios-spacing-sm);
}

.form-row .form-group {
  flex: 1;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--ios-primary-dark);
}

.form-label.required::after {
  content: " *";
  color: var(--danger-color);
}

.form-control {
  display: block;
  width: 100%;
  padding: var(--ios-spacing-md) var(--ios-spacing-lg);
  font-size: 0.9375rem;
  font-family: var(--ios-font-family);
  line-height: 1.47059;
  color: var(--ios-text-primary);
  background-color: var(--ios-bg-primary);
  border: 1px solid var(--ios-border-primary);
  border-radius: var(--ios-radius-md);
  transition: border-color var(--ios-transition-fast), box-shadow var(--ios-transition-fast);
  appearance: none;
  min-height: 44px; /* iOS minimum touch target */
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 75, 132, 0.1);
}

.form-control::placeholder {
  color: var(--gray);
  opacity: 0.7;
}

/* Textarea specific styles */
textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Select dropdown styles */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236c757d'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

/* File input styles */
.form-file {
  position: relative;
}

.form-file-input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.form-file-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border: 2px dashed var(--gray-light);
  border-radius: var(--border-radius);
  background-color: var(--light-color);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.form-file-label:hover {
  border-color: var(--primary-color);
  background-color: rgba(26, 75, 132, 0.05);
}

.form-file-label i {
  font-size: 2rem;
  color: var(--gray);
  margin-bottom: 0.5rem;
}

.form-file-preview {
  margin-top: 1rem;
  display: none;
}

.form-file-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--border-radius);
}

/* Checkbox and Radio styles */
.form-check {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.form-check-input {
  margin-right: 0.75rem;
  width: 1.2em;
  height: 1.2em;
  border: 2px solid var(--gray-light);
  border-radius: 3px;
  appearance: none;
  background-color: #fff;
  transition: var(--transition);
  position: relative;
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-input:checked::before {
  content: "✓";
  position: absolute;
  color: white;
  font-size: 0.8em;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.form-check-input[type="radio"] {
  border-radius: 50%;
}

.form-check-input[type="radio"]:checked::before {
  content: "";
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background-color: white;
}

.form-check-label {
  margin-bottom: 0;
  cursor: pointer;
}

/* Checkbox/Radio groups */
.checkbox-group,
.radio-group {
  background: var(--light-color);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.checkbox-group .form-check,
.radio-group .form-check {
  margin-bottom: 0.75rem;
}

/* Date input styles */
input[type="date"].form-control,
input[type="time"].form-control,
input[type="datetime-local"].form-control {
  appearance: none;
}

input.readonly {
  background-color: #f4f6f8;
  color: #555;
  cursor: not-allowed;
}

/* Validation styles */
.form-control.is-invalid {
  border-color: var(--danger-color);
}

.form-control.is-valid {
  border-color: var(--success-color);
}

.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--danger-color);
}

.valid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--success-color);
}

.form-control.is-invalid ~ .invalid-feedback,
.form-control.is-valid ~ .valid-feedback {
  display: block;
}

.address-section {
  background: var(--light-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--primary-color);
}

#mailing_address_display {
    background-color: rgba(26, 75, 132, 0.05);
    border-color: var(--primary-color);
}

#address_preview {
    font-family: monospace;
    background: white;
    padding: 0.5rem;
    border-radius: 3px;
    border: 1px solid var(--gray-light);
}

/* Smooth transitions */
.address-section,
#mailing_address_fields,
#mailing_address_display {
    transition: all 0.3s ease;
}

/* Loading state */
.form-loading {
  opacity: 0.7;
  pointer-events: none;
}

.form-loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Success message */
.form-success {
  background-color: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.2);
  color: var(--success-color);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  display: none;
}

/* ===== ALERTS ===== */
.alert {
  position: relative;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: var(--border-radius);
}

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

.alert-error {
  background-color: #f2dede;
  border-color: #ebccd1;
  color: #a94442;
}

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

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

.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, var(--primary-color), var(--navbar-color));;
  color: var(--secondary-color);
  /* padding: 0.1rem 0 0.1rem; */
}

.footer a {
  color: #fff;
}

.footer a:hover {
  color: var(--secondary-color);
}

.footer-title {
  color: #fff;
  margin-bottom: 0rem;
  font-size: 1.25rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.1rem;
}

.footer-bottom {
  padding: 0.3rem 0 0.3rem;
  text-align: center;
}

/* ===============================
   LARGE SCREENS
   27", 4K, wide monitors
================================ */
@media (min-width: 1800px) {
  .panel-left {
    flex-basis: 420px;
    max-width: 420px;
  }

  .panel-right {
    padding: 1.25rem;
  }
}

/* ===============================
   TABLETS / SMALL LAPTOPS
================================ */
@media (max-width: 1024px) {
  .panel-left {
    flex: 0 0 280px;
    max-width: 280px;
  }
  .page-container {
    padding-inline: 1rem;
  }
}

/* ===============================
   PHONES
================================ */
@media (max-width: 768px) {
  .container-fluid {
    height: auto;
    min-height: calc(100dvh - 95px);
    overflow: visible;
  }

  .panel-layout {
    flex-direction: column;
    height: auto;
  }

  .panel-left,
  .panel-right {
    flex: none;
    width: 100%;
    max-width: none;
    min-width: 0;

    overflow-y: visible;
  }

  .panel-left {
    border-right: none;
    border-bottom: 1px solid var(--gray-light);
  }

  .page-container {
    width: 100%;
    padding-inline: 0.75rem;
    padding-block: 0.75rem;
  }

  .form-section {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
    
  .form-actions {
    flex-direction: column;
  }
    
  .form-actions .btn {
    width: 100%;
  }
  .address-section {
    padding: 1rem;
  }
}

/* ===============================
   VERY SMALL PHONES
================================ */
@media (max-width: 480px) {
  .container {
    padding-inline: 0.5rem;
  }

  .panel-left,
  .panel-right {
    padding: 0.75rem;
  }
}

@media (max-width: 576px) {
  .navbar-container {
    padding: 0 10px;
  }
  
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

.table-responsive {
  overflow-x: auto;
  width: 100%;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--ios-spacing-xs); }
.mt-2 { margin-top: var(--ios-spacing-sm); }
.mt-3 { margin-top: var(--ios-spacing-md); }
.mt-4 { margin-top: var(--ios-spacing-lg); }
.mt-5 { margin-top: var(--ios-spacing-xl); }

.mb-1 { margin-bottom: var(--ios-spacing-xs); }
.mb-2 { margin-bottom: var(--ios-spacing-sm); }
.mb-3 { margin-bottom: var(--ios-spacing-md); }
.mb-4 { margin-bottom: var(--ios-spacing-lg); }
.mb-5 { margin-bottom: var(--ios-spacing-xl); }

.p-1 { padding: var(--ios-spacing-xs); }
.p-2 { padding: var(--ios-spacing-sm); }
.p-3 { padding: var(--ios-spacing-md); }
.p-4 { padding: var(--ios-spacing-lg); }
.p-5 { padding: var(--ios-spacing-xl); }
.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

.gap-1 { gap: var(--ios-spacing-xs); }
.gap-2 { gap: var(--ios-spacing-sm); }
.gap-3 { gap: var(--ios-spacing-md); }
.gap-4 { gap: var(--ios-spacing-lg); }
.gap-5 { gap: var(--ios-spacing-xl); }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded-sm { border-radius: var(--ios-radius-sm); }
.rounded-md { border-radius: var(--ios-radius-md); }
.rounded-lg { border-radius: var(--ios-radius-lg); }
.rounded-full { border-radius: var(--ios-radius-full); }

.shadow-sm { box-shadow: var(--ios-shadow-subtle); }
.shadow-md { box-shadow: var(--ios-shadow-medium); }
.shadow-lg { box-shadow: var(--ios-shadow-prominent); }

.bg-primary { background-color: var(--ios-primary); }
.bg-secondary { background-color: var(--ios-secondary); }
.bg-success { background-color: var(--ios-green); }
.bg-danger { background-color: var(--ios-red); }
.bg-warning { background-color: var(--ios-orange); }

.text-primary { color: var(--ios-primary); }
.text-secondary { color: var(--ios-secondary); }
.text-success { color: var(--ios-green); }
.text-danger { color: var(--ios-red); }
.text-warning { color: var(--ios-orange); }
.text-muted { color: var(--ios-text-secondary); }

/* .text-danger {
  color: var(--danger-color);
} */
