/* ============================================
   Portal Interno — ERA Advisory Group LLC
   Design System & Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Caudex:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Primary Palette */
  --era-navy: #0d1b2a;
  --era-navy-light: #1b2d45;
  --era-slate: #3a4e64;
  --era-cream: #f5f0e8;
  --era-cream-light: #faf7f2;

  /* Gradients */
  --main-gradient: linear-gradient(135deg, #fce7cf 0%, #e2e8f0 40%, #c4d7e0 100%);

  /* Backgrounds */
  --bg-main: #F4F3EF;
  --bg-card: #FFFFFF;
  --bg-card-alt: #F8F6F1;
  --bg-sidebar: linear-gradient(rgba(13, 27, 42, 0.75), rgba(13, 27, 42, 0.75)), url('imagenes/ebd4096_original.jpg');
  --bg-sidebar-hover: rgba(255, 255, 255, 0.08);
  --bg-sidebar-active: rgba(255, 255, 255, 0.14);
  --bg-input: #FFFFFF;
  --bg-hero: linear-gradient(rgba(13, 27, 42, 0.7), rgba(13, 27, 42, 0.85)), url('imagenes/edificios.jpg');

  /* Text Colors */
  --text-primary: #0B0F14;
  --text-secondary: #5C6770;
  --text-tertiary: #8A929A;
  --text-on-dark: #FFFFFF;
  --text-on-dark-secondary: rgba(255, 255, 255, 0.7);

  /* Accent */
  --accent: #2a6f97;
  --accent-soft: rgba(42, 111, 151, 0.12);

  /* Status */
  --status-paid-bg: #D4EDDA;
  --status-paid-text: #155724;
  --status-partial-bg: #FFF3CD;
  --status-partial-text: #856404;
  --status-pending-bg: #F8D7DA;
  --status-pending-text: #721C24;
  --status-grey-bg: #e2e3e5;
  --status-grey-text: #383d41;

  /* Borders & Shadows */
  --border-light: rgba(0, 0, 0, 0.06);
  --border-input: #D8DDE2;
  --border-input-focus: #2a6f97;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 50px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-smooth: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --sidebar-width: 270px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  background-image: var(--main-gradient);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- App Layout --- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ===========================
   LOGIN PAGE
   =========================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: var(--main-gradient);
  background-size: cover;
  background-attachment: fixed;
  position: relative;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230d1b2a' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-light);
  padding: 48px 40px;
  position: relative;
  z-index: 1;
  animation: loginFadeIn 0.6s ease forwards;
}

@keyframes loginFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  justify-content: center;
}

.login-brand img {
  height: 56px;
  width: auto;
}

.login-brand-text {
  font-family: 'Caudex', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--era-navy);
}

.login-subtitle {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
}

.login-error {
  background: var(--status-pending-bg);
  color: var(--status-pending-text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin-bottom: 16px;
  display: none;
  text-align: center;
}

/* ===========================
   SIDEBAR
   =========================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  background-size: cover;
  background-position: center;
  color: var(--text-on-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--transition-smooth);
}

.sidebar-logo {
  padding: 24px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.era-logo-img {
  height: 60px;
  width: auto;
}

.era-logo-text {
  font-family: 'Caudex', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.sidebar-logo .logo-subtitle {
  display: block;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-on-dark-secondary);
  margin-top: 6px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.35);
  padding: 16px 16px 6px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  color: var(--text-on-dark-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-nav-item:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-on-dark);
  transform: translateX(4px);
}

.sidebar-nav-item:hover .nav-icon-wrapper {
  background: rgba(255, 255, 255, 0.2) !important;
}

.sidebar-nav-item.active {
  background: var(--bg-sidebar-active);
  color: var(--text-on-dark);
}

.sidebar-nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-on-dark);
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
}

.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-on-dark);
}

.sidebar-user-role {
  font-size: 0.7rem;
  color: var(--text-on-dark-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-sidebar-logout {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ff7875;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  margin-left: auto;
}

.btn-sidebar-logout:hover {
  transform: rotate(-10deg);
}

.btn-sidebar-logout svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Mobile Sidebar Toggle --- */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 28px;
  left: 18px;
  z-index: 200;
  background: var(--era-navy);
  color: var(--text-on-dark);
  border: none;
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.sidebar-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 99;
}

/* ===========================
   MAIN CONTENT
   =========================== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left var(--transition-smooth);
}

/* Tool Active States */
.app-layout.tool-active .sidebar {
    display: none !important;
}

.app-layout.tool-active .main-content {
    margin-left: 0 !important;
}

/* --- Hero Banner --- */
.hero-banner {
  background: var(--bg-hero);
  background-size: cover;
  background-position: center;
  padding: 40px 40px;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  margin: 20px 20px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.hero-profile-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Caudex', serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: #FFFFFF;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hero-profile-photo:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.hero-profile-photo:hover .profile-photo-upload {
  background: var(--accent);
  transform: scale(1.1);
}

.hero-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
}

.hero-text {
  flex: 1;
}

.hero-profile-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-profile-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-title {
  font-family: 'Caudex', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-on-dark);
  position: relative;
  z-index: 1;
  line-height: 1.2;
}

.hero-role-badge {
  display: inline-flex;
  padding: 3px 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #FFFFFF;
  letter-spacing: 0.5px;
}

.hero-email {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-on-dark-secondary);
  margin-top: 6px;
  position: relative;
  z-index: 1;
}

/* --- Content Area --- */
.content-area {
  flex: 1;
  padding: 28px 30px 48px;
}

/* --- View Management --- */
.view {
  display: none;
  animation: viewFadeIn var(--transition-smooth) forwards;
}

.view.active {
  display: block;
}

/* Tool iframe view — fills entire main content area, no padding */
#view-tool-frame {
  display: none;
}
#view-tool-frame.active {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  background: #fff;
  padding: 0;
}
#view-tool-frame #tool-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  position: relative;
  z-index: 301;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Section Title --- */
.section-title {
  font-family: 'Caudex', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--era-slate);
  margin-bottom: 16px;
}

/* ===========================
   KPI Cards
   =========================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.kpi-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.kpi-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kpi-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.kpi-value {
  font-family: 'Caudex', serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--era-navy);
  line-height: 1.1;
}

.kpi-sub {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ===========================
   TOOLS GRID (Dashboard)
   =========================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.tool-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.tool-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px) scale(1.01);
  background: #FFF;
}

/* Dynamic color highlight on hover */
.tool-card:hover .tool-card-icon {
  transform: scale(1.1);
}

.tool-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.tool-card-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-card-name {
  font-family: 'Caudex', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--era-navy);
  margin-bottom: 3px;
}

.tool-card-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.tool-card-arrow {
  margin-left: auto;
  transition: transform var(--transition-fast);
}

.tool-card:hover .tool-card-arrow {
  transform: translateX(3px);
  opacity: 1 !important;
}

/* --- Dashboard Grid Layout --- */
.dashboard-grid-premium {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: flex-start;
  margin-top: 24px;
}

@media (max-width: 1100px) {
  .dashboard-grid-premium {
    grid-template-columns: 1fr;
  }
}

.dashboard-sidebar-content {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  align-self: stretch;
}


/* ===========================
   PROFILE PAGE
   =========================== */
.profile-header {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 32px;
}

.profile-photo-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  flex-shrink: 0;
}

.profile-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Caudex', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  border: 3px solid var(--bg-card);
  box-shadow: var(--shadow-md);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
}

.profile-photo-upload {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--era-navy);
  color: var(--text-on-dark);
  border: 3px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 100;
}

.profile-photo-upload:hover {
  background: var(--era-navy-light);
  transform: scale(1.1);
}

.profile-photo-upload svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.profile-info h2 {
  font-family: 'Caudex', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--era-navy);
  margin-bottom: 4px;
}

.profile-info .role-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--accent-soft);
  color: var(--accent);
}

.profile-info .profile-email {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

.profile-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 28px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.profile-card-title {
  font-family: 'Caudex', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--era-slate);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

/* ===========================
   ADMIN — USER MANAGEMENT
   =========================== */
.users-table-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  overflow: hidden;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.table-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.table-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 -24px;
  padding: 0 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  table-layout: auto;
}

.data-table thead {
  background: var(--bg-card-alt);
}

.data-table th {
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 2px solid var(--border-light);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(42, 111, 151, 0.03);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.td-actions {
  display: flex;
  gap: 6px;
}

.user-row-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  margin-right: 10px;
  vertical-align: middle;
  overflow: hidden;
  flex-shrink: 0;
}

.user-row-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-name-cell {
  display: flex;
  align-items: center;
  font-weight: 600;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge-active {
  background: var(--status-paid-bg);
  color: var(--status-paid-text);
}

.badge-inactive {
  background: var(--status-pending-bg);
  color: var(--status-pending-text);
}

.badge-admin {
  background: rgba(13, 27, 42, 0.1);
  color: var(--era-navy);
}

.badge-licenciado {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-director {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}

.badge-lpm {
  background: rgba(234, 88, 12, 0.12);
  color: #ea580c;
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  background: var(--era-navy);
  color: var(--text-on-dark);
  border-color: var(--era-navy);
}

.btn-primary:hover {
  background: var(--era-navy-light);
  border-color: var(--era-navy-light);
  box-shadow: 0 4px 16px rgba(13, 27, 42, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--era-navy);
  border-color: var(--era-navy);
}

.btn-secondary:hover {
  background: var(--era-navy);
  color: var(--text-on-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--bg-card-alt);
  color: var(--text-primary);
}

.btn-danger {
  background: transparent;
  color: #E05252;
  border-color: #E05252;
}

.btn-danger:hover {
  background: #E05252;
  color: white;
}

.btn-sm {
  padding: 7px 16px;
  font-size: 0.78rem;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--bg-card-alt);
  color: var(--text-primary);
  border-color: var(--text-tertiary);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ===========================
   FORM ELEMENTS
   =========================== */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
  letter-spacing: 0.3px;
}

.form-label .required {
  color: #E05252;
  margin-left: 2px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-primary);
  background: var(--bg-input);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--border-input-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.form-card-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.form-card-title {
  font-family: 'Caudex', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--era-navy);
  margin-bottom: 4px;
}

.form-card-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ===========================
   MODALS
   =========================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: overlayFadeIn 0.2s ease;
}

.modal-overlay.show {
  display: flex;
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-family: 'Caudex', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--era-navy);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card-alt);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--era-navy);
  color: white;
}

.modal-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border-light);
}

/* ===========================
   WELCOME SECTION
   =========================== */
.welcome-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}

.welcome-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Caudex', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.welcome-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.welcome-text h2 {
  font-family: 'Caudex', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--era-navy);
  margin-bottom: 2px;
}

.welcome-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ===========================
   TOOLS PERMISSIONS CHECKLIST
   =========================== */
.tools-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.tools-checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.tools-checklist label:hover {
  background: var(--bg-card-alt);
}

.tools-checklist input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ===========================
   TOAST NOTIFICATIONS
   =========================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--accent);
  font-size: 0.85rem;
  color: var(--text-primary);
  animation: toastIn 0.3s ease;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.success {
  border-left-color: #155724;
}

.toast.error {
  border-left-color: #721C24;
}

.toast.info {
  border-left-color: var(--accent);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(30px);
  }
}

/* ===========================
   SIDEBAR VERSION
   =========================== */
.sidebar-version {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: flex;
  }

  .sidebar-overlay.show {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .hero-banner {
    margin: 15px 15px 0;
    padding: 30px 24px;
    border-radius: 12px;
  }

  .hero-title {
    font-size: 1.4rem;
  }

  .content-area {
    padding: 20px 15px 32px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .welcome-section {
    flex-direction: column;
    text-align: center;
  }

  .login-card {
    margin: 15px;
    padding: 36px 28px;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   NEW PREMIUM PROFILE STYLES
   ============================================ */

.profile-grid-new {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-top: 15px;
  align-items: stretch;
}

.profile-column-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}


@media (max-width: 1400px) {
  .profile-grid-new {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .profile-grid-new {
    grid-template-columns: 1fr;
  }
}

.profile-premium-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  overflow: hidden;
  position: relative;
}

.profile-header-card {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  min-height: 320px;
}

@media (max-width: 1400px) {
  .profile-header-card { grid-column: span 1; }
}

.profile-header-top {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-photo-premium {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 8px solid var(--era-cream);
  padding: 5px;
  background: white;
  box-shadow: 0 20px 40px rgba(13, 27, 42, 0.15);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Caudex', serif;
  font-size: 5.5rem;
  font-weight: 700;
  color: var(--era-navy);
  overflow: hidden;
  transition: transform var(--transition-normal);
}

.profile-photo-premium:hover {
  transform: scale(1.02);
}

.profile-photo-premium img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-header-info {
  flex: 1;
}

.profile-name-premium {
  font-family: 'Caudex', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--era-navy);
  margin-bottom: 2px;
}

.profile-role-premium {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.profile-contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.profile-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.profile-contact-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--era-slate);
  fill: none;
  stroke-width: 2;
}

.profile-social-links {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.social-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--era-navy);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.social-btn:hover {
  background: var(--era-navy);
  color: white;
}

/* Calendar Card */
.calendar-card {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
}

@media (max-width: 1400px) {
  .calendar-card { grid-column: span 1; }
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--era-navy);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.calendar-day-header {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-tertiary);
  padding-bottom: 6px;
  text-transform: uppercase;
}

.calendar-day {
  font-size: 0.7rem;
  padding: 6px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.calendar-day.active {
  background: var(--era-navy);
  color: white;
  font-weight: 700;
}

.calendar-day.has-event {
  position: relative;
}

.calendar-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 3px;
  background: var(--accent);
  border-radius: 50%;
}

.calendar-day:hover:not(.active) {
  background: var(--bg-card-alt);
}

/* Events Card */
.events-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
}

@media (max-width: 1400px) {
  .events-card { grid-column: span 2; }
}
@media (max-width: 900px) {
  .events-card { grid-column: span 1; }
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-premium-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  background: var(--bg-card-alt);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--era-navy);
}

.event-p-time {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--era-slate);
  background: white;
  padding: 2px 6px;
  border-radius: 4px;
}

.event-p-details {
  flex: 1;
}

.event-p-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--era-navy);
}

.event-p-desc {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

/* Info Section Card */
.info-section-premium {
  grid-column: span 5;
  padding: 24px;
}

@media (max-width: 1400px) {
  .info-section-premium { grid-column: span 1; }
}

.info-cards-group {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.info-card-block h4 {
  font-family: 'Caudex', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--era-navy);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-card-block h4::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.info-grid-p {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .info-grid-p {
    grid-template-columns: 1fr 1fr;
  }
}

.info-item-p {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label-p {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
}

.info-value-p {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--era-navy);
}

/* Productivity & Recent Cases */
.productivity-card {
  grid-column: span 4;
}

.recent-cases-card {
  grid-column: span 8;
}

@media (max-width: 1400px) {
  .productivity-card, .recent-cases-card { grid-column: span 1; }
}

.progress-container {
  margin-bottom: 20px;
}

.progress-bar-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--era-navy);
  margin-bottom: 8px;
}

.progress-bar-bg {
  height: 10px;
  background: var(--bg-card-alt);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #4cc9f0);
  border-radius: 6px;
  transition: width 1s ease-out;
}

.productivity-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 15px;
  border-top: 1px solid var(--border-light);
  margin-top: 5px;
}

.prod-stat {
  display: flex;
  flex-direction: column;
}

.prod-label {
  font-size: 0.6rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.prod-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--era-navy);
}

.text-success { color: #27ae60; }

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card-alt);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
}

.recent-item:hover {
  background: white;
  border-color: var(--border-light);
  transform: translateX(5px);
  box-shadow: var(--shadow-sm);
}

.recent-icon {
  width: 38px;
  height: 38px;
  background: white;
  color: var(--era-navy);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  border: 1px solid var(--border-light);
}

.recent-info {
  flex: 1;
}

.recent-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--era-navy);
  margin-bottom: 1px;
}

.recent-meta {
  font-size: 0.68rem;
  color: var(--text-tertiary);
}

.recent-arrow {
  width: 16px;
  height: 16px;
  stroke: var(--text-tertiary);
  fill: none;
  stroke-width: 2.5;
}

.btn-edit-p {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--era-navy);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 10;
}

.btn-edit-p:hover {
  background: var(--era-navy-light);
}

/* ============================================
   PERSONAL WORKSPACE STYLES (Mi Perfil Redesign)
   ============================================ */

.profile-workspace {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.4s ease;
}

.workspace-hero {
  background: linear-gradient(135deg, var(--era-navy), #1a2f4a);
  border-radius: var(--radius-xl);
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 30px;
  position: relative;
  overflow: hidden;
  color: white;
  box-shadow: 0 10px 30px rgba(13, 27, 42, 0.2);
}

.workspace-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(168, 144, 107, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.workspace-photo-container {
  position: relative;
  z-index: 2;
}

.workspace-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid var(--era-cream);
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.workspace-hero-info {
  flex: 1;
  z-index: 2;
}

.workspace-hero-info h2 {
  font-family: 'Caudex', serif;
  font-size: 2.2rem;
  margin-bottom: 5px;
}

.workspace-hero-info p {
  font-size: 1rem;
  color: var(--era-cream);
  opacity: 0.9;
  letter-spacing: 1px;
}

.workspace-actions {
  display: flex;
  gap: 12px;
  z-index: 2;
}

/* Stats Bar */
.workspace-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card-premium {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.stat-card-premium:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-info .stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
}

.stat-info .stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--era-navy);
}

/* Main Workspace Grid */
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.workspace-main-col {
  grid-column: span 8;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.workspace-side-col {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.workspace-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: fit-content;
}

.workspace-card-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.workspace-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--era-navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-header-tabs {
  background: #f8f9fa;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  padding: 0 20px;
}

.tab-btn {
  padding: 16px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-tertiary);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--era-navy);
}

.tab-btn.active {
  color: var(--era-navy);
  border-bottom-color: var(--era-navy);
}

/* Horizontal Calendar Strip */
.calendar-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 5px;
  scrollbar-width: thin;
  scrollbar-color: var(--era-navy) transparent;
}

.calendar-strip::-webkit-scrollbar {
  height: 4px;
}

.calendar-strip::-webkit-scrollbar-thumb {
  background: var(--era-navy);
  border-radius: 10px;
}

.calendar-strip-item {
  min-width: 45px;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.calendar-strip-item.active {
  background: var(--era-navy);
  color: white;
  border-color: var(--era-navy);
  box-shadow: 0 4px 12px rgba(13, 27, 42, 0.2);
}

.calendar-strip-item .day-num {
  font-size: 1.1rem;
  font-weight: 700;
}

.calendar-strip-item .day-name {
  font-size: 0.6rem;
  text-transform: uppercase;
  opacity: 0.7;
}

/* Tool Card Animations */
@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.tool-card-premium {
  animation: cardEntrance 0.5s ease backwards;
}

.tool-card-premium:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-md);
  background: white !important;
}

.tool-card-premium:hover .tool-icon-wrapper {
  background: var(--era-cream) !important;
}

/* Calendar Grid Premium */
.calendar-grid-premium {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 15px;
}

.calendar-weekday-header {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  padding-bottom: 10px;
}

.calendar-day-premium {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--era-navy);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  border: 1px solid transparent;
}

.calendar-day-premium:hover {
  background: var(--era-cream);
  color: var(--era-navy);
}

.calendar-day-premium.active {
  background: var(--era-navy);
  color: white;
  box-shadow: 0 4px 10px rgba(13, 27, 42, 0.2);
}

.calendar-day-premium.other-month {
  opacity: 0.2;
  cursor: default;
}

.calendar-day-premium.has-event::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  background: #A855F7;
  border-radius: 50%;
}

.calendar-day-premium.active.has-event::after {
  background: var(--era-cream);
}

/* Tool Card Animations */
@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.tool-card-premium {
  animation: cardEntrance 0.5s ease backwards;
}

.tool-card-premium:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-md);
  background: white !important;
}

.tool-card-premium:hover .tool-icon-wrapper {
  background: var(--era-cream) !important;
}

/* Sync Height Helper */
.workspace-row-sync {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: stretch; /* This makes all children in this row the same height */
}

.workspace-card.sync-height {
  height: 100%;
}

/* Media Queries */
@media (max-width: 1100px) {
  .workspace-grid, .workspace-row-sync { grid-template-columns: 1fr; }
  .workspace-main-col, .workspace-side-col { grid-column: span 12; }
}

@media (max-width: 700px) {
  .workspace-hero { flex-direction: column; text-align: center; padding: 30px 20px; }
  .workspace-actions { flex-direction: column; width: 100%; }
  .workspace-stats-bar { grid-template-columns: 1fr; }
}