/* ==========================================================================
   Paraiso Hortifruti CRM - Modern Glassmorphic Stylesheet
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #06b6d4;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
  --text-main: #ffffff;
  --text-muted: #e2e8f0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #ffffff;
  background: linear-gradient(135deg, #1e3c72, #2a5298, #0f2027);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
  min-height: 100vh;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Glassmorphic Components */
.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.35);
}

.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.45);
}

/* Form inputs & dropdowns with guaranteed contrast */
.glass-input, input.glass, select.glass, textarea.glass {
  background-color: rgba(30, 60, 114, 0.45) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 0.5rem;
  font-size: 0.9375rem !important; /* 15px */
  transition: border-color 0.2s, box-shadow 0.2s;
}

.glass-input:focus, input.glass:focus, select.glass:focus, textarea.glass:focus {
  outline: none;
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.35) !important;
}

select.glass option, .glass-input option {
  background-color: #1e3c72 !important;
  color: #ffffff !important;
  padding: 8px;
}

/* Buttons */
.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem; /* 14px */
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1e3c72);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #047857);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.btn-success:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

/* Tables */
table tbody tr {
  transition: background-color 0.15s ease;
}

table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

table tbody tr.row-selected {
  background-color: rgba(59, 130, 246, 0.25) !important;
}

/* Custom Checkbox */
input[type="checkbox"] {
  accent-color: #3b82f6;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 0.25rem;
  cursor: pointer;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(30, 60, 114, 0.35);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Stat KPI Cards */
.kpi-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.kpi-card.kpi-amber::before { background: #f59e0b; }
.kpi-card.kpi-emerald::before { background: #10b981; }
.kpi-card.kpi-rose::before { background: #f43f5e; }
.kpi-card.kpi-blue::before { background: #3b82f6; }
.kpi-card.kpi-purple::before { background: #a855f7; }
.kpi-card.kpi-cyan::before { background: #06b6d4; }
