/* 
  Hood Sailmaking Platform 
  "Deep Nautical" Design System (Vanilla Version)
*/

:root {
  /* LIGHT THEME (Default) */
  --hood-blue: #142F85; 
  --hood-blue-dark: #0A1B4F;
  --accent-color: #E11D48;
  
  --bg-body: #F4F7FA;
  --bg-header: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-input: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --font-main: 'Inter', system-ui, sans-serif;
  --font-title: 'Outfit', sans-serif;
}

[data-theme="dark"] {
  --bg-body: #0F172A;
  --bg-header: #1E293B;
  --bg-card: #1E293B;
  --bg-input: #0F172A;
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --border-color: #334155;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

/* Layout Components */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 8%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar.scrolled {
  padding: 10px 8%;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
}

/* Unified Admin Header */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 5%;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 80px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 25px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-admin {
  height: 58px; /* 20% larger than 48px */
  display: block;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.breadcrumbs a { color: var(--hood-blue); }
.breadcrumbs span { color: var(--text-main); font-weight: 700; }

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 15px;
  border-right: 1px solid var(--border-color);
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.header-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.action-btn:hover {
  background: var(--bg-header);
  border-color: var(--hood-blue);
  color: var(--hood-blue);
}

.admin-card-launcher {
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.admin-card-launcher:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--hood-blue);
}

.admin-card-launcher h3 { color: var(--text-main); }
.admin-card-launcher p { color: var(--text-muted); }

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 15px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-size: 14px;
}

.btn-primary {
  background-color: var(--hood-blue);
  color: white;
}

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

.btn-outline {
  background-color: transparent;
  color: var(--hood-blue);
  border: 2px solid var(--hood-blue);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 0 8%;
  color: white;
  overflow: hidden;
  background-color: var(--hood-blue-dark);
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(90deg, rgba(10, 27, 79, 0.9) 0%, rgba(10, 27, 79, 0.4) 100%);
  z-index: 2;
}

.hero-img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.8;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  margin: 20px 0;
}

.hero h1 span {
  background: linear-gradient(90deg, #FFFFFF 0%, #CBD5E1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

 /* --- NOTIFICACIONES TOAST (V28.2) --- */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    color: var(--text-main);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    border: 1px solid var(--border-color);
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
}

.toast.show {
    transform: translateX(0);
}

.toast-success { border-left: 4px solid #10b981; }
.toast-error { border-left: 4px solid #ef4444; }
.toast-info { border-left: 4px solid var(--hood-blue); }

.toast i { width: 18px; height: 18px; }
.toast-success i { color: #10b981; }
.toast-error i { color: #ef4444; }
.toast-info i { color: var(--hood-blue); }

.toast span { font-size: 13px; font-weight: 600; }

/* --- MODALES ADMINISTRATIVOS (V23.1) --- */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  padding: 20px;
}

.modal-content {
  background: var(--bg-card);
  color: var(--text-main);
  margin: 40px auto;
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  max-width: 600px;
  position: relative;
  transition: all 0.3s ease;
}

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

.modal-close {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 20px;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
}

.modal-close:hover {
  background: #ef4444 !important;
  color: white !important;
  border-color: #ef4444 !important;
}

.modal-header h2 {
  font-size: 20px;
  font-family: 'Outfit', sans-serif;
  color: var(--hood-blue);
  margin: 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  line-height: 1.6;
}

/* Scroll Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  animation: fadeInUp 0.8s ease forwards;
}

/* Auth Cards */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 450px;
  background: var(--bg-card);
  color: var(--text-main);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}

.form-control:focus {
  border-color: var(--hood-blue);
  box-shadow: 0 0 0 3px rgba(20, 47, 133, 0.1);
}

/* Modales Dinámicos */
.modal-content {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
}

/* Tablas Dinámicas */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
}

th {
  background: var(--hood-blue);
  color: white;
  text-align: left;
  padding: 16px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

/* Componente Global de Imágenes en Tablas */
.admin-list-img {
  width: 58px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
  cursor: zoom-in;
  background: var(--bg-body);
}

.admin-list-img:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* --- IMAGE UPLOAD COMPONENT (V23.0) --- */
.image-upload-box {
    width: 100%;
    aspect-ratio: 16/9;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    background: var(--bg-card);
}

.image-upload-box:hover {
    border-color: var(--hood-blue);
    background: rgba(20, 47, 133, 0.05);
}

.image-upload-preview {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-upload-overlay {
    background: rgba(15, 23, 42, 0.6);
    color: white;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.image-upload-box:hover .image-upload-overlay {
    opacity: 1;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Visor de Imágenes Pro */
.image-viewer-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  cursor: zoom-out;
}

.image-viewer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px;
}

.image-viewer-content img {
  width: 90vw;
  height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease;
}
