/* 
 * WorkTion Lite - CSS Premium (Light Theme)
 * Mobile-First, Glass-morphism, Clean SaaS Aesthetic
 */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
  /* TEMA CLARO PREMIUM (Boutique SaaS) */
  --bg-base: #f8fafc;
  /* Slate 50 - Off-white, soft background */
  --bg-panel: rgba(255, 255, 255, 0.6);
  /* White with high transparency for glass effect */
  --bg-card: rgba(255, 255, 255, 0.85);
  /* White semi-transparent */
  --bg-input: rgba(241, 245, 249, 0.8);
  /* Slate 100 */
  --bg-hover: rgba(226, 232, 240, 0.6);
  /* Slate 200 */

  --text-primary: #0f172a;
  /* Slate 900 - very dark gray */
  --text-secondary: #334155;
  /* Slate 700 */
  --text-muted: #64748b;
  /* Slate 500 */

  --border-color: rgba(15, 23, 42, 0.08);
  /* Subtle dark border */
  --border-focus: rgba(99, 102, 241, 0.5);
  /* Indigo focus ring */

  /* Acentos Premium (Indigo/Violet) */
  --primary: #6366f1;
  /* Indigo 500 */
  --primary-hover: #4f46e5;
  /* Indigo 600 */
  --secondary: #a855f7;
  /* Purple 500 */
  --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));

  /* Estados / Roles */
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --danger-text: #b91c1c;
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --success-text: #047857;
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --warning-text: #b45309;
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.1);
  --info-text: #1d4ed8;
  --amber: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.1);
  --amber-text: #b45309;
  --indigo: #6366f1;
  --indigo-bg: rgba(99, 102, 241, 0.1);
  --indigo-text: #4338ca;

  /* Sombras Elevadas y Glassmorphism */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
  --glow-primary: 0 0 20px rgba(99, 102, 241, 0.3);

  --radius-sm: 8px;
  /* Slightly rounder for modern feel */
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body,
html {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  overflow: hidden;
  /* App takes full height, scroll inside containers */
}

h1,
h2,
h3,
h4 {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-secondary);
}

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

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

ul {
  list-style: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* ===== BACKGROUND ORBS (Premium SaaS Dark) ===== */
.bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 50%,
      rgba(99, 102, 241, 0.08),
      transparent 25%),
    radial-gradient(circle at 85% 30%,
      rgba(168, 85, 247, 0.08),
      transparent 25%);
}

/* ===== GRID LAYOUT (Mobile First) ===== */
#app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

/* ===== HEADER MOBILE ===== */
.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 1rem;
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  z-index: 40;
}

.mobile-header .logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.menu-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== SIDEBAR (Drawer in Mobile, Fixed in Desktop) ===== */
#sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
  box-shadow: var(--shadow-glass);
}

#sidebar.open {
  left: 0;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.3);
  /* Lighter backdrop for slate aesthetic */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.sidebar-header {
  height: 60px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header .logo {
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.close-sidebar-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  border-left-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.nav-item i {
  font-size: 1.25rem;
  color: var(--text-muted);
}

.nav-item.active i {
  color: var(--primary);
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  overflow: hidden;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  transition: var(--transition);
}

.logout-btn:hover {
  color: var(--danger-text);
  transform: scale(1.1);
}

/* ===== MAIN CONTENT ===== */
#main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
  padding-bottom: 80px;
  /* Space for bottom nav */
  scroll-behavior: smooth;
}

.page-header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ===== BOTTOM NAVIGATION (Mobile Only) ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 40;
  padding-bottom: env(safe-area-inset-bottom);
}

.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  padding: 0.5rem;
  flex: 1;
  transition: var(--transition);
}

.bnav-item i {
  font-size: 1.25rem;
  transition: transform 0.2s;
}

.bnav-item.active {
  color: var(--primary);
}

.bnav-item.active i {
  transform: translateY(-2px);
}

/* ===== DESKTOP LAYOUT (> 768px) ===== */
@media (min-width: 768px) {
  #app-container {
    flex-direction: row;
  }

  .mobile-header {
    display: none;
  }

  .bottom-nav {
    display: none;
  }

  #sidebar {
    position: static;
    left: 0;
    height: 100vh;
    flex-shrink: 0;
    box-shadow: none;
    border-right: 1px solid var(--border-color);
  }

  .sidebar-overlay {
    display: none;
  }

  .close-sidebar-btn {
    display: none;
  }

  #main-content {
    padding: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .page-header {
    margin-bottom: 2rem;
  }

  .page-title {
    font-size: 2rem;
  }
}

/* ===== LOGIN PAGE ===== */
#login-page {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 1rem;
  z-index: 100;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-glass);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Subtle top highlight for the card */
.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      rgba(99, 102, 241, 0.2),
      /* Using indigo instead of white for the light theme highlight */
      transparent);
}

.login-card .logo {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.25rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-card .subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* ===== FORMS & INPUTS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  width: 100%;
}

label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  min-height: 44px;
  /* Slightly tighter for premium feel */
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.9);
  /* Lighter on focus */
  box-shadow:
    0 0 0 2px var(--border-focus),
    inset 0 2px 4px rgba(0, 0, 0, 0.05);
  /* Softer inset shadow */
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  min-height: 44px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow:
    var(--glow-primary),
    0 2px 4px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: rgba(15, 23, 42, 0.1);
  /* Darker border on hover instead of lighter */
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.3);
}

.btn-icon {
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  min-height: 32px;
  border-radius: 6px;
}

/* ===== STAT CARDS (Dashboard) ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-title {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ===== LIST CARDS (Empleados / Áreas) ===== */
.card-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .card-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: var(--transition);
}

.item-card:hover {
  border-color: var(--primary);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.item-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.item-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.item-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.item-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  justify-content: flex-end;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-amber {
  background: var(--amber-bg);
  color: var(--amber-text);
}

.badge-blue {
  background: var(--info-bg);
  color: var(--info-text);
}

.badge-indigo {
  background: var(--indigo-bg);
  color: var(--indigo-text);
}

.badge-green {
  background: var(--success-bg);
  color: var(--success-text);
}

/* ===== TABS ===== */
.tabs-container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs-container::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===== TASK CARDS ===== */
.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.task-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.task-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

/* ===== ADMIN LOGIN ===== */
.admin-login-body {
  background: var(--bg-base);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Base decoration for admin too */
.admin-login-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 85% 15%,
      rgba(99, 102, 241, 0.15),
      transparent 25%),
    radial-gradient(circle at 15% 85%,
      rgba(168, 85, 247, 0.15),
      transparent 25%);
  z-index: 0;
  pointer-events: none;
}

.admin-login-container {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-glass);
  position: relative;
  z-index: 10;
}

/* Top highlight for admin login card */
.admin-login-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent);
}

.admin-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.admin-header h1 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.05em;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.admin-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.admin-login-form .form-group {
  margin-bottom: 1.5rem;
}

.admin-login-form .input-group-text {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-muted);
}

.admin-login-form input {
  background-color: var(--bg-input);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.admin-login-form input:focus {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: var(--primary);
}

/* ===== LAYOUT CARDS & CONTAINERS ===== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(15, 23, 42, 0.12);
  /* Slightly darker border on hover for contrast */
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Stats Cards */
.stat-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow:
    var(--shadow-md),
    0 0 0 1px rgba(15, 23, 42, 0.05) inset;
  border-color: rgba(15, 23, 42, 0.15);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.primary {
  background: var(--indigo-bg);
  color: var(--indigo-text);
}

.stat-icon.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.stat-icon.warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.stat-icon.danger {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* Grid Layouts */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ===== TABLES ===== */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-panel);
}

.table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.table th {
  background: rgba(39, 39, 42, 0.4);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background: var(--bg-hover);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-primary {
  background: var(--indigo-bg);
  color: var(--indigo-text);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ===== UTILITIES ===== */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

/* ===== PREMIUM CLOCK-IN BUTTON ===== */
.clock-in-hub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  margin-bottom: 2rem;
}

.time-display {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  margin-bottom: 2rem;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.circular-btn {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.2);
  color: white;
  z-index: 10;
}

.circular-btn i {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
}

.circular-btn::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  z-index: -1;
  opacity: 0.6;
  animation: pulse-ring 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

/* State: Pending (Not clocked in) */
.circular-btn.state-pending {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.circular-btn.state-pending::before {
  background: var(--primary);
  animation-duration: 3s;
}

.circular-btn.state-pending:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

/* State: Active (Clocked in) */
.circular-btn.state-active {
  background: linear-gradient(135deg, #10b981, #059669);
  /* Emerald gradient */
}

.circular-btn.state-active::before {
  background: #10b981;
  animation-duration: 2s;
}

.circular-btn.state-active:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }

  80%,
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

/* Status Text below button */
.fichaje-status-text {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

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

.text-success {
  color: var(--success-text);
}

.text-primary {
  color: var(--primary);
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.d-flex {
  display: flex;
}

.align-items-center {
  align-items: center;
}

.justify-content-between {
  justify-content: space-between;
}

.justify-content-center {
  justify-content: center;
}

.justify-content-end {
  justify-content: flex-end;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-1 {
  gap: 0.5rem;
}

.gap-2 {
  gap: 1rem;
}

.gap-3 {
  gap: 1.5rem;
}

/* Alert Messages */
.alert {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  backdrop-filter: blur(8px);
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Loading Overlay */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  /* Slate translucent background */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.5rem;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .login-card::before {
    display: none;
  }

  .card {
    padding: 1rem;
  }

  .stat-card {
    padding: 1rem;
  }
}

/* ===== TABLE (Desktop Activity) ===== */
.table-wrapper {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th,
td {
  padding: 1rem 1.5rem;
  text-align: left;
}

th {
  background: rgba(39, 39, 42, 0.4);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  letter-spacing: 0.05em;
}

td {
  font-size: 0.9rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: var(--transition);
}

tbody tr:hover {
  background: var(--bg-hover);
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex !important;
  /* Always display flex but control visibility via opacity/pointer-events */
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
}

.modal-content {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  width: 100%;
  max-width: 500px;
  margin: 1rem;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

/* Modal Title Icon Style */
.modal-title .material-symbols-rounded {
  margin-right: 0.5rem;
  font-size: 1.5rem;
  vertical-align: middle;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

.modal-close-btn:hover {
  background: var(--danger-bg);
  color: var(--danger-text);
  transform: rotate(90deg);
}

.modal-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  font-weight: 600;
  padding-right: 2rem;
}

/* ===== TOASTS ===== */
#toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  pointer-events: none;
}

@media (min-width: 768px) {
  #toast-container {
    bottom: 2rem;
    right: 2rem;
    left: auto;
    transform: none;
    align-items: flex-end;
  }
}

.toast {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-primary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: all;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast i {
  font-size: 1.1rem;
}

.toast.success i {
  color: var(--success-text);
}

.toast.error i {
  color: var(--danger-text);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== UTILS ===== */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.empty-state {
  padding: 4rem 1rem;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.empty-state i {
  font-size: 3rem;
  opacity: 0.5;
  color: var(--primary);
}

/* Camera Modal Fix */
#camera-modal .modal-content {
  max-width: 600px;
  padding: 1.5rem;
}

#camera-preview {
  width: 100%;
  border-radius: var(--radius-md);
  background: #000;
  max-height: 60vh;
  object-fit: cover;
}

/* Logout Button */
.logout-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
}

.logout-btn:hover {
  background: #ef4444;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.logout-btn span {
  font-size: 20px;
}

/* Settings View & License Summary */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.premium-card {
  border: 1px solid rgba(168, 85, 247, 0.2);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(168, 85, 247, 0.05));
  backdrop-filter: blur(10px);
}

.license-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.info-value {
  font-weight: 600;
  color: var(--text-main);
  font-size: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  width: fit-content;
}

.badge-plan {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
  text-transform: uppercase;
}

.badge-active {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-trial {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-expired {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.license-key-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  border: 1px dashed var(--border-color);
}

.key-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  gap: 1rem;
}

.key-display code {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.85rem;
  color: var(--primary);
  word-break: break-all;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  transition: all 0.2s;
}

.btn-icon:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.05);
  border-color: var(--danger);
}

/* ===== CRM CLIENT MANAGEMENT ===== */

/* Search & Filter Bar */
.crm-toolbar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.crm-search-wrapper {
  flex: 1;
  min-width: 220px;
  position: relative;
}

.crm-search-wrapper .material-symbols-rounded {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 20px;
  pointer-events: none;
}

.crm-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-primary);
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

.crm-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.crm-filter-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Revenue KPI Cards */
.revenue-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.revenue-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.revenue-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.revenue-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.revenue-card.card-success::before {
  background: var(--success);
}

.revenue-card.card-warning::before {
  background: var(--warning);
}

.revenue-card.card-danger::before {
  background: var(--danger);
}

.revenue-card.card-info::before {
  background: var(--info);
}

.revenue-card .rev-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 0.75rem;
}

.revenue-card .rev-icon.icon-primary {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.revenue-card .rev-icon.icon-success {
  background: var(--success-bg);
  color: var(--success);
}

.revenue-card .rev-icon.icon-warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.revenue-card .rev-icon.icon-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.revenue-card .rev-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.revenue-card .rev-label {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Client Table Enhancements */
.client-row {
  cursor: pointer;
  transition: var(--transition);
}

.client-row:hover {
  background: rgba(99, 102, 241, 0.04);
}

.client-name-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.client-name-cell strong {
  font-weight: 600;
  color: var(--text-primary);
}

.client-name-cell .client-email-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.badge-plan-starter {
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
}

.badge-plan-basico {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.badge-plan-pro {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
}

.badge-plan-enterprise {
  background: rgba(168, 85, 247, 0.1);
  color: #7c3aed;
}

.expiring-soon-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--warning-text);
  font-size: 0.75rem;
  font-weight: 600;
}

.expiring-soon-indicator .material-symbols-rounded {
  font-size: 14px;
  animation: pulse-warn 1.5s ease-in-out infinite;
}

@keyframes pulse-warn {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* Slide-over Panel */
.slide-over-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.slide-over-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.slide-over-panel {
  position: fixed;
  top: 0;
  right: -520px;
  width: 500px;
  max-width: 92vw;
  height: 100vh;
  background: var(--bg-base);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  z-index: 101;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.slide-over-panel.open {
  right: 0;
}

.slide-over-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.slide-over-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.slide-over-body {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Detail Sections */
.detail-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.detail-section h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.detail-item label {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem;
}

.detail-item .detail-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* License Progress Bar */
.license-progress-wrapper {
  margin-top: 0.5rem;
}

.license-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.license-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
  background: var(--success);
}

.license-progress-fill.warn {
  background: var(--warning);
}

.license-progress-fill.danger {
  background: var(--danger);
}

.license-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Quick Action Buttons in Detail */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.action-grid .btn {
  font-size: 0.8rem;
  padding: 0.6rem 0.75rem;
}

/* Danger Zone */
.danger-zone {
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.03);
}

.danger-zone h4 {
  color: var(--danger) !important;
}

/* Utility for flex-wrap */
.flex-wrap {
  flex-wrap: wrap;
}

.w-100 {
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Responsive CRM */
@media (max-width: 768px) {
  .crm-toolbar {
    flex-direction: column;
  }

  .revenue-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .action-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Login Page Footer & Links */
.login-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.forgot-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  display: inline-block;
}

.forgot-link:hover {
  color: var(--primary) !important;
  text-decoration: underline;
}

#recover-info {
  animation: slideDown 0.3s ease-out;
}

#recover-info.hidden {
  display: none !important;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* TABS SYSTEM */
.tabs-container {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  padding: 0.25rem;
  background: var(--bg-hover);
  border-radius: var(--radius-md);
  width: fit-content;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.empty-state {
  padding: 4rem 2rem;
  text-align: center;
  background: var(--bg-panel);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
}