/* =============================================
   RUÍNAS DO SOL - Solar Theme CSS
   ============================================= */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&family=Inter:wght@400;500;600&family=Playfair+Display:ital,wght@0,700;1,900&family=Plus+Jakarta+Sans:wght@400;600;700;800&family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

/* ---- CSS Variables ---- */
:root {
  --color-solar: #4ade80;
  --color-sunset: #22c55e;
  --color-coral: #059669;
  --color-sand: #f0fdf4;
  --color-ocean: #0ea5e9;
  --color-deep: #0369a1;
  --color-dark: #1f2937;
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-primary: #2E7D32;
  --color-surface: #f5fdf5;
  --color-bg: #f0fdf4;
  --shadow-solar: 0 32px 64px -12px rgba(46, 125, 50, 0.12);
  --shadow-card: 0 4px 24px rgba(46, 125, 50, 0.08);
  --radius: 1rem;
  --radius-lg: 2rem;
  --radius-full: 9999px;
  --transition: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--color-bg);
  color: #342f11;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */
.font-headline {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.font-editorial {
  font-family: 'Playfair Display', serif;
}

.font-body {
  font-family: 'Inter', sans-serif;
}

.gradient-text {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Gradients ---- */
.sunset-gradient {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 50%, #059669 100%);
}

.sunset-overlay {
  background: linear-gradient(180deg, rgba(46, 125, 50, 0.4) 0%, rgba(34, 197, 94, 0.1) 50%, transparent 100%);
}

.ocean-gradient {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
}

/* ---- Material Symbols ---- */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  line-height: 1;
  user-select: none;
}

.material-symbols-outlined.filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ---- Glass Effect ---- */
.glass {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: rgba(255, 255, 255, 0.7);
}

.glass-dark {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: rgba(18, 14, 0, 0.8);
}

/* ---- Cards ---- */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-solar);
  transform: translateY(-2px);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: #fff;
  box-shadow: 0 4px 20px rgba(74, 222, 128, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(74, 222, 128, 0.5);
}

.btn-secondary {
  background: #fff;
  color: var(--color-primary);
  border: 2px solid rgba(46, 125, 50, 0.2);
}

.btn-secondary:hover {
  background: #f0fdf4;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  padding: 0.5rem;
  border-radius: var(--radius-full);
}

.btn-ghost:hover {
  background: rgba(74, 222, 128, 0.1);
}

/* ---- Form Inputs ---- */
.input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  border: none;
  background: #dcfce7;
  color: #342f11;
  font-size: 0.9rem;
  transition: var(--transition);
}

.input:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.input::placeholder {
  color: rgba(46, 125, 50, 0.4);
}

.input-icon {
  position: relative;
}

.input-icon .material-symbols-outlined {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(46, 125, 50, 0.5);
  pointer-events: none;
}

.input-icon input {
  padding-left: 3rem;
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-gold {
  background: #f0fdf4;
  color: #14532d;
}

.badge-orange {
  background: #d1fae5;
  color: #065f46;
}

.badge-green {
  background: #d1fae5;
  color: #065f46;
}

.badge-red {
  background: #fee2e2;
  color: #991b1b;
}

.badge-blue {
  background: #e0f2fe;
  color: #075985;
}

.badge-gray {
  background: #f3f4f6;
  color: #4b5563;
}

/* ---- Scrollbar ---- */
.scrollbar-hidden::-webkit-scrollbar {
  display: none;
}

.scrollbar-hidden {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f0fdf4;
}

::-webkit-scrollbar-thumb {
  background: #4ade80;
  border-radius: 3px;
}

/* ---- Like Button Animation ---- */
.btn-like {
  transition: transform 0.15s ease, color 0.15s ease;
}

.btn-like.liked .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  color: #ef4444;
}

.btn-like:active {
  transform: scale(1.3);
}

@keyframes heartBeat {
  0% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.4);
  }

  60% {
    transform: scale(0.9);
  }

  100% {
    transform: scale(1);
  }
}

.heart-animate {
  animation: heartBeat 0.4s ease;
}

/* ---- Feed Cards ---- */
.feed-card {
  background: #fff;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 32px 64px -12px rgba(46, 125, 50, 0.08);
}

.feed-card-img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

/* ---- Admin Sidebar ---- */
.sidebar {
  width: 280px;
  background: #fefce8;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  border-right: 1px solid rgba(46, 125, 50, 0.08);
  display: flex;
  flex-direction: column;
  padding: 2rem 0;
  box-shadow: 4px 0 30px rgba(46, 125, 50, 0.06);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.5rem;
  margin: 0.25rem 1rem;
  color: #635c3a;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 1rem;
  text-decoration: none;
}

.sidebar-link:hover {
  color: #2E7D32;
  background: #fff;
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.05);
  transform: translateX(4px);
}

.sidebar-link.active {
  color: #fff;
  background: linear-gradient(135deg, #4ade80, #22c55e);
  box-shadow: 0 8px 20px rgba(74, 222, 128, 0.25);
}

.sidebar-link.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1;
}

.sidebar-link .material-symbols-outlined {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.sidebar-link:hover .material-symbols-outlined {
  transform: scale(1.1);
}

/* ---- Kanban ---- */
.kanban-col {
  min-width: 300px;
  width: 300px;
  background: #dcfce7;
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
}

.kanban-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  cursor: grab;
  transition: var(--transition);
  border: 2px solid transparent;
}

.kanban-card:hover {
  border-color: rgba(74, 222, 128, 0.3);
}

.kanban-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
  box-shadow: var(--shadow-solar);
}

.kanban-col.drag-over {
  background: rgba(74, 222, 128, 0.15);
}

/* ---- Timeline ---- */
.timeline-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(220, 252, 231, 0.5);
  transition: var(--transition);
}

.timeline-item:hover {
  background: #dcfce7;
}

.timeline-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  margin-top: 0.375rem;
  flex-shrink: 0;
}

.timeline-line {
  width: 1px;
  flex: 1;
  background: rgba(134, 183, 150, 0.3);
  margin: 0.25rem 0;
}

/* ---- Tables ---- */
.table-rds {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-rds thead th {
  background: #dcfce7;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #635c3a;
  border-bottom: 2px solid rgba(134, 183, 150, 0.3);
}

.table-rds thead th:first-child {
  border-radius: var(--radius) 0 0 0;
}

.table-rds thead th:last-child {
  border-radius: 0 var(--radius) 0 0;
}

.table-rds tbody tr {
  transition: background 0.15s;
}

.table-rds tbody tr:hover td {
  background: rgba(220, 252, 231, 0.5);
}

.table-rds tbody td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(134, 183, 150, 0.15);
  font-size: 0.875rem;
}

/* ---- Notifications Toast ---- */
.toast-container {
  position: fixed;
  top: 5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-solar);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  pointer-events: all;
  animation: slideIn 0.3s ease;
  max-width: 360px;
  border-left: 4px solid var(--color-solar);
}

@keyframes slideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

.toast.removing {
  animation: slideOut 0.3s ease forwards;
}

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

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

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

/* ---- Progress Bars ---- */
.progress-bar {
  height: 8px;
  background: #efe3ae;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #4ade80, #22c55e);
  transition: width 0.5s ease;
}

/* ---- Masonry Grid ---- */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: 10px;
  gap: 1rem;
}

.masonry-sm {
  grid-row-end: span 20;
}

.masonry-md {
  grid-row-end: span 30;
}

.masonry-lg {
  grid-row-end: span 40;
}