/* ============================================
   MAIN CONSOLIDATED CSS FILE
   Edificio Admin - All styles consolidated
   ============================================ */

/* ============================================
   1. CSS RESET & BASE STYLES
   ============================================ */

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

/* Remove default margin and padding */
* {
  margin: 0;
  padding: 0;
}

/* Remove list styles on ul, ol elements */
ul,
ol {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture,
svg {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   2. CSS VARIABLES & THEME SYSTEM
   ============================================ */

:root,
[data-theme="default"] {
  /* Primary Colors */
  --primary-color: #0ea5e9;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-dark: #0284c7;
  
  /* Secondary Colors */
  --secondary-color: #06b6d4;
  
  /* Status Colors */
  --success-color: #10b981;
  --success: #10b981;
  --success-bg: #d1fae5;
  --success-text: #065f46;
  
  --warning-color: #f59e0b;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --warning-text: #92400e;
  
  --danger-color: #ef4444;
  --error: #ef4444;
  --error-bg: #fee2e2;
  --error-text: #991b1b;
  
  --info: #3b82f6;
  --info-bg: #dbeafe;
  --info-text: #1e40af;
  
  /* Light/Dark Colors */
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  
  /* Text Colors */
  --text-color: #333;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --text-inverse: #ffffff;
  
  /* Border & Background */
  --border-color: #ddd;
  --border-color: #e5e7eb;
  --border-hover: #d1d5db;
  --border-focus: #0ea5e9;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-hover: #f3f4f6;
  
  /* Shadows & Gradients */
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  --gradient: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #14b8a6 100%);
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Typography */
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
}

/* Dark Theme */
[data-theme="dark"] {
  --primary-500: #60a5fa;
  --primary-600: #3b82f6;
  --primary: #60a5fa;
  --primary-dark: #3b82f6;
  --gradient: linear-gradient(135deg, #374151 0%, #1f2937 100%);

  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #374151;
  --bg-hover: #374151;

  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-tertiary: #9ca3af;

  --border-color: #374151;
  --border-focus: #60a5fa;

  --success: #34d399;
  --success-bg: #065f46;
  --success-text: #d1fae5;
  --warning: #fbbf24;
  --warning-bg: #78350f;
  --warning-text: #fef3c7;
  --error: #f87171;
  --error-bg: #7f1d1d;
  --error-text: #fee2e2;
  --info: #60a5fa;
  --info-bg: #1e3a8a;
  --info-text: #dbeafe;
}

/* Color Themes */
[data-theme="green"] {
  --primary-500: #059669;
  --primary-600: #047857;
  --primary: #059669;
  --primary-dark: #047857;
  --gradient: linear-gradient(135deg, #34d399 0%, #059669 100%);
}

[data-theme="purple"] {
  --primary-500: #7c3aed;
  --primary-600: #6d28d9;
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --gradient: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
}

[data-theme="orange"] {
  --primary-500: #ea580c;
  --primary-600: #c2410c;
  --primary: #ea580c;
  --primary-dark: #c2410c;
  --gradient: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
}

[data-theme="pink"] {
  --primary-500: #db2777;
  --primary-600: #be185d;
  --primary: #db2777;
  --primary-dark: #be185d;
  --gradient: linear-gradient(135deg, #f472b6 0%, #db2777 100%);
}

[data-theme="teal"] {
  --primary-500: #0d9488;
  --primary-600: #0f766e;
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --gradient: linear-gradient(135deg, #5eead4 0%, #0d9488 100%);
}

[data-theme="red"] {
  --primary-500: #dc2626;
  --primary-600: #b91c1c;
  --primary: #dc2626;
  --primary-dark: #b91c1c;
  --gradient: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
}

[data-theme="gold"] {
  --primary-500: #d97706;
  --primary-600: #b45309;
  --primary: #d97706;
  --primary-dark: #b45309;
  --gradient: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
}

[data-theme="gradient-blue"] {
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --gradient: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
}

[data-theme="gradient-purple"] {
  --primary-500: #8b5cf6;
  --primary-600: #7c3aed;
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --gradient: linear-gradient(135deg, #c084fc 0%, #8b5cf6 50%, #6d28d9 100%);
}

[data-theme="indigo"] {
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --gradient: linear-gradient(135deg, #818cf8 0%, #6366f1 50%, #4f46e5 100%);
}

[data-theme="gradient-sunset"] {
  --primary-500: #f59e0b;
  --primary-600: #d97706;
  --primary: #f59e0b;
  --primary-dark: #d97706;
  --gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 30%, #ef4444 70%, #dc2626 100%);
}

[data-theme="gradient-ocean"] {
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --gradient: linear-gradient(135deg, #7dd3fc 0%, #0ea5e9 50%, #0284c7 100%);
}

[data-theme="gradient-fire"] {
  --primary-500: #ef4444;
  --primary-600: #dc2626;
  --primary: #ef4444;
  --primary-dark: #dc2626;
  --gradient: linear-gradient(135deg, #fbbf24 0%, #f97316 30%, #ef4444 70%, #dc2626 100%);
}

/* ============================================
   3. GLOBAL BODY & BASE STYLES
   ============================================ */

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f5f7fa;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

/* ============================================
   4. TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--secondary-color);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

/* ============================================
   5. BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.btn:hover {
  text-decoration: none;
}

.btn:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.btn-primary {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

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

.btn-success {
  color: #fff;
  background-color: var(--success-color);
  border-color: var(--success-color);
}

.btn-success:hover {
  background-color: #219a52;
  border-color: #219a52;
}

.btn-warning {
  color: #fff;
  background-color: var(--warning-color);
  border-color: var(--warning-color);
}

.btn-warning:hover {
  background-color: #d68910;
  border-color: #d68910;
}

.btn-danger {
  color: #fff;
  background-color: var(--danger-color);
  border-color: var(--danger-color);
}

.btn-danger:hover {
  background-color: #c0392b;
  border-color: #c0392b;
}

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

.btn-outline:hover {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.2rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.25rem;
  border-radius: 0.3rem;
}

.button-group {
  display: flex;
  gap: 0.5rem;
}

.credentials-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  margin-top: 20px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.credentials-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), #1e5a8a);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* ============================================
   6. FORMS
   ============================================ */

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: inline-block;
  margin-bottom: 0.6rem;
  font-weight: 500;
}

input, select, textarea {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-color);
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary-color);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-static {
  padding: 0.5rem 0;
  margin-bottom: 0;
  font-weight: 500;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-color);
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.info-text, .warning-text {
  padding: 0.75rem;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
}

.info-text {
  background-color: rgba(52, 152, 219, 0.1);
  border-left: 4px solid var(--primary-color);
}

.warning-text {
  background-color: rgba(243, 156, 18, 0.1);
  border-left: 4px solid var(--warning-color);
}

/* ============================================
   7. ALERTS & BADGES
   ============================================ */

.alert {
  padding: 12px 20px;
  margin-bottom: 20px;
  border-radius: 4px;
  border-left: 4px solid;
}

.alert-info {
  background-color: #d1ecf1;
  border-color: #17a2b8;
  color: #0c5460;
}

.alert-success {
  background-color: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.alert-warning {
  background-color: #fff3cd;
  border-color: #ffc107;
  color: #856404;
}

.alert-danger {
  background-color: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
}

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

.badge-success {
  background-color: var(--success-color);
  color: white;
}

.badge-warning {
  background-color: var(--warning-color);
  color: #000;
}

.badge-danger, .badge-error {
  background-color: var(--danger-color);
  color: white;
}

.badge-info {
  background-color: var(--info);
  color: white;
}

.badge-urgente {
  background-color: #dc3545;
  color: white;
}

.badge-alta {
  background-color: #fd7e14;
  color: white;
}

.badge-media {
  background-color: #ffc107;
  color: #000;
}

.badge-baja {
  background-color: #28a745;
  color: white;
}

/* ============================================
   8. MODALS
   ============================================ */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal.show {
  display: block;
}

.modal-content {
  position: relative;
  background-color: #fefefe;
  margin: 5% auto;
  border: none;
  width: 90%;
  max-width: 800px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
  padding: 2.5rem;
}

.modal-lg {
  max-width: 800px;
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 25px 30px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -2.5rem -2.5rem 1.5rem -2.5rem;
}

.modal-header h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}

.modal-body {
  padding: 35px 40px;
}

.modal-footer {
  padding: 20px 30px;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
  border-top: 1px solid #e0e6ed;
  margin: 1.5rem -2.5rem -2.5rem -2.5rem;
}

.close {
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  background: none;
  border: none;
  padding: 0;
}

.close:hover {
  color: #ddd;
  transform: rotate(90deg);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   9. CREDENTIALS MODAL STYLES
   ============================================ */

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.credential-card {
  border: 1px solid #e0e6ed;
  border-radius: 10px;
  padding: 25px;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.credential-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.credential-card.admin {
  border-left: 4px solid #e74c3c;
}

.credential-card.comite {
  border-left: 4px solid #9b59b6;
}

.credential-card.inquilino {
  border-left: 4px solid #27ae60;
}

.role-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e6ed;
}

.role-header i {
  font-size: 20px;
}

.credential-card.admin .role-header i {
  color: #e74c3c;
}

.credential-card.comite .role-header i {
  color: #9b59b6;
}

.credential-card.inquilino .role-header i {
  color: #27ae60;
}

.role-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--secondary-color);
}

.credential-details p {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.6;
}

.credential-details strong {
  color: var(--secondary-color);
}

.role-desc {
  font-style: italic;
  color: #666;
  font-size: 13px;
  margin-top: 10px;
}

.inquilino-list {
  margin: 15px 0;
  padding: 18px;
  background: #f8f9fa;
  border-radius: 6px;
}

.inquilino-item {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e6ed;
}

.inquilino-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.inquilino-item p {
  margin: 2px 0;
  font-size: 13px;
}

.credential-item {
  background: white;
  padding: 0.8rem;
  border-radius: 0.375rem;
  border: 1px solid #e9ecef;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.credential-item strong {
  display: block;
  color: var(--secondary-color);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.credential-item p {
  margin: 0.2rem 0;
  font-family: monospace;
  color: #495057;
  font-size: 0.85rem;
}

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #666;
  font-size: 14px;
}

.notice i {
  color: var(--primary-color);
  font-size: 16px;
}

.notice p {
  margin: 0;
}

.reset-notice {
  color: var(--warning-color);
  font-weight: 500;
  font-style: italic;
  margin-top: 1rem;
  font-size: 0.8rem;
}

/* ============================================
   10. LOGIN PAGE STYLES
   ============================================ */

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f5f7fa;
  padding: 1rem;
}

.login-card {
  width: 100%;
  max-width: 500px;
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.login-header {
  padding: 2rem;
  background-color: var(--primary-color);
  color: #fff;
  text-align: center;
}

.login-header h1 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.login-header p {
  opacity: 0.8;
  margin-bottom: 0;
}

.login-form {
  padding: 2rem;
}

.login-form h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.login-info {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: #666;
}

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

.login-announcement h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.credentials-section {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0;
}

/* ============================================
   11. DASHBOARD LAYOUT
   ============================================ */

.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--secondary-color);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1001;
  background: var(--gradient) !important;
}

.sidebar:hover,
.sidebar-hotspot:hover+.sidebar,
.sidebar.active {
  transform: translateX(0);
}

.sidebar-hotspot {
  position: fixed;
  top: 0;
  left: 0;
  width: 15px;
  height: 100vh;
  z-index: 1002;
  background: transparent;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sidebar-header img {
  order: 2;
  flex-shrink: 0;
}

.sidebar-header-content {
  order: 1;
  flex: 1;
}

.sidebar-header h2 {
  color: #fff;
  margin-bottom: 0.25rem;
}

.sidebar-header p {
  opacity: 0.7;
  margin-bottom: 0;
  font-size: 0.9rem;
}

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

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 0.25rem;
}

.sidebar-nav a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s;
}

.sidebar-nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}

.sidebar-nav li.active a {
  background-color: var(--primary-color);
  color: #fff;
  border-left: 4px solid #fff;
}

.sidebar-nav i {
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
}

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

.sidebar-footer p {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.sidebar-close {
  display: none;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 0;
  padding: 1.5rem;
  background-color: #f5f7fa;
  width: 100%;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

.date-display {
  font-size: 1.1rem;
  color: #666;
}

/* ============================================
   12. CONTENT SECTIONS
   ============================================ */

.content-section {
  display: none;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.content-section.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem !important;
  margin-top: 0 !important;
}

.section-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

/* ============================================
   13. FILTER CONTROLS
   ============================================ */

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem !important;
  margin-top: 0 !important;
  padding: 1rem;
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  margin-bottom: 0;
  white-space: nowrap;
}

.filter-group select,
.filter-group input {
  min-width: 150px;
}

/* ============================================
   14. TABLES
   ============================================ */

.table-container {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 1.25rem !important;
  margin-top: 0 !important;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.data-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: var(--text-primary);
}

.data-table tbody tr:hover {
  background-color: rgba(52, 152, 219, 0.05);
}

.data-table .actions {
  display: flex;
  gap: 0.5rem;
}

.table-danger {
  background: #fff5f5 !important;
}

/* ============================================
   15. DASHBOARD GRID & CARDS
   ============================================ */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.grid-col-span-4 {
  grid-column: span 4;
}

.grid-col-span-6 {
  grid-column: span 6;
}

.grid-col-span-3 {
  grid-column: span 3;
}

.grid-col-span-12 {
  grid-column: span 12;
}

.dashboard-summary {
  display: contents;
}

.summary-card {
  background-color: #fff;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  text-align: center;
  border-radius: 0.5rem;
}

.summary-card .amount {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.summary-card .description {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0;
}

.summary-card h3 {
  font-size: 0.9rem;
}

/* ============================================
   16. CHARTS & CONTAINERS
   ============================================ */

.dashboard-charts {
  display: contents;
}

.chart-container {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-top: 0 !important;
}

.chart-container h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #666;
}

.chart {
  height: 300px;
}

.dashboard-recent {
  display: contents;
}

.recent-container {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-top: 0 !important;
}

.recent-container h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #666;
}

.recent-list {
  max-height: 400px;
  overflow-y: auto;
}

/* ============================================
   17. ANUNCIOS
   ============================================ */

.anuncios-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.anuncio-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-color);
  position: relative;
  transition: all 0.3s ease;
}

.anuncio-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.anuncio-card.importante {
  border-left: 4px solid var(--warning-color);
}

.anuncio-card.urgente {
  border-left: 4px solid var(--danger-color);
}

.anuncio-card.urgent {
  border-left-color: #dc3545;
  background: #fff5f5;
}

.anuncio-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.anuncio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.anuncio-header h4 {
  margin: 0;
  color: var(--secondary-color);
}

.anuncio-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #666;
}

.anuncio-content {
  margin-bottom: 1rem;
  white-space: pre-line;
  line-height: 1.6;
  color: #666;
}

.anuncio-content p {
  margin: 0;
}

.anuncio-footer {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.anuncio-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.anuncio-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.anuncio-badge.general {
  background-color: var(--primary-color);
  color: #fff;
}

.anuncio-badge.importante {
  background-color: var(--warning-color);
  color: #fff;
}

.anuncio-badge.urgente {
  background-color: var(--danger-color);
  color: #fff;
}

/* ============================================
   18. FONDOS
   ============================================ */

.fondos-summary {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1.5rem !important;
  width: 100% !important;
  margin-bottom: 1.5rem !important;
  margin-top: 0 !important;
}

.fondo-card {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  text-align: center;
  flex: 1 1 250px !important;
  min-width: 250px !important;
  transition: all 0.3s ease;
}

.fondo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.fondo-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #666;
}

.fondo-card .amount {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.fondo-card .description {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0;
}

.fondo-card.total {
  background: var(--gradient) !important;
  color: #ffffff !important;
  border: none !important;
}
.amount-total {
  color: #ffffff !important;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0;
  letter-spacing: -0.02em;
}

.fondo-card.total h3,
.fondo-card.total .description {
  color: rgba(255, 255, 255, 0.8) !important;
}

.fondo-card.total .amount {
  color: #fff !important;
  font-size: 2.5rem;
}

.card-highlight {
  background: var(--gradient) !important;
  color: #ffffff !important;
  border: none !important;
}

.card-highlight h3,
.card-highlight p {
  color: #ffffff !important;
}

/* ============================================
   19. PARCIALIDADES
   ============================================ */

.parcialidades-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.info-card {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.info-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #666;
}

.info-card ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.info-card li {
  margin-bottom: 0.5rem;
}

.progress-container {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.progress-bar-container {
  background: #e9ecef;
  border-radius: 20px;
  height: 20px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary-color), #28a745);
  height: 100%;
  transition: width 0.3s ease;
  border-radius: 20px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.parcialidades-progress {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.parcialidades-progress h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #666;
}

.depto-progress {
  margin-bottom: 1rem;
}

.depto-progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.depto-progress-bar {
  height: 1rem;
  background-color: #e9ecef;
  border-radius: 0.25rem;
  overflow: hidden;
}

.depto-progress {
  height: 100%;
  background-color: var(--primary-color);
}

.depto-progress.completed {
  background-color: var(--success-color);
}

/* ============================================
   20. FILE UPLOAD
   ============================================ */

.file-upload-area {
  transition: all 0.3s ease;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border: 2px dashed #dee2e6 !important;
}

.file-upload-area:hover {
  border-color: #0d6efd !important;
  background-color: #e7f1ff;
}

.file-upload-area.drag-over {
  border-color: #0d6efd !important;
  background-color: #e7f1ff;
  transform: scale(1.02);
}

.file-item {
  background-color: #ffffff;
  transition: all 0.2s ease;
}

.file-item:hover {
  background-color: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.file-item .btn {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.file-item:hover .btn {
  opacity: 1;
}

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

.file-item {
  animation: fileAdded 0.3s ease;
}

.existing-files-section {
  border-top: 1px solid #dee2e6;
  padding-top: 1rem;
  margin-top: 1rem;
}

.existing-files-section .file-item {
  background-color: #f8f9fa;
  border-left: 4px solid #28a745;
}

.file-type-indicator {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1.2rem;
}

.file-type-pdf {
  background-color: #dc3545;
  color: white;
}

.file-type-image {
  background-color: #0d6efd;
  color: white;
}

.file-type-document {
  background-color: #6f42c1;
  color: white;
}

.file-type-default {
  background-color: #6c757d;
  color: white;
}

.uploading {
  opacity: 0.6;
  pointer-events: none;
}

.upload-progress {
  height: 4px;
  background-color: #e9ecef;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.upload-progress-bar {
  height: 100%;
  background-color: #0d6efd;
  transition: width 0.3s ease;
}

.file-tooltip {
  position: relative;
}

.file-tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
}

.file-count-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #dc3545;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

.empty-files-message {
  text-align: center;
  color: #6c757d;
  font-style: italic;
  padding: 2rem;
}

.loading-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #0d6efd;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================
   21. CONFIGURATION SECTION
   ============================================ */

.config-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 500;
  color: #666;
  transition: all 0.3s;
}

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

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

.config-tab-content {
  display: none;
}

.config-tab-content.active {
  display: block;
}

.config-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.config-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.config-card h3 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.config-card .description {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.proyectos-summary {
  background: #f3f4f6;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.proyectos-summary p {
  margin: 0.5rem 0;
  color: var(--secondary-color);
}

.proyectos-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.proyecto-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f3f4f6;
  border-radius: 6px;
  border-left: 4px solid var(--primary-color);
}

.proyecto-info h4 {
  margin: 0 0 0.5rem 0;
  color: var(--secondary-color);
}

.proyecto-monto {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--primary-color);
  margin: 0.5rem 0;
}

.proyecto-actions {
  display: flex;
  gap: 0.5rem;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.info-item:last-child {
  border-bottom: none;
}

.info-item label {
  font-weight: 600;
  color: var(--secondary-color);
}

.info-item p {
  margin: 0;
  color: #666;
}

.empty-message {
  text-align: center;
  padding: 1.5rem;
  color: #666;
  font-style: italic;
}

/* ============================================
   22. DOCUMENTOS
   ============================================ */

.documentos-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.documento-item {
  background: #f3f4f6;
  padding: 1rem;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.documento-item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.documento-item-header i {
  font-size: 2rem;
  color: var(--primary-color);
}

.documento-info h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--secondary-color);
}

.documento-info p {
  margin: 0.25rem 0 0 0;
  font-size: 0.85rem;
  color: #666;
}

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

.documento-actions button {
  flex: 1;
  font-size: 0.85rem;
  padding: 0.5rem;
}

/* ============================================
   23. UTILITY CLASSES
   ============================================ */

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

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

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

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

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

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

.text-white {
  color: white;
}

.text-white-80 {
  color: rgba(255, 255, 255, 0.8);
}

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

.icon-large {
  font-size: 2.5rem;
}

.icon-opacity-30 {
  opacity: 0.3;
}

.text-muted {
  color: #6c757d;
}

.bg-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.bg-secondary {
  background-color: var(--secondary-color);
  color: #fff;
}

.bg-success {
  background-color: var(--success-color);
  color: #fff;
}

.bg-warning {
  background-color: var(--warning-color);
  color: #fff;
}

.bg-danger {
  background-color: var(--danger-color);
  color: #fff;
}

.bg-light {
  background-color: var(--light-color);
}

.bg-dark {
  background-color: var(--dark-color);
  color: #fff;
}

/* ============================================
   24. MOBILE MENU & RESPONSIVE
   ============================================ */

.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.mobile-sidebar-toggle {
  display: none;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 1.25rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.mobile-sidebar-toggle:hover {
  background: var(--primary-dark);
}

.mobile-sidebar-toggle:active {
  transform: scale(0.95);
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.mobile-overlay.active {
  display: block;
}

.fixed-toggle {
  display: flex !important;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1003;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 1.25rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  opacity: 1;
}

.fixed-toggle:hover {
  background-color: var(--primary-dark);
  transform: scale(1.05);
}

.sidebar.active ~ .fixed-toggle,
.sidebar:hover ~ .fixed-toggle,
.sidebar-hotspot:hover ~ .fixed-toggle {
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   25. RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
  .container {
    max-width: 100%;
    padding: 0 1rem;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-col-span-4,
  .grid-col-span-6,
  .grid-col-span-3 {
    grid-column: span 1;
  }

  .sidebar {
    width: 250px;
  }

  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  .btn {
    padding: 0.625rem 1.25rem;
  }
}

@media (max-width: 992px) {
  .sidebar {
    width: 240px;
  }

  .main-content {
    margin-left: 0;
  }

  .dashboard-summary {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .anuncios-container {
    grid-template-columns: 1fr;
  }

  .fondos-summary {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .mobile-sidebar-toggle {
    display: flex;
  }

  .dashboard-container {
    position: relative;
  }

  .sidebar {
    width: 280px;
    position: fixed;
    left: -280px;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease;
  }

  .sidebar.mobile-open {
    left: 0;
  }

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

  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

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

  .filter-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .filter-group {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .filter-group select,
  .filter-group input {
    width: 100%;
    min-width: auto;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .section-header .btn,
  .section-header .button-group {
    width: 100%;
  }

  .button-group {
    flex-direction: column;
    gap: 0.5rem;
  }

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

  .dashboard-summary {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .summary-card {
    padding: 1rem;
  }

  .summary-card .amount {
    font-size: 1.5rem;
  }

  .anuncios-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .fondos-summary {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .parcialidades-info {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 600px;
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem;
    font-size: 0.875rem;
  }

  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px;
  }

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

  .tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .config-container {
    grid-template-columns: 1fr;
  }

  .proyecto-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .proyecto-actions {
    margin-top: 1rem;
    width: 100%;
  }

  .proyecto-actions button {
    flex: 1;
  }

  .documentos-container {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .file-upload-area {
    min-height: 100px;
    padding: 1rem;
  }

  .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .file-item .btn-group {
    align-self: flex-end;
  }

  .anuncio-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .anuncio-header h4 {
    margin-bottom: 10px;
  }

  .data-table {
    font-size: 0.9rem;
  }

  .data-table th,
  .data-table td {
    padding: 8px 6px;
  }

  #acumuladoAnualModal .modal-dialog {
    margin: 10px;
    max-width: calc(100% - 20px);
  }

  #acumuladoAnualModal .table-responsive {
    font-size: 0.85rem;
  }

  #acumuladoAnualModal .card-body h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 13px;
  }

  .login-card {
    margin: 0.5rem;
    padding: 1rem;
  }

  .login-card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .form-control {
    padding: 0.625rem;
  }

  .btn {
    padding: 0.625rem 0.875rem;
    font-size: 0.8rem;
  }

  .modal-content {
    border-radius: 0;
    height: 100vh;
    max-height: 100vh;
  }

  .modal-header h3 {
    font-size: 1.125rem;
  }

  .data-table {
    font-size: 0.75rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.375rem;
  }

  .badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
  }

  .alert {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  .card-body {
    padding: 0.75rem;
  }

  .btn, .form-control, select, textarea {
    min-height: 44px;
  }

  a, button, .btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-header {
    padding: 1rem;
  }

  .sidebar-header h2 {
    font-size: 1.25rem;
  }

  .sidebar-nav a {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .sidebar-footer {
    padding: 1rem;
  }

  .anuncio-card,
  .info-card,
  .fondo-card {
    padding: 1rem;
  }

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

  .main-content {
    padding: 0.75rem;
  }

  .summary-card {
    padding: 1rem;
  }

  .summary-card h3 {
    font-size: 1rem;
  }

  .summary-card .amount {
    font-size: 1.25rem;
  }

  .summary-card .description {
    font-size: 0.8rem;
  }

  .sidebar-nav ul {
    grid-template-columns: 1fr;
  }

  .sidebar-nav a {
    padding: 1rem;
  }

  .data-table {
    font-size: 0.7rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem 0.25rem;
  }

  .data-table th:nth-child(n+4),
  .data-table td:nth-child(n+4) {
    display: none;
  }

  .section-header h2 {
    font-size: 1.25rem;
  }

  .container {
    grid-template-columns: 1fr;
    margin: 0.5rem;
  }

  .info-panel {
    padding: 2rem 1.5rem;
  }

  .info-panel img {
    height: 80px !important;
  }

  .form-panel {
    padding: 2rem 1.5rem;
  }

  .login-header img {
    height: 50px !important;
  }

  .login-container {
    padding: 0.5rem;
  }
}

/* ============================================
   26. GLOBAL THEME APPLICATION
   ============================================ */

.sidebar,
.btn-primary,
.mobile-sidebar-toggle,
.badge-primary {
  background: var(--gradient) !important;
  color: #ffffff !important;
}

.btn-primary {
  background: var(--primary-500) !important;
  border: none;
}

.btn-primary:hover {
  background: var(--primary-600) !important;
}

.sidebar h2,
.sidebar p,
.sidebar i {
  color: #ffffff !important;
}

.sidebar-nav a {
  color: rgba(255, 255, 255, 0.85) !important;
}

.sidebar-nav a:hover,
.sidebar-nav li.active a {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

body {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

.main-content {
  background-color: var(--bg-secondary) !important;
}

.summary-card,
.chart-container,
.recent-container,
.config-card,
.data-table,
.modal-content,
.fondo-card,
.anuncio-card {
  background-color: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: 0.5rem;
  box-shadow: var(--shadow) !important;
}

input, select, textarea, .form-control {
  background-color: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus) !important;
}

input::placeholder {
  color: var(--text-tertiary) !important;
}

.data-table thead,
.modal-header {
  background-color: var(--bg-tertiary) !important;
}

.data-table th, .data-table td {
  border-color: var(--border-color) !important;
}

.data-table tbody tr:hover {
  background-color: var(--bg-hover) !important;
}

[data-theme="dark"] .data-table tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02) !important;
}

.badge-success { background-color: var(--success-bg) !important; color: var(--success-text) !important; }
.badge-warning { background-color: var(--warning-bg) !important; color: var(--warning-text) !important; }
.badge-danger, .badge-error { background-color: var(--error-bg) !important; color: var(--error-text) !important; }
.badge-info { background-color: var(--info-bg) !important; color: var(--info-text) !important; }

.modal-content {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
}

.close:hover {
  color: var(--text-primary) !important;
  opacity: 0.8;
}

::-webkit-scrollbar-track { background: var(--bg-secondary) !important; }
::-webkit-scrollbar-thumb { background: var(--border-color) !important; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover) !important; }

body, .main-content, .card, .btn, input, .sidebar, .sidebar * {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .section-header h1 {
  color: white;
}
