* { box-sizing: border-box; }

body { box-sizing: border-box; }

.watercolor-bg {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(220, 38, 38, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(34, 197, 94, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 80%, rgba(34, 197, 94, 0.25) 0%, transparent 45%),
    radial-gradient(ellipse at 90% 90%, rgba(220, 38, 38, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 10% 70%, rgba(220, 38, 38, 0.2) 0%, transparent 40%),
    radial-gradient(ellipse at 60% 10%, rgba(34, 197, 94, 0.2) 0%, transparent 40%),
    linear-gradient(135deg, #fef7f7 0%, #f0fdf4 50%, #fef2f2 100%);
  animation: watercolorMove 15s ease-in-out infinite;
}

@keyframes watercolorMove {
  0%, 100% { filter: hue-rotate(0deg) saturate(1); }
  50% { filter: hue-rotate(10deg) saturate(1.1); }
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset,
    0 -2px 10px rgba(34, 197, 94, 0.1) inset,
    0 2px 10px rgba(220, 38, 38, 0.1) inset;
}

.watercolor-btn {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 25%, #15803d 75%, #16a34a 100%);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
  transition: all 0.3s ease;
}

.watercolor-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3), 0 10px 30px rgba(220, 38, 38, 0.3);
}

.create-account-btn {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 35%, #15803d 100%);
  color: #ffffff;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.25), 0 10px 20px rgba(22, 163, 74, 0.2);
}

.create-account-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.3), 0 12px 24px rgba(22, 163, 74, 0.25);
}

.availability-text {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.availability-text.is-ok {
  color: #16a34a;
  font-weight: 600;
}

.availability-text.is-bad {
  color: #dc2626;
  font-weight: 600;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.role-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.role-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.5s ease;
}

.role-card:hover::before {
  transform: scale(1);
}

.role-card:hover {
  transform: translateY(-5px) scale(1.02);
}

.public-card {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
  border: 2px solid rgba(34, 197, 94, 0.3);
}

.public-card:hover {
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 15px 40px rgba(34, 197, 94, 0.2);
}

.admin-card {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(220, 38, 38, 0.05) 100%);
  border: 2px solid rgba(220, 38, 38, 0.3);
}

.admin-card:hover {
  border-color: rgba(220, 38, 38, 0.6);
  box-shadow: 0 15px 40px rgba(220, 38, 38, 0.2);
}

.manager-card {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%);
  border: 2px solid rgba(168, 85, 247, 0.3);
}

.manager-card:hover {
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 15px 40px rgba(168, 85, 247, 0.2);
}

.editor-card {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
  border: 2px solid rgba(245, 158, 11, 0.3);
}

.editor-card:hover {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 15px 40px rgba(245, 158, 11, 0.2);
}

.input-field {
  transition: all 0.3s ease;
  border: 2px solid rgba(209, 213, 219, 0.5);
}

.input-field:focus {
  border-color: transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, #dc2626, #16a34a) border-box;
  border: 2px solid transparent;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.2), 0 0 20px rgba(220, 38, 38, 0.2);
}

.popup-overlay {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}

.success-popup {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(34, 197, 94, 0.4) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(220, 38, 38, 0.4) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, rgba(34, 197, 94, 0.2) 0%, transparent 70%),
    linear-gradient(135deg, #ffffff 0%, #f0fdf4 50%, #fef2f2 100%);
  animation: popupPulse 2s ease-in-out infinite;
}

.error-popup {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(220, 38, 38, 0.5) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(34, 197, 94, 0.3) 0%, transparent 50%),
    linear-gradient(135deg, #fef2f2 0%, #ffffff 50%, #f0fdf4 100%);
  animation: errorShake 0.5s ease-in-out;
}

@keyframes popupPulse {
  0%, 100% { box-shadow: 0 25px 60px rgba(34, 197, 94, 0.3), 0 25px 60px rgba(220, 38, 38, 0.3); }
  50% { box-shadow: 0 30px 70px rgba(34, 197, 94, 0.4), 0 30px 70px rgba(220, 38, 38, 0.4); }
}

@keyframes errorShake {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
  20% { transform: translate(-50%, -50%) rotate(-2deg); }
  40% { transform: translate(-50%, -50%) rotate(2deg); }
  60% { transform: translate(-50%, -50%) rotate(-2deg); }
  80% { transform: translate(-50%, -50%) rotate(2deg); }
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  animation: confettiFall 3s ease-in-out infinite;
}

@keyframes confettiFall {
  0% { transform: translateY(-100%) rotate(0deg); opacity: 1; }
  100% { transform: translateY(400px) rotate(720deg); opacity: 0; }
}

.floating-shapes {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

.slide-in {
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: 80px 1fr;
  grid-template-areas:
    "header header"
    "sidebar main";
  min-height: 100vh;
  height: 100vh;
  gap: 16px;
  padding: 20px;
}

.dashboard-header {
  grid-area: header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #dc2626, #16a34a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 12px;
  color: #6b7280;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #16a34a, #dc2626);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.profile-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #16a34a, #dc2626);
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-title {
  font-weight: 700;
  color: #1f2937;
}

.profile-note {
  font-size: 12px;
  color: #6b7280;
}

.user-name {
  font-weight: 600;
  color: #111827;
}

.user-role {
  font-size: 12px;
  color: #6b7280;
}

.dashboard-sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
  overflow: hidden;
  max-height: calc(100vh - 120px);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-title {
  font-weight: 700;
  color: #1f2937;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
  padding-right: 6px;
}

.sidebar-item {
  text-align: left;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #1f2937;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  opacity: 0.85;
}

.sidebar-item:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.8);
}

.sidebar-item.active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(220, 38, 38, 0.2));
  border-color: rgba(34, 197, 94, 0.4);
}

.sidebar-item.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.sidebar-logout {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(220, 38, 38, 0.1));
  border-color: rgba(220, 38, 38, 0.3);
}

.dashboard-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px;
  overflow: auto;
}

.module-title {
  font-size: 26px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  color: #111827;
}

.module-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-dashboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at top left, rgba(34, 197, 94, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(220, 38, 38, 0.18) 0%, transparent 60%),
    rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.home-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #15803d;
}

.home-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.home-subtitle {
  font-size: 13px;
  color: #6b7280;
}

.home-mini {
  font-size: 12px;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.8);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-action {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.3);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.15), rgba(220, 38, 38, 0.15));
  font-weight: 600;
  color: #1f2937;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.home-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 12px;
}

.home-highlight-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.home-kpi {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
}

.home-kpi-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #15803d;
}

.home-kpi-note {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}

.home-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 12px;
  color: #1f2937;
}

.home-recent {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.home-list ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-list li {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 13px;
  color: #1f2937;
}

.home-table {
  overflow-x: auto;
}

@media (max-width: 640px) {
  .home-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-title {
    font-size: 20px;
  }

  .home-stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .home-recent {
    grid-template-columns: 1fr;
  }

  .home-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .home-action {
    width: 100%;
    text-align: center;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-value {
    font-size: 20px;
  }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #16a34a, #dc2626);
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.stat-label {
  font-size: 13px;
  color: #6b7280;
}

.stat-growth {
  font-size: 12px;
  color: #16a34a;
  font-weight: 600;
}

.sparkline {
  height: 30px;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.2), rgba(220, 38, 38, 0.2));
  border-radius: 999px;
}

.section-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.section-title {
  font-weight: 700;
  margin-bottom: 12px;
  color: #111827;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-btn {
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.2), rgba(220, 38, 38, 0.2));
  border: 1px solid rgba(22, 163, 74, 0.3);
  font-weight: 600;
  color: #1f2937;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  text-align: left;
}

.data-table th {
  color: #4b5563;
  font-weight: 600;
}

.um-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.um-tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  color: #1f2937;
}

.um-tab.active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(220, 38, 38, 0.2));
  border-color: rgba(34, 197, 94, 0.4);
}

.um-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.um-actions button {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 600;
}

.um-actions button.is-danger {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.4);
}

.um-badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.um-approved { background: rgba(34, 197, 94, 0.15); color: #166534; }
.um-pending { background: rgba(245, 158, 11, 0.15); color: #92400e; }
.um-rejected { background: rgba(220, 38, 38, 0.15); color: #b91c1c; }
.um-active { background: rgba(34, 197, 94, 0.12); color: #166534; }
.um-inactive { background: rgba(148, 163, 184, 0.2); color: #475569; }

.um-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  z-index: 9999;
}

.um-modal.hidden {
  display: none;
}

.um-modal-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px;
  min-width: 320px;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.2);
}

.um-modal-title {
  font-weight: 700;
  margin-bottom: 12px;
  color: #111827;
}

.um-log-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.um-log-item {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #1f2937;
  font-size: 13px;
}

.um-log-meta {
  color: #6b7280;
  font-size: 12px;
  margin-top: 4px;
}

.um-log-note {
  color: #475569;
  font-size: 12px;
  margin-top: 6px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #1f2937;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.text-muted {
  font-size: 12px;
  color: #6b7280;
  margin-right: 6px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.page-info {
  font-size: 13px;
  color: #4b5563;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-active {
  background: rgba(22, 163, 74, 0.15);
  color: #15803d;
}

.badge-published {
  background: rgba(22, 163, 74, 0.15);
  color: #15803d;
}

.badge-draft {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.badge-scheduled {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.badge-expired {
  background: rgba(220, 38, 38, 0.15);
  color: #b91c1c;
}

.action-ghost {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.action-btn.is-disabled,
.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.col-hidden {
  display: none;
}

.job-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 90vw);
  height: 100vh;
  background: rgba(255, 255, 255, 0.9);
  border-left: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: -20px 0 40px rgba(15, 23, 42, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 16px;
}

.job-drawer.open {
  transform: translateX(0);
}

.job-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-weight: 700;
  font-size: 18px;
  color: #111827;
}

.drawer-subtitle {
  font-size: 13px;
  color: #6b7280;
}

.job-drawer-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: #1f2937;
}

.job-drawer-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.drawer-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding-bottom: 6px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.text-input,
.select-input,
.textarea-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(209, 213, 219, 0.6);
  background: rgba(255, 255, 255, 0.8);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.popup-root {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

.popup-open {
  overflow: hidden;
}

.popup-open .watercolor-bg {
  overflow: hidden;
}

.app-popup-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  animation: fadeIn 0.2s ease-out;
  z-index: 10000;
}

.app-popup {
  width: min(420px, 90vw);
  max-height: 90vh;
  overflow: auto;
}

@media (max-width: 640px) {
  .app-popup {
    width: min(360px, 94vw);
  }
}

#popupContainer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
}

#popupContainer.active {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
}

.modal-glass {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.35);
}

.form-modal {
  width: min(1400px, 96vw);
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.form-modal .modal-body {
  display: flex;
  gap: 24px;
  padding: 0;
  flex: 1;
  min-height: 0;
}

.form-modal .form-sidebar {
  width: 280px;
  max-height: 100%;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.form-modal .form-content {
  flex: 1;
  min-width: 0;
  max-height: 100%;
  overflow-y: auto;
}

.form-modal .modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form-modal .modal-footer > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.modal-header,
.modal-footer {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-footer {
  border-bottom: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn {
  border: none;
  cursor: pointer;
  border-radius: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-gradient {
  background: linear-gradient(135deg, #16a34a, #dc2626);
  color: #ffffff;
}

.action-menu-btn {
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.15);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-menu-btn:hover {
  background: rgba(15, 23, 42, 0.12);
}

.row-action-menu {
  position: absolute;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
}

.row-action-menu button {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.row-action-menu button:hover {
  background: rgba(255, 255, 255, 0.15);
}

.row-action-menu button.is-danger {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.4);
  color: #fecaca;
}

.row-action-menu button.is-danger:hover {
  background: rgba(220, 38, 38, 0.32);
}

.progress-glass {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.progress-glass-bar {
  height: 100%;
  background: linear-gradient(135deg, #16a34a, #dc2626);
}

.form-nav-item.active a {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
}

.input-glass {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

@media (max-width: 900px) {
  .form-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .form-modal .modal-header,
  .form-modal .modal-footer {
    padding: 12px 16px;
  }

  .form-modal .modal-body {
    flex-direction: column;
    gap: 20px;
  }

  .form-modal .form-sidebar {
    width: 100%;
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .form-modal .form-content {
    padding: 22px;
  }

  .form-modal .form-grid {
    grid-template-columns: 1fr !important;
  }

  .form-modal .input-glass {
    padding: 14px 16px;
    font-size: 15px;
    min-height: 46px;
  }

  .form-modal textarea.input-glass {
    min-height: 140px;
  }

  .form-modal .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .form-modal .modal-footer > div {
    width: 100%;
    flex-direction: column;
  }

  .form-modal .modal-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .form-modal .form-preview {
    display: none;
  }
}

.app-popup {
  width: min(420px, 90vw);
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.2);
  animation: slideIn 0.3s ease-out;
  position: relative;
  overflow: hidden;
}

.popup-success {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(34, 197, 94, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(220, 38, 38, 0.35) 0%, transparent 60%),
    linear-gradient(135deg, #ffffff 0%, #f0fdf4 50%, #fef2f2 100%);
}

.popup-error {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(220, 38, 38, 0.4) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(34, 197, 94, 0.25) 0%, transparent 55%),
    linear-gradient(135deg, #fef2f2 0%, #ffffff 50%, #f0fdf4 100%);
}

.popup-warning {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(245, 158, 11, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(220, 38, 38, 0.2) 0%, transparent 55%),
    linear-gradient(135deg, #fff7ed 0%, #ffffff 55%, #fef2f2 100%);
}

.popup-info,
.popup-confirm {
  background:
    radial-gradient(ellipse at 25% 25%, rgba(34, 197, 94, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 75% 75%, rgba(220, 38, 38, 0.2) 0%, transparent 60%),
    linear-gradient(135deg, #ffffff 0%, #f0fdf4 50%, #fef2f2 100%);
}

.popup-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: #ffffff;
}

.popup-icon-success {
  background: linear-gradient(135deg, #16a34a, #dc2626);
}

.popup-icon-error {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.popup-icon-warning {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.popup-icon-info,
.popup-icon-confirm {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

.popup-content {
  text-align: center;
}

.popup-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #dc2626, #16a34a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.popup-title-error {
  background: none;
  color: #dc2626;
  -webkit-text-fill-color: initial;
}

.popup-message {
  color: #4b5563;
  margin-bottom: 16px;
}

.popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.popup-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.popup-btn.primary {
  background: linear-gradient(135deg, #16a34a, #dc2626);
  color: #ffffff;
  border: none;
}

.dashboard-collapsed .dashboard-shell {
  grid-template-columns: 90px 1fr;
}

.dashboard-collapsed .sidebar-title,
.dashboard-collapsed .sidebar-item {
  text-align: center;
}

.dashboard-collapsed .sidebar-item {
  padding: 10px 8px;
  font-size: 12px;
  justify-content: center;
}

.dashboard-collapsed .sidebar-item span {
  display: none;
}

.dashboard-collapsed .sidebar-item i {
  font-size: 18px;
  width: 22px;
}

@media (max-width: 1024px) {
  .dashboard-shell {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 70px auto;
    grid-template-areas:
      "header"
      "main";
    height: auto;
    min-height: 100vh;
  }

  .dashboard-sidebar {
    position: fixed;
    top: 90px;
    left: 16px;
    width: 240px;
    max-height: calc(100vh - 110px);
    transform: translateX(-110%);
    transition: transform 0.3s ease;
    z-index: 30;
    overflow: hidden;
  }

  .sidebar-open .dashboard-sidebar {
    transform: translateX(0);
  }

  .dashboard-main {
    padding: 8px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .table-toolbar {
    align-items: flex-start;
  }

  .data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .data-table th,
  .data-table td {
    white-space: nowrap;
  }
}
