@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css");

/* Hostaway Theme CSS for Cleaner Scheduler App */

/* Hostaway uses a teal/cyan primary color (#00C1D5) with dark navy (#2A3B59) as secondary */
:root {
  /* Primary Colors */
  --bs-primary: #00C1D5;
  --bs-primary-rgb: 0, 193, 213;
  --bs-primary-dark: #00A3B5;
  
  /* Secondary Colors */
  --bs-secondary: #4A5B79;
  --bs-secondary-rgb: 74, 91, 121;
  
  /* Accent Colors */
  --bs-accent: #FF8A65;
  --bs-accent-rgb: 255, 138, 101;
  
  /* Success/Warning/Danger Colors */
  --bs-success: #4CAF50;
  --bs-warning: #FFAB00;
  --bs-danger: #F44336;
  
  /* Background Colors */
  --bs-light: #FFFFFF;
  --bs-dark: #465B82;
}

/* Custom Button Styles */
.btn-primary {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: var(--bs-primary-dark) !important;
  border-color: var(--bs-primary-dark) !important;
}

.btn-outline-primary {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}

.btn-secondary {
  background-color: var(--bs-secondary);
  border-color: var(--bs-secondary);
}

/* Links */
a {
  color: var(--bs-primary);
}

a:hover {
  color: var(--bs-primary-dark);
}

/* Cards */
.card {
  border-radius: 10px;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card-header {
  background-color: var(--bs-secondary);
  color: white;
  border-top-left-radius: 10px !important;
  border-top-right-radius: 10px !important;
}

/* Navbar */
.navbar {
  background-color: #355792;
}

.navbar-brand {
  color: white;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.8);
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: var(--bs-primary);
}

.navbar-dark .navbar-nav .active > .nav-link {
  color: var(--bs-primary);
}

/* Sidebar */
.sidebar {
  background-color: var(--bs-secondary);
}

.sidebar .nav-link {
  color: rgba(255, 255, 255, 0.8);
}

.sidebar .nav-link:hover {
  color: var(--bs-primary);
}

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

/* Badge */
.badge-primary {
  background-color: var(--bs-primary);
}

.badge-secondary {
  background-color: var(--bs-secondary);
}

/* Alerts */
.alert-primary {
  color: var(--bs-primary-dark);
  background-color: rgba(var(--bs-primary-rgb), 0.15);
  border-color: rgba(var(--bs-primary-rgb), 0.3);
}

/* Form Controls */
.form-control:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Tables */
.table-primary {
  --bs-table-bg: rgba(var(--bs-primary-rgb), 0.1);
  --bs-table-striped-bg: rgba(var(--bs-primary-rgb), 0.15);
  --bs-table-active-bg: rgba(var(--bs-primary-rgb), 0.2);
}

/* List Groups */
.list-group-item.active {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

/* Enhanced navbar styling for better visibility */
    .navbar {
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
      border-bottom: 2px solid #495057;
      background: linear-gradient(135deg, #343a40 0%, #495057 100%) !important;
      position: sticky;
      top: 0;
      z-index: 1030;
    }
    
    .navbar-brand {
      font-weight: 700;
      font-size: 1.4rem;
      color: #fff !important;
      text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
      transition: all 0.3s ease;
      position: relative;
      display: flex !important;
      align-items: center;
    }
    
    .navbar-brand img {
      height: 60px !important;
      width: auto !important;
      max-height: none !important;
      opacity: 0.65 !important;
      margin-left: 8px !important;
    }
    
    /* Hide logo when burger menu is active on mobile */
    @media (max-width: 768px) {
      .navbar-collapse.show ~ .navbar-brand,
      .navbar-collapse.showing ~ .navbar-brand {
        display: none !important;
      }
      
      .navbar-collapse.show .navbar-brand,
      .navbar-collapse.showing .navbar-brand {
        display: none !important;
      }
      
      /* Hide logo when burger menu is expanded */
      .navbar-collapse.collapsing ~ .navbar-brand,
      .navbar-collapse.collapse.show ~ .navbar-brand {
        display: none !important;
      }
      
      /* Hide logo in sidebar when burger menu is active */
      .navbar-collapse.show .navbar-brand img,
      .navbar-collapse.showing .navbar-brand img {
        display: none !important;
      }
      
      /* Hide the entire navbar-brand when menu is open */
      .navbar-collapse.show ~ .navbar-brand img,
      .navbar-collapse.showing ~ .navbar-brand img {
        display: none !important;
      }
    }
    
    /* Mobile-specific navbar brand styling */
    @media (max-width: 768px) {
      .navbar-brand {
        font-size: 1.2rem;
        min-width: 0;
        flex-shrink: 0;
        visibility: visible !important;
        display: flex !important;
        opacity: 1 !important;
        z-index: 1000;
      }
      
      .navbar-brand img {
        height: 55px !important;
        width: auto !important;
        margin-right: 0.5rem !important;
        opacity: 0.65 !important;
        margin-left: 5px !important;
      }
      
      .navbar-brand .d-flex {
        min-width: 0;
        visibility: visible !important;
      }
      
      .navbar-brand .fw-bold {
        font-size: 1.1rem !important;
        line-height: 1.2;
        visibility: visible !important;
        color: #fff !important;
      }
      
      .navbar-brand .small {
        font-size: 0.75rem !important;
        line-height: 1.1;
        visibility: visible !important;
        color: #adb5bd !important;
      }
      
      /* Ensure navbar brand doesn't get hidden by other elements */
      .navbar .container-fluid {
        position: relative;
      }
      
      .navbar-brand {
        position: relative;
        z-index: 1001;
      }
    }
    
    .navbar-brand:hover {
      color: #17a2b8 !important;
      transform: translateY(-1px);
    }
    
    .navbar-brand::after {
      content: '';
      position: absolute;
      bottom: -2px;
      left: 0;
      width: 0;
      height: 2px;
      background: #17a2b8;
      transition: width 0.3s ease;
    }
    
    .navbar-brand:hover::after {
      width: 100%;
    }
    
    .nav-link {
      font-weight: 500;
      color: #e9ecef !important;
      padding: 0.75rem 1rem !important;
      border-radius: 6px;
      margin: 0 2px;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }
    
    .nav-link::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
      transition: left 0.5s ease;
    }
    
    .nav-link:hover::before {
      left: 100%;
    }
    
    .nav-link:hover {
      color: #fff !important;
      background-color: rgba(255, 255, 255, 0.1);
      transform: translateY(-1px);
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    
    .nav-link.active {
      color: #fff !important;
      background-color: rgba(23, 162, 184, 0.3);
      border: 1px solid rgba(23, 162, 184, 0.5);
      box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
    }
    
    .dropdown-toggle::after {
      margin-left: 0.5em;
      transition: transform 0.3s ease;
    }
    
    .dropdown-toggle:hover::after {
      transform: rotate(180deg);
    }
    
    .dropdown-menu {
      background: linear-gradient(135deg, #495057 0%, #343a40 100%);
      border: 1px solid #6c757d;
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
      border-radius: 8px;
      margin-top: 5px;
      min-width: 200px;
      animation: dropdownFadeIn 0.3s ease;
    }
    
    @keyframes dropdownFadeIn {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    .dropdown-item {
      color: #e9ecef !important;
      padding: 0.75rem 1rem;
      transition: all 0.3s ease;
      border-radius: 4px;
      margin: 2px 8px;
      position: relative;
      overflow: hidden;
    }
    
    .dropdown-item::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      width: 0;
      height: 100%;
      background: rgba(23, 162, 184, 0.2);
      transition: width 0.3s ease;
    }
    
    .dropdown-item:hover::before {
      width: 100%;
    }
    
    .dropdown-item:hover {
      color: #fff !important;
      background-color: rgba(23, 162, 184, 0.3);
      transform: translateX(5px);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .dropdown-item.active {
      color: #fff !important;
      background-color: rgba(23, 162, 184, 0.5);
      font-weight: 600;
      box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
    }
    
    .navbar-toggler {
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-radius: 6px;
      padding: 0.5rem 0.75rem;
      transition: all 0.3s ease;
    }
    
    .navbar-toggler:hover {
      border-color: rgba(255, 255, 255, 0.6);
      background-color: rgba(255, 255, 255, 0.1);
      transform: scale(1.05);
    }
    
    .navbar-toggler:focus {
      box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25);
    }
    
    /* Enhanced user menu styling */
    .avatar-wrapper {
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
      border-radius: 50%;
      border: 2px solid rgba(255, 255, 255, 0.3);
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }
    
    .avatar-wrapper::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
      transition: left 0.5s ease;
    }
    
    .avatar-wrapper:hover::before {
      left: 100%;
    }
    
    .avatar-wrapper:hover {
      border-color: rgba(255, 255, 255, 0.6);
      transform: scale(1.1);
      box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
    }
    
    .user-avatar-icon {
      color: #fff;
      font-size: 18px;
      line-height: 1;
      transition: all 0.3s ease;
    }
    
    .user-name {
      font-weight: 600;
      color: #fff;
      max-width: 140px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      display: inline-block;
      vertical-align: middle;
      text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
      transition: all 0.3s ease;
    }
    
    .user-menu-link {
      min-width: 0;
      padding: 0.5rem 1rem !important;
      border-radius: 8px;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }
    
    .user-menu-link::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
      transition: left 0.5s ease;
    }
    
    .user-menu-link:hover::before {
      left: 100%;
    }
    
    .user-menu-link:hover {
      background-color: rgba(255, 255, 255, 0.1);
      transform: translateY(-1px);
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    
    .user-avatar-img {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      object-fit: cover;
      background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
      border: 2px solid rgba(255, 255, 255, 0.3);
      display: block;
      transition: all 0.3s ease;
    }
    
    /* Ensure profile picture in navbar is properly sized */
    .navbar .user-avatar-img {
      width: 32px !important;
      height: 32px !important;
      border-radius: 50% !important;
      object-fit: cover !important;
    }
    
    /* Avatar wrapper consistency */
    .navbar .avatar-wrapper {
      width: 32px !important;
      height: 32px !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      border-radius: 50% !important;
      overflow: hidden !important;
    }
    
    .user-avatar-img:hover {
      border-color: rgba(255, 255, 255, 0.6);
      transform: scale(1.1);
      box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
    }
    
    /* Responsive improvements */
    @media (max-width: 991.98px) {
      .navbar-collapse {
        background: linear-gradient(135deg, #495057 0%, #343a40 100%);
        border-radius: 8px;
        margin-top: 10px;
        padding: 1rem;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
        animation: slideDown 0.3s ease;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        overflow-x: hidden;
      }
      
      @keyframes slideDown {
        from {
          opacity: 0;
          transform: translateY(-20px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }
      
      .nav-link {
        margin: 2px 0;
        border-radius: 6px;
      }
      
      .dropdown-menu {
        background: rgba(73, 80, 87, 0.9);
        border: 1px solid #6c757d;
        margin-top: 0;
        margin-left: 1rem;
      }
    }
    
    /* Animation for menu items */
    .nav-item {
      transition: all 0.3s ease;
    }
    
    .nav-item:hover {
      transform: translateY(-2px);
    }
    
    /* Icon styling */
    .nav-link i, .dropdown-item i {
      transition: all 0.3s ease;
    }
    
    .nav-link:hover i, .dropdown-item:hover i {
      transform: scale(1.1);
      color: #17a2b8;
    }
    
    /* Pulse animation for active items */
    .nav-link.active i {
      animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
      0% {
        transform: scale(1);
      }
      50% {
        transform: scale(1.1);
      }
      100% {
        transform: scale(1);
      }
    }
    
    /* Enhanced dropdown divider */
    .dropdown-divider {
      border-color: rgba(255, 255, 255, 0.2);
      margin: 0.5rem 0;
    }
    
    /* Custom navbar breakpoint for 1385px (matches base.html) */
    /* Desktop mode - above 1385px */
    @media (min-width: 1386px) {
      .navbar-expand-custom {
        flex-wrap: wrap;
      }
      
      .navbar-expand-custom .navbar-nav {
        flex-direction: row;
      }
      
      .navbar-expand-custom .navbar-nav .nav-link {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
      }
      
      .navbar-expand-custom .navbar-nav .dropdown-menu {
        position: absolute;
      }
      
      .navbar-expand-custom .navbar-toggler {
        display: none;
      }
      
      .navbar-expand-custom .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
      }
    }
    
    /* At 1385px and below, switch to burger menu */
    @media (max-width: 1385px) {
      .navbar-expand-custom {
        flex-wrap: nowrap;
      }
      
      .navbar-expand-custom .navbar-nav {
        flex-direction: column;
      }
      
      .navbar-expand-custom .navbar-nav .nav-link {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
      }
      
      .navbar-expand-custom .navbar-nav .dropdown-menu {
        position: static;
        float: none;
      }
      
      .navbar-expand-custom .navbar-toggler {
        display: block;
      }
      
      .navbar-expand-custom .navbar-collapse {
        display: none !important;
      }
      
      .navbar-expand-custom .navbar-collapse.show {
        display: flex !important;
        flex-direction: column;
      }
      
      /* Notification color scheme for property templates */
      /* Email section styling - teal/cyan */
      .tab-pane#email-notifications .text-primary {
          color: #00C1D5 !important;
      }
      
      .tab-pane#email-notifications .form-check-input:checked {
          background-color: #00C1D5;
          border-color: #00C1D5;
      }
      
      /* SMS section styling - true blue */
      .tab-pane#sms-notifications .text-primary {
          color: #0080FF !important;
      }
      
      .tab-pane#sms-notifications .form-check-input:checked {
          background-color: #0080FF;
          border-color: #0080FF;
      }
      
      /* WhatsApp section styling - green */
      .tab-pane#whatsapp-notifications .text-primary {
          color: #25d366 !important;
      }
      
      .tab-pane#whatsapp-notifications .form-check-input:checked {
          background-color: #25d366;
          border-color: #25d366;
      }
      
      /* Tab button colors for notification types - maximum specificity */
      .nav-tabs .nav-link#email-notifications-tab,
      .nav-tabs .nav-link[data-bs-target="#email-notifications"] {
          color: #00C1D5 !important;
          border-color: transparent !important;
      }
      
      .nav-tabs .nav-link#email-notifications-tab.active,
      .nav-tabs .nav-link#email-notifications-tab:hover,
      .nav-tabs .nav-link[data-bs-target="#email-notifications"].active,
      .nav-tabs .nav-link[data-bs-target="#email-notifications"]:hover {
          background-color: #00C1D5 !important;
          border-color: #00C1D5 !important;
          color: white !important;
      }
      
      .nav-tabs .nav-link#sms-notifications-tab,
      .nav-tabs .nav-link[data-bs-target="#sms-notifications"] {
          color: #0080FF !important;
          border-color: transparent !important;
      }
      
      .nav-tabs .nav-link#sms-notifications-tab.active,
      .nav-tabs .nav-link#sms-notifications-tab:hover,
      .nav-tabs .nav-link[data-bs-target="#sms-notifications"].active,
      .nav-tabs .nav-link[data-bs-target="#sms-notifications"]:hover {
          background-color: #0080FF !important;
          border-color: #0080FF !important;
          color: white !important;
      }
      
      .nav-tabs .nav-link#whatsapp-notifications-tab,
      .nav-tabs .nav-link[data-bs-target="#whatsapp-notifications"] {
          color: #25d366 !important;
          border-color: transparent !important;
      }
      
      .nav-tabs .nav-link#whatsapp-notifications-tab.active,
      .nav-tabs .nav-link#whatsapp-notifications-tab:hover,
      .nav-tabs .nav-link[data-bs-target="#whatsapp-notifications"].active,
      .nav-tabs .nav-link[data-bs-target="#whatsapp-notifications"]:hover {
          background-color: #25d366 !important;
          border-color: #25d366 !important;
          color: white !important;
      }
    }

    /* Mobile side padding reduction for all pages */
    @media (max-width: 576px) {
      /* Strip most side padding on mobile to reclaim width */
      body,
      body .container-fluid,
      body .container-fluid.mt-4,
      body .content-wrapper,
      body .row,
      body .col,
      body .col-12,
      body .card {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
      }

      /* Keep rows from introducing bootstrap gutters */
      body .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
      }

      /* Light padding inside cards so text doesn’t hug edges */
      body .card-body,
      body .card-header {
        padding-left: 8px !important;
        padding-right: 8px !important;
      }
    }

/* Shared split-app shell kit for Indigo external modules.
   Intended for workflow/statements-style apps to match Indigo chrome
   without copying Indigo templates. */

:root {
  --indigo-shell-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --indigo-shell-font-size-body: 0.96rem;
  --indigo-shell-line-height-body: 1.45;
  --indigo-shell-font-size-h1: clamp(1.65rem, 1.2rem + 1vw, 2.15rem);
  --indigo-shell-font-size-h2: clamp(1.35rem, 1.05rem + 0.7vw, 1.75rem);
  --indigo-shell-font-size-h3: 1.2rem;
  --indigo-shell-font-size-h4: 1.05rem;
  --indigo-shell-font-size-h5: 0.98rem;
  --indigo-shell-font-size-h6: 0.9rem;
  --indigo-shell-space-xs: 0.25rem;
  --indigo-shell-space-sm: 0.5rem;
  --indigo-shell-space-md: 0.875rem;
  --indigo-shell-space-lg: 1.25rem;
  --indigo-shell-space-xl: 1.75rem;
  --indigo-shell-radius-sm: 6px;
  --indigo-shell-radius-md: 10px;
  --indigo-shell-radius-lg: 14px;
  --indigo-shell-shadow-card: 0 12px 30px rgba(9, 15, 27, 0.22);
  --indigo-shell-shadow-header: 0 2px 10px rgba(0, 0, 0, 0.3);
  --indigo-shell-surface: rgba(23, 35, 56, 0.94);
  --indigo-shell-surface-alt: rgba(54, 70, 98, 0.92);
  --indigo-shell-border: rgba(132, 156, 199, 0.2);
  --indigo-shell-text-primary: #edf4ff;
  --indigo-shell-text-strong: #ffffff;
  --indigo-shell-text-muted: #b8c5da;
}

html,
body {
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(0, 193, 213, 0.14), transparent 24rem),
    linear-gradient(180deg, #1a2333 0%, #22304a 100%);
  color: var(--indigo-shell-text-primary);
  font-family: var(--indigo-shell-font-family);
  font-size: var(--indigo-shell-font-size-body);
  line-height: var(--indigo-shell-line-height-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  color: var(--indigo-shell-text-strong);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--indigo-shell-space-sm);
}

h1,
.h1 {
  font-size: var(--indigo-shell-font-size-h1);
}

h2,
.h2 {
  font-size: var(--indigo-shell-font-size-h2);
}

h3,
.h3 {
  font-size: var(--indigo-shell-font-size-h3);
}

h4,
.h4 {
  font-size: var(--indigo-shell-font-size-h4);
}

h5,
.h5 {
  font-size: var(--indigo-shell-font-size-h5);
}

h6,
.h6 {
  font-size: var(--indigo-shell-font-size-h6);
}

.navbar,
.app-navbar,
.shell-navbar {
  background: linear-gradient(135deg, #343a40 0%, #495057 100%) !important;
  border-bottom: 2px solid #495057;
  box-shadow: var(--indigo-shell-shadow-header);
  min-height: 72px;
}

.navbar-brand,
.app-navbar__brand,
.shell-navbar__brand {
  color: #ffffff !important;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.45);
  font-size: 1.25rem;
}

.navbar-brand img,
.app-navbar__brand img,
.shell-navbar__brand img {
  height: 56px;
  width: auto;
}

.navbar-dark .navbar-nav .nav-link,
.navbar .nav-link,
.app-navbar .nav-link {
  color: rgba(255, 255, 255, 0.84);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar .nav-link:hover,
.app-navbar .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus,
.navbar .nav-link:focus,
.app-navbar .nav-link:focus {
  color: var(--bs-primary);
}

.container,
.container-fluid,
.shell-page {
  color: inherit;
}

.shell-page,
.app-page {
  padding-top: var(--indigo-shell-space-lg);
  padding-bottom: var(--indigo-shell-space-xl);
}

.shell-page__header,
.app-page__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--indigo-shell-space-md);
  margin-bottom: var(--indigo-shell-space-lg);
}

.shell-page__title,
.app-page__title {
  margin: 0;
}

.shell-page__subtitle,
.app-page__subtitle {
  margin-top: var(--indigo-shell-space-xs);
  color: var(--indigo-shell-text-muted);
  font-size: 0.96rem;
}

.shell-toolbar,
.app-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--indigo-shell-space-sm);
  align-items: center;
}

.card,
.surface-card,
.shell-card,
.app-card {
  background: var(--indigo-shell-surface);
  color: var(--indigo-shell-text-primary);
  border: 1px solid var(--indigo-shell-border);
  border-radius: var(--indigo-shell-radius-lg);
  box-shadow: var(--indigo-shell-shadow-card);
}

.card-header,
.surface-card__header,
.shell-card__header,
.app-card__header,
.card-header.bg-secondary,
.card-header.bg-light {
  background: var(--indigo-shell-surface-alt);
  color: var(--indigo-shell-text-strong);
  border-bottom: 1px solid var(--indigo-shell-border);
  border-top-left-radius: var(--indigo-shell-radius-lg) !important;
  border-top-right-radius: var(--indigo-shell-radius-lg) !important;
  font-weight: 700;
  padding: 0.9rem 1rem;
}

.card-body,
.surface-card__body,
.shell-card__body,
.app-card__body {
  color: inherit;
  padding: 1rem;
}

.shell-card__header-title,
.app-card__header-title {
  margin: 0;
  font-size: 1rem;
}

.shell-card__header-meta,
.app-card__header-meta {
  margin-top: 0.18rem;
  color: var(--indigo-shell-text-muted);
  font-size: 0.84rem;
}

.table {
  color: var(--indigo-shell-text-primary);
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
  --bs-table-hover-bg: rgba(0, 193, 213, 0.08);
  --bs-table-border-color: rgba(132, 156, 199, 0.18);
  font-size: 0.94rem;
}

.table > :not(caption) > * > * {
  background-color: transparent;
  color: inherit;
  border-bottom-color: rgba(132, 156, 199, 0.18);
}

.table thead th,
.table thead td {
  color: var(--indigo-shell-text-strong);
  background: rgba(47, 62, 89, 0.96);
  border-bottom-color: rgba(132, 156, 199, 0.24);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.table tbody td,
.table tbody th {
  vertical-align: middle;
  padding-top: 0.78rem;
  padding-bottom: 0.78rem;
}

.table-hover tbody tr:hover {
  color: #ffffff;
}

.btn {
  border-radius: var(--indigo-shell-radius-md);
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: none;
  padding: 0.52rem 0.95rem;
  font-size: 0.92rem;
}

.btn-primary {
  color: #10243a;
}

.btn-primary:hover,
.btn-primary:focus {
  color: #082032;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-light,
.btn-outline-danger {
  background-color: transparent;
}

.btn-sm {
  padding: 0.32rem 0.72rem;
  font-size: 0.82rem;
  border-radius: var(--indigo-shell-radius-sm);
}

.btn:focus,
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.2);
}

.badge,
.status-badge,
.chip,
.app-badge {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 0.72rem;
  line-height: 1.15;
  padding: 0.42em 0.72em;
}

.badge.bg-success,
.status-badge--success {
  color: #0d2616 !important;
}

.badge.bg-warning,
.status-badge--warning {
  color: #2b2100 !important;
}

.badge.bg-info,
.status-badge--info,
.badge.bg-primary,
.status-badge--primary {
  color: #072331 !important;
}

.badge.bg-danger,
.status-badge--danger {
  color: #ffffff !important;
}

.text-muted,
.small.text-muted,
.form-text {
  color: var(--indigo-shell-text-muted) !important;
}

.form-control,
.form-select,
textarea.form-control {
  background: rgba(17, 28, 46, 0.96);
  color: #edf4ff;
  border-color: rgba(132, 156, 199, 0.24);
}

.form-control::placeholder,
textarea.form-control::placeholder {
  color: #94a7c6;
}

.dropdown-menu {
  background: rgba(23, 35, 56, 0.98);
  border: 1px solid rgba(132, 156, 199, 0.2);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(9, 15, 27, 0.28);
}

.dropdown-item {
  color: #edf4ff;
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: #ffffff;
  background: rgba(0, 193, 213, 0.1);
}

.alert {
  border-radius: 12px;
}

.shell-section-title,
.app-section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  color: var(--indigo-shell-text-strong);
  font-size: 1rem;
  font-weight: 700;
}

.shell-section-title::after,
.app-section-title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 193, 213, 0.36), rgba(132, 156, 199, 0.08));
}

.shell-stat,
.app-stat {
  display: grid;
  gap: 0.22rem;
}

.shell-stat__label,
.app-stat__label {
  color: var(--indigo-shell-text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.shell-stat__value,
.app-stat__value {
  color: var(--indigo-shell-text-strong);
  font-size: 1.42rem;
  font-weight: 700;
  line-height: 1.1;
}

.shell-record-row,
.app-record-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.78rem 0;
  border-bottom: 1px solid rgba(132, 156, 199, 0.14);
}

.shell-record-row:last-child,
.app-record-row:last-child {
  border-bottom: 0;
}

.shell-record-row__primary,
.app-record-row__primary {
  min-width: 0;
}

.shell-record-row__title,
.app-record-row__title {
  color: var(--indigo-shell-text-strong);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.2;
}

.shell-record-row__subtitle,
.app-record-row__subtitle {
  color: var(--indigo-shell-text-muted);
  font-size: 0.82rem;
  line-height: 1.2;
  margin-top: 0.14rem;
}

.shell-record-row__meta,
.app-record-row__meta {
  color: var(--indigo-shell-text-muted);
  font-size: 0.8rem;
  text-align: right;
}

@media (max-width: 768px) {
  .shell-page,
  .app-page {
    padding-top: var(--indigo-shell-space-md);
    padding-bottom: var(--indigo-shell-space-lg);
  }

  .shell-page__header,
  .app-page__header {
    margin-bottom: var(--indigo-shell-space-md);
  }

  .shell-record-row,
  .app-record-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .shell-record-row__meta,
  .app-record-row__meta {
    text-align: left;
  }
}
