:root {
  --sidebar-width: 250px;
  --topbar-height: 56px;
  --app-bg: #f5f5f5;
  --sidebar-bg: #2c3e50;
  --sidebar-bg-dark: #1a252f;
  --header-bg: #ffffff;
  --header-border: #e5e7eb;
  --header-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-size: 14px;
}

body {
  background: var(--app-bg);
  padding-bottom: env(safe-area-inset-bottom);
}

.app-container {
  display: flex;
  height: 100dvh;
  width: 100%;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: white;
  overflow-y: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--sidebar-bg-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-menu {
  flex: 1;
  padding: 1rem 0;
}

.menu-category {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #95a5a6;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-top: 1rem;
}

.menu-category:first-child {
  margin-top: 0;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  color: #ecf0f1;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.sidebar-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-menu a.active {
  background: #3498db;
  color: white;
}

.sidebar-menu i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.topbar {
  height: var(--topbar-height);
  background: white;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  justify-content: space-between;
  flex-shrink: 0;
}

.topbar h1 {
  font-size: 1.25rem;
  margin: 0;
  font-weight: 600;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-actions .navbar-nav {
  flex-direction: row;
}

@media (max-width: 576px) {
  .topbar-title h1 {
    font-size: 1rem;
  }
  .topbar-actions .btn {
    padding: 0.25rem 0.5rem;
  }
}

.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--app-bg);
  min-height: 0;
  padding-bottom: calc(1.5rem + 4rem);
  -webkit-overflow-scrolling: touch;
}

.order-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.card {
  font-size: 0.875rem;
}

.card-title {
  font-size: 1rem;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }

.btn {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

.btn-sm {
  font-size: 0.8125rem;
  padding: 0.375rem 0.75rem;
}

.filter-tabs {
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tabs.nav-tabs {
  border-bottom: 1px solid #dee2e6;
}

.filter-tabs.nav-tabs .nav-link {
  border: 1px solid transparent;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  color: #6c757d;
}

.filter-tabs.nav-tabs .nav-link.active {
  color: #212529;
  background: #fff;
  border-color: #dee2e6 #dee2e6 #fff;
}

.filter-tabs.nav-tabs .nav-link .status-badge {
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
}

.status-badge {
  padding: 0.25rem 0.85rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.status-lead { background-color: #ffc107; color: #000; }
.status-active { background-color: #28a745; color: #fff; }
.status-inactive { background-color: #6c757d; color: #fff; }

.status-draft { background-color: #e9ecef; color: #495057; }
.status-open { background-color: #17a2b8; color: #fff; }
.status-in-progress { background-color: #007bff; color: #fff; }
.status-completed { background-color: #28a745; color: #fff; }
.status-cancelled { background-color: #dc3545; color: #fff; }

.status-new { background-color: #6610f2; color: #fff; }
.status-blocked { background-color: #fd7e14; color: #fff; }
.status-done { background-color: #20c997; color: #fff; }

.card-list-item {
  border-left: 4px solid transparent;
  transition: all 0.2s;
}

.card-list-item:hover,
.card-list-item:active {
  border-left-color: var(--bs-primary);
  background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.todo-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
}

.todo-card .todo-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 180px;
}

.todo-card .todo-actions {
  min-width: 180px;
}

.todo-card .todo-meta span {
  display: inline-flex;
  align-items: center;
}

@media (max-width: 992px) {
  .todo-card .todo-status,
  .todo-card .todo-actions {
    min-width: 100%;
  }
}

.sticky-action-bar {
  position: sticky;
  bottom: 0;
  background: white;
  border-top: 1px solid #dee2e6;
  padding: 1rem;
  margin: 0 -1rem -1rem;
  z-index: 1020;
}



.section-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  margin: 1.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title i {
  color: #6c757d;
}

.card-header .card-title {
  font-weight: 600;
}

.table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6c757d;
}

.card-header-soft {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.card-header-soft .card-title {
  color: #212529;
}

.recent-list .list-group-item {
  padding: 1rem 1.25rem;
  border-left: 0;
  border-right: 0;
}

.recent-list .list-group-item:first-child {
  border-top: 0;
}

.recent-list .list-group-item:last-child {
  border-bottom: 0;
}

.empty-state-compact {
  text-align: center;
  color: #6c757d;
  padding: 1.5rem 1rem;
}

.empty-state-compact i {
  font-size: 1.75rem;
  opacity: 0.7;
}

.stat-label-small {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.progress-sm {
  height: 10px;
}

.col-200 {
  width: 200px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  background: var(--header-bg);
  border: 1px solid var(--header-border);
  border-radius: 0.65rem;
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.login-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  width: 100%;
  max-width: 600px;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
}

.login-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.login-subtitle {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.auth-layout {
  background: radial-gradient(circle at top, #eef2ff 0%, #f8fafc 35%, #f1f5f9 100%);
  position: relative;
  overflow: hidden;
}

.auth-content {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 2;

  form{
    width:min(600px, 100%);

    input{
      min-width: 300px;
    }

    button{
      min-width: 300px;
      margin: 1rem auto;
    }
  }
}

.auth-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.auth-background__title {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  color: rgba(30, 64, 175, 0.08);
  white-space: nowrap;
}

.auth-background__glow {
  position: absolute;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0));
  top: -120px;
  right: -120px;
  border-radius: 50%;
}

.login-help {
  margin-top: 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: #f8fafc;
}

.login-help__summary {
  font-weight: 600;
  color: #2563eb;
  cursor: pointer;
  list-style: none;
}

.login-help__summary::-webkit-details-marker {
  display: none;
}

.login-help__summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.2s ease;
}

.login-help[open] .login-help__summary::before {
  transform: rotate(90deg);
}

.login-help__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.login-help__links a {
  color: #1f2937;
  text-decoration: none;
  font-weight: 600;
}

.login-help__links a:hover {
  color: #2563eb;
  text-decoration: underline;
}

.page-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  padding-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-subtitle {
  color: #64748b;
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
}

.page-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.page-actions .btn {
  white-space: nowrap;
  font-weight: 600;
  border-radius: 0.6rem;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
}

.page-actions form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: nowrap;
}

.page-actions .form-control {
  min-width: 160px;
  width: 200px;
}

@media (max-width: 992px) {
  .page-header {
    flex-wrap: wrap;
  }
  .page-actions {
    flex-wrap: wrap;
  }
  .page-actions form {
    flex-wrap: wrap;
  }
  .page-actions .form-control {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -250px;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s;
  }

  .sidebar.show {
    left: 0;
  }

  .mobile-toggle {
    display: block !important;
  }
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Focus states */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, 
.form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #0d6efd;
}

/* Dashboard Cards */
.dashboard-card {
  border-radius: 0.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-hover {
  transition: all 0.2s;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

