/* =========================================
   ANTIGRAVITY — Design System
   Color: Celeste #00BFFF + White
   Font: Inter (Google Fonts)
   ========================================= */

:root {
  --primary: #343180;
  --primary-dark: #22205B;
  --primary-light: #5A56A8;
  --primary-glass: rgba(52, 49, 128, 0.08);
  --primary-glass-border: rgba(52, 49, 128, 0.18);
  
  --accent: #00AEEF;
  --accent-dark: #008CBE;
  --accent-glass: rgba(0, 174, 239, 0.15);
  --white: #FFFFFF;
  --bg: #F0F6FA;
  --bg-card: #FFFFFF;
  --text: #1A1A2E;
  --text-muted: #6B7A8D;
  --text-light: #8FA3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #EF4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 20px rgba(0, 174, 239, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-w: 260px;
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

/* Make page titles clickable back to dashboard */
.page-header h1 {
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.page-header h1:hover {
  opacity: 0.7;
}

a { text-decoration: none; color: inherit; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 10px; }

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--primary-dark);
  color: var(--white);
  border-right: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s ease;
  overflow-y: auto;
  max-height: 100vh;
}

.sidebar-header {
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.sidebar-title {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--white);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
  cursor: pointer;
}

.nav-link:hover {
  background: rgba(255,255,255,0.05);
  color: var(--white);
}

.nav-link.active {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(0, 174, 239, 0.3);
}

.nav-link.active .nav-icon { filter: brightness(10); }

.nav-icon { font-size: 1.15rem; }

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

/* ===== Main Content ===== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 2rem;
  min-height: 100vh;
  width: calc(100% - var(--sidebar-w));
  transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Sidebar Collapsed State */
.sidebar.collapsed {
  width: 0;
  min-width: 0;
  overflow: hidden;
  border-right: none;
}

.sidebar.collapsed .sidebar-header .sidebar-logo,
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .sidebar-nav,
.sidebar.collapsed .sidebar-footer {
  opacity: 0;
  pointer-events: none;
}

.main-content.sidebar-collapsed {
  margin-left: 0;
  width: 100%;
}

/* Floating re-open button (show only when sidebar is collapsed) */
#sidebar-reopen-btn {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: var(--primary-dark);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

#page-container {
  max-width: 1280px;
  margin: 0 auto;
  animation: fadeIn 0.35s ease;
}

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

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ===== Page Header ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h1 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s;
}

.page-header h1:hover {
  opacity: 0.8;
}

.page-header h1 .icon {
  font-size: 1.5rem;
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

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

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
  border-color: var(--primary-glass-border);
}

.kpi-card .kpi-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.kpi-card .kpi-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.kpi-card .kpi-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.4rem;
}

/* ===== Section ===== */
.section {
  margin-bottom: 2rem;
  animation: slideUp 0.4s ease;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  cursor: pointer;
}

.section-header h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
}

.section-header .toggle-icon {
  transition: transform 0.3s ease;
  font-size: 1.2rem;
}

.section-header .toggle-icon.collapsed {
  transform: rotate(-90deg);
}

/* ===== Tables ===== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead {
  background: var(--primary);
  color: var(--white);
}

thead th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

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

tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

/* ===== Badges / Status ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-primary { background: var(--primary-glass); color: var(--primary); }
.badge-muted { background: var(--border-light); color: var(--text-muted); }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.green { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-dot.yellow { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.status-dot.red { background: var(--danger); box-shadow: 0 0 6px var(--danger); animation: pulse 2s infinite; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 174, 239, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(0, 174, 239, 0.35);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: var(--white);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #DC2626);
  color: var(--white);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #D97706);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-glass);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--border-light);
  color: var(--text);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

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

/* ===== Forms ===== */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.12);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7A8D' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

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

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

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
  position: relative;
}
/* ===== Dropdown (Column Picker) ===== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--white);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  z-index: 1000;
  border: 1px solid var(--border);
  margin-top: 0.5rem;
  animation: slideUp 0.2s ease;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.col-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-size: 0.85rem;
  color: var(--text);
  user-select: none;
}

.col-toggle:hover {
  background: var(--bg);
}

.col-toggle input {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
  font-size: 1.15rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
}

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 500;
  animation: slideIn 0.3s ease;
  min-width: 280px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== Vacancy Highlight ===== */
.vacancy-row {
  background: var(--primary-glass) !important;
  border-left: 4px solid var(--primary);
}

/* ===== Collapsible ===== */
.collapsible-content {
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.collapsible-content.collapsed {
  max-height: 0 !important;
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.9rem;
}

/* ===== Confirm Dialog ===== */
.confirm-dialog {
  padding: 2rem;
  text-align: center;
}

.confirm-dialog .confirm-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.confirm-dialog h3 {
  margin-bottom: 0.5rem;
}

.confirm-dialog p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 1.5rem;
}

.tab-btn {
  flex: 1;
  padding: 0.55rem 1rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

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

/* ===== Calculator ===== */
.calculator-box {
  background: linear-gradient(135deg, var(--primary-glass), rgba(0, 191, 255, 0.03));
  border: 1px solid var(--primary-glass-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

.calculator-box h4 {
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.calc-result {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

/* ===== Maintenance photo ===== */
.photo-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
}

/* ===== Contract Progress Bar ===== */
.progress-bar-container {
  background: var(--border-light);
  border-radius: 50px;
  height: 8px;
  overflow: hidden;
  margin-top: 0.4rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 50px;
  transition: width 0.5s ease;
}

.progress-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.15rem;
}

/* ===== Monthly Semaphore Badges ===== */
.badge-pendiente {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1.5px solid rgba(239, 68, 68, 0.25);
}

.badge-cobrado {
  background: var(--warning-bg);
  color: #B45309;
  border: 1.5px solid rgba(245, 158, 11, 0.25);
}

.badge-liquidado {
  background: var(--success-bg);
  color: var(--success);
  border: 1.5px solid rgba(16, 185, 129, 0.25);
}

/* ===== Action Button Pair ===== */
.action-btn-pair {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #D97706);
  color: var(--white);
}

.btn:disabled, .btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: block;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
    padding-top: 4rem;
  }

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

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

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  html { font-size: 14px; }
}
/* ===== Backup Warning ===== */
@keyframes pulse-orange {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.backup-needed {
  background: linear-gradient(135deg, #F59E0B, #EA580C) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 700 !important;
  animation: pulse-orange 2s infinite;
  position: relative;
}

.backup-needed::after {
  content: "!";
  position: absolute;
  top: -5px;
  right: -5px;
  background: #EF4444;
  color: white;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
}

/* ===== Gastos Mensuales (Post-its) ===== */
.monthly-expenses-section {
  margin-bottom: 1.5rem;
  background: white;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.expenses-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--bg);
}

.expenses-header h2 {
  font-size: 1rem;
}

.expenses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.expense-column {
  background: var(--bg);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.expense-column h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.15rem;
  letter-spacing: 0.05em;
}

.post-it-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
}

/* Custom scrollbar for post-it list */
.post-it-list::-webkit-scrollbar { width: 4px; }
.post-it-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 10px; }

.post-it {
  background: #FFF9C4;
  padding: 0.6rem 0.85rem;
  border-radius: 4px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.08);
  position: relative;
  transition: var(--transition);
  cursor: pointer;
  border-left: 3px solid #FBC02D;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.post-it:hover {
  transform: scale(1.01) rotate(0.5deg);
  box-shadow: 3px 3px 8px rgba(0,0,0,0.12);
}

.post-it:nth-child(even) { transform: rotate(-0.3deg); }
.post-it:nth-child(odd) { transform: rotate(0.4deg); }

.post-it.checked {
  background: #F8FAFC;
  border-left-color: #CBD5E1;
  opacity: 0.65;
  order: 100;
}

.post-it .label {
  font-weight: 600;
  font-size: 0.82rem;
  color: #455A64;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.post-it .amount {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.post-it.checked .label,
.post-it.checked .amount {
  text-decoration: line-through;
  color: var(--text-muted);
}

.post-it .check-mark {
  font-size: 0.9rem;
  opacity: 0.2;
  margin-right: 2px;
}

.post-it.checked .check-mark {
  opacity: 1;
  color: var(--success);
}

.post-it .delete-btn {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #EF4444;
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: var(--shadow-sm);
}

.post-it:hover .delete-btn {
  opacity: 1;
}

.post-it .edit-btn {
  position: absolute;
  top: -5px;
  right: 18px;
  background: var(--primary);
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: var(--shadow-sm);
}

.post-it:hover .edit-btn {
  opacity: 1;
}

@media (max-width: 1024px) {
  .expenses-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Profile Overlay ===== */
.profile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #ffffff, #e6f0f9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease;
}

.profile-overlay.hidden {
  display: none;
}

.profile-container {
  text-align: center;
  max-width: 650px;
  width: 100%;
  padding: 2rem;
}

.profile-header {
  margin-bottom: 2.5rem;
}

.profile-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
}

.profile-header h2 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.profile-header p {
  color: var(--text-muted);
  font-weight: 500;
}

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

.profile-card {
  background: #fff;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.profile-avatar-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin-bottom: 1.25rem;
  transition: var(--transition);
  border: 2px solid transparent;
}

.profile-card:hover .profile-avatar-circle {
  background: var(--accent-glass);
  transform: scale(1.05);
}

.profile-card h3 {
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.profile-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

