/* PleasurePlate - Compiled CSS */
/* Compile from SCSS: sass frontend/scss/main.scss frontend/static/css/main.css --watch */

/* Variables as CSS Custom Properties */
:root {
  --primary: #059669;
  --primary-light: #10b981;
  --primary-dark: #047857;
  --secondary: #8b5cf6;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  --bg-body: #f8fafc;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gray-700);
  background: var(--bg-body);
}


h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem 0;
  font-weight: 600;
  line-height: 1.25;
  color: var(--gray-900);
}

p { margin: 0 0 1rem 0; }

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--primary { background: var(--primary); color: white; }
.btn--primary:hover:not(:disabled) { background: var(--primary-dark); }

.btn--secondary { background: var(--gray-100); color: var(--gray-700); }
.btn--secondary:hover:not(:disabled) { background: var(--gray-200); }

.btn--outline { background: transparent; border: 1px solid var(--gray-300); color: var(--gray-700); }
.btn--outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }

.btn--lg { padding: 1rem 1.5rem; font-size: 1rem; }
.btn--sm { padding: 0.5rem 0.75rem; font-size: 0.75rem; }
.btn--full { width: 100%; }

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.card__header { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--gray-100); }
.card__title { font-size: 1.125rem; font-weight: 600; color: var(--gray-900); margin: 0; }
.card__subtitle { font-size: 0.875rem; color: var(--gray-500); margin: 0.25rem 0 0 0; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--gray-700); margin-bottom: 0.5rem; }

.input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  transition: border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
  background: white;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1); }
.input::placeholder { color: var(--gray-400); }

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* Alerts */
.alert { padding: 1rem; border-radius: var(--radius); font-size: 0.875rem; margin-bottom: 1rem; }
.alert--success { background: rgba(34, 197, 94, 0.1); color: #166534; border: 1px solid rgba(34, 197, 94, 0.2); }
.alert--error { background: rgba(239, 68, 68, 0.1); color: #dc2626; border: 1px solid rgba(239, 68, 68, 0.2); }
.alert--warning { background: rgba(245, 158, 11, 0.1); color: #b45309; border: 1px solid rgba(245, 158, 11, 0.2); }
.alert--info { background: rgba(59, 130, 246, 0.1); color: #1d4ed8; border: 1px solid rgba(59, 130, 246, 0.2); }

/* Avatar */
.avatar {
  width: 40px; height: 40px;
  border-radius: 9999px;
  background: var(--primary-light);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.875rem;
}
.avatar--lg { width: 64px; height: 64px; font-size: 1.25rem; }
.avatar--sm { width: 32px; height: 32px; font-size: 0.75rem; }

/* Stat Card */
.stat-card { background: white; border-radius: var(--radius-lg); padding: 1.25rem; border: 1px solid rgba(17, 24, 39, 0.08); box-shadow: 0 6px 16px rgba(17, 24, 39, 0.06); }
.stat-card__label { font-size: 0.875rem; color: var(--gray-600); margin-bottom: 0.25rem; }
.stat-card__value { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); }
.app-layout--dashboard .stat-card { border-color: rgba(17, 24, 39, 0.12); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 8px 22px rgba(17, 24, 39, 0.08); }
.app-layout--dashboard .stat-card__label { color: var(--gray-600); }

/* Table */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--gray-100); }
.table th { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-500); background: var(--gray-50); }
.table td { font-size: 0.875rem; color: var(--gray-700); }
.table tbody tr:hover { background: var(--gray-50); }

/* Spinner */
.spinner { width: 20px; height: 20px; border: 2px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Layout */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 1024px) { .container { padding: 0 1.5rem; } }

.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* App Layout */
.app-layout { display: flex; min-height: 100vh; --sidebar-width: 280px; --sidebar-collapsed: 72px; }

html.page-loading .sidebar,
html.page-loading .main-content { transition: none !important; }

@media (min-width: 1024px) {
  html[data-sidebar-collapsed="true"] .app-layout .sidebar { width: var(--sidebar-collapsed); }
  html[data-sidebar-collapsed="true"] .app-layout .sidebar__text,
  html[data-sidebar-collapsed="true"] .app-layout .sidebar__section,
  html[data-sidebar-collapsed="true"] .app-layout .sidebar__logo-text,
  html[data-sidebar-collapsed="true"] .app-layout .sidebar__brand-name,
  html[data-sidebar-collapsed="true"] .app-layout .sidebar__user-details { display: none; }
  html[data-sidebar-collapsed="true"] .app-layout .sidebar__logo,
  html[data-sidebar-collapsed="true"] .app-layout .sidebar__brand { justify-content: center; }
  html[data-sidebar-collapsed="true"] .app-layout .sidebar__user-info { justify-content: center; }
  html[data-sidebar-collapsed="true"] .app-layout .sidebar__user-actions { flex-direction: column; align-items: center; }
  html[data-sidebar-collapsed="true"] .app-layout .sidebar__user-action { justify-content: center; }
  html[data-sidebar-collapsed="true"] .app-layout .sidebar__user-avatar { width: 32px; height: 32px; font-size: 0.85rem; }
  html[data-sidebar-collapsed="true"] .app-layout .sidebar__brand-logo { width: 32px; height: 32px; }
  html[data-sidebar-collapsed="true"] .app-layout .main-content { margin-left: var(--sidebar-collapsed); }
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--gray-900) 0%, #0f172a 100%);
  color: var(--gray-100);
  padding: 1rem 0.75rem 1.25rem;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: none;
}

.sidebar__header {
  position: relative;
  display: flex;
  align-items: center;
  column-gap: 0.5rem;
  padding: 0.5rem 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  padding: 0.5rem;
  border-radius: var(--radius);
  flex: 1;
  width: 100%;
  min-width: 0;
}

.sidebar__logo:hover {
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.sidebar__logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar__logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.sidebar__logo-icon svg {
  width: 18px;
  height: 18px;
  color: white;
}

.sidebar__logo-icon--image {
  width: 100%;
  height: 52px;
  border-radius: 0;
  background: transparent;
  border: none;
}

.sidebar__logo-icon--image img {
  padding: 0;
  object-fit: contain;
}

.sidebar__logo-text {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__toggle {
  position: static;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--gray-200);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  flex-shrink: 0;
}

.sidebar__toggle svg {
  width: 14px;
  height: 14px;
}

.sidebar__toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.sidebar__nav {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.75rem;
  color: var(--gray-400);
  text-decoration: none;
  border-radius: var(--radius);
  line-height: 1;
  border: 1px solid transparent;
}

.sidebar__link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.sidebar__link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.sidebar__link--active {
  color: white;
  background: rgba(5, 150, 105, 0.2);
  border-color: rgba(5, 150, 105, 0.4);
}

.sidebar__link--active:hover {
  background: rgba(5, 150, 105, 0.28);
}

.sidebar__section {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-500);
}

/* Sidebar Brand (Logo + Name) */
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  padding: 0.35rem;
  border-radius: var(--radius);
  flex: 1;
  min-width: 0;
}

.sidebar__brand:hover {
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.sidebar__brand-logo {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar__brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar__brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

/* Sidebar User Profile */
.sidebar__user {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.sidebar__user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.5rem 0.75rem;
}

.sidebar__user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.sidebar__user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.sidebar__user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__user-role {
  font-size: 0.72rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar__user-actions {
  display: flex;
  gap: 0.35rem;
  padding: 0 0.25rem;
  overflow: hidden;
}

.sidebar__user-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 0.5rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-400);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 150ms ease;
  text-decoration: none;
}

.sidebar__user-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.sidebar__user-action svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  flex-shrink: 0;
}

/* Collapsed state for user section */
.sidebar--collapsed .sidebar__user-info {
  justify-content: center;
  padding: 0.5rem 0;
}

.sidebar--collapsed .sidebar__user-details {
  display: none;
}

.sidebar--collapsed .sidebar__user-actions {
  flex-direction: column;
  padding: 0;
  align-items: center;
}

.sidebar--collapsed .sidebar__user-action {
  padding: 0.6rem;
  width: 100%;
  justify-content: center;
}

.sidebar--collapsed .sidebar__brand {
  justify-content: center;
  padding: 0.35rem 0;
}

.sidebar--collapsed .sidebar__brand-logo {
  width: 32px;
  height: 32px;
}

.sidebar--collapsed .sidebar__user {
  padding: 0.75rem 0.25rem 0;
}

.sidebar--collapsed .sidebar__user-info {
  padding: 0.5rem 0;
}

.sidebar--collapsed .sidebar__user-avatar {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}

.sidebar__footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar--collapsed {
  width: var(--sidebar-collapsed);
  padding: 1rem 0.5rem 1.25rem;
  overflow-x: visible;
}

.sidebar--collapsed .sidebar__text,
.sidebar--collapsed .sidebar__logo-text,
.sidebar--collapsed .sidebar__section,
.sidebar--collapsed .sidebar__brand-name,
.sidebar--collapsed .sidebar__user-details {
  display: none;
}

.sidebar--collapsed .sidebar__header {
  justify-content: center;
}

.sidebar--collapsed .sidebar__logo {
  justify-content: center;
  padding: 0.5rem 0;
}

.sidebar--collapsed .sidebar__link {
  justify-content: center;
  padding: 0.75rem 0;
  gap: 0;
}

.sidebar--collapsed .sidebar__toggle {
  position: absolute;
  right: -22px;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.92), 0 10px 25px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.sidebar--collapsed .sidebar__logo-icon--image {
  width: 36px;
  height: 36px;
  border-radius: 0;
}

.sidebar--collapsed .sidebar__logo-icon--image img {
  padding: 0;
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 200ms ease;
    width: var(--sidebar-width) !important;
  }
  .sidebar--open { transform: translateX(0); }
  .sidebar--collapsed {
    width: var(--sidebar-width);
    padding: 1rem 0.75rem 1.25rem;
  }
  .sidebar--collapsed .sidebar__text,
  .sidebar--collapsed .sidebar__logo-text,
  .sidebar--collapsed .sidebar__section,
  .sidebar--collapsed .sidebar__brand-name,
  .sidebar--collapsed .sidebar__user-details { display: block; }
  .sidebar--collapsed .sidebar__link { justify-content: flex-start; padding: 0.75rem 0.75rem; gap: 0.75rem; }
  .sidebar--collapsed .sidebar__logo,
  .sidebar--collapsed .sidebar__brand { justify-content: flex-start; padding: 0.5rem; }
  .sidebar--collapsed .sidebar__user-info { justify-content: flex-start; }
  .sidebar--collapsed .sidebar__user-actions { flex-direction: row; }
}

/* Backdrop for mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop--visible {
  display: block;
  opacity: 1;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  background: var(--bg-body);
  min-height: 100vh;
  transition: none;
}

.sidebar--collapsed ~ .main-content,
.app-layout.collapsed .main-content {
  margin-left: var(--sidebar-collapsed);
}

@media (max-width: 1024px) {
  .main-content { margin-left: 0 !important; }
}

/* Header */
.header { background: white; padding: 1rem 1.5rem; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: flex-start; gap: 1rem; position: sticky; top: 0; z-index: 100; }
.header__title { font-size: 1.25rem; font-weight: 600; color: var(--gray-900); margin: 0; }
.header__actions { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.header__menu-btn { display: none; background: none; border: none; padding: 0.5rem; cursor: pointer; }
@media (max-width: 1024px) { .header__menu-btn { display: block; } }
@media (min-width: 1025px) { .header--mobile-only { display: none; } }

/* Page */
.page { padding: 1.5rem; }
.page__header { margin-bottom: 1.5rem; }
.page__header h1 { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); margin: 0 0 0.5rem 0; }
.page__header p { color: var(--gray-500); margin: 0; }

/* Module hero (dashboard-like header standard) */
.module-hero {
  --module-accent: #0f766e;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem;
  padding: 2.2rem;
  border-radius: 24px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(15, 118, 110, 0.22);
  margin-bottom: 2rem;
}

.module-hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 240px;
  height: 240px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.module-hero__top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.module-hero__menu-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.module-hero__menu-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 1024px) {
  .module-hero__menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

.module-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
}

.module-hero__badge svg { width: 14px; height: 14px; }

.module-hero__title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0.85rem 0 0.35rem;
  color: #fff;
}

.module-hero__subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
}

.module-hero__meta {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.module-pill {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.module-hero__actions {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.module-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
}

.module-action:disabled { opacity: 0.55; cursor: not-allowed; }
.module-action svg { width: 16px; height: 16px; }

.module-action--primary {
  background: #ffffff;
  color: var(--module-accent);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.25);
}

.module-action--primary:hover:not(:disabled) { background: #ecfdf5; }

.module-action--ghost {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

.module-action--ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.3); }

.module-hero__aside { display: grid; gap: 0.9rem; }

.module-kpi {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  backdrop-filter: blur(10px);
}

.module-kpi__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.35rem;
  opacity: 0.85;
}

.module-kpi__value {
  font-size: 1.6rem;
  font-weight: 900;
  margin: 0;
  color: #fff;
}

.module-kpi__hint {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.module-hero--patients {
  --module-accent: #0f766e;
  background: linear-gradient(135deg, #0f766e 0%, var(--primary) 45%, #0ea5e9 100%);
}

.module-hero--appointments {
  --module-accent: #0f766e;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 45%, #0ea5e9 100%);
}

@media (max-width: 900px) {
  .module-hero {
    grid-template-columns: 1fr;
    padding: 1.6rem;
    gap: 1.25rem;
  }
  .module-hero__title { font-size: 1.75rem; }
}

/* Auth Layout */
.auth-layout { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); padding: 1rem; }
.auth-card { background: white; border-radius: 1rem; box-shadow: var(--shadow-lg); padding: 2rem; width: 100%; max-width: 400px; }
.auth-card__logo { text-align: center; margin-bottom: 1.5rem; }
.auth-card__logo-image { width: 72px; height: 72px; object-fit: contain; margin: 0 auto 0.75rem; display: block; }
.auth-card__logo h1 { font-size: 1.5rem; color: var(--primary); margin: 0; }
.auth-card__logo p { color: var(--gray-500); font-size: 0.875rem; margin: 0.5rem 0 0 0; }
.auth-card__footer { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: var(--gray-500); }
.auth-card__footer a { color: var(--primary); }

/* Flex Utilities */
.flex { display: flex; }
.flex--center { align-items: center; justify-content: center; }
.flex--between { justify-content: space-between; }
.flex--gap-2 { gap: 0.5rem; }
.flex--gap-4 { gap: 1rem; }

/* Text Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-500); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }

/* Spacing Utilities */
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* Hidden */
.hidden { display: none !important; }
.visible { display: block !important; }

/* Alpine.js cloak */
[x-cloak] { display: none !important; }
