@import url('https://fonts.googleapis.com/css2?family=Wix+Madefor+Display:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&display=swap');
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --background: #ffffff;
    --foreground: #433c3a;
    --card: #ffffff;
    --card-foreground: #433c3a;
    --popover: #ffffff;
    --popover-foreground: #433c3a;
    --primary: #f84525;
    --primary-foreground: #ffffff;
    --secondary: #f0f4f8;
    --secondary-foreground: #0f172a;
    --muted: #f0f4f8;
    --muted-foreground: #000000;
    --accent: #f0f4f8;
    --accent-foreground: #0f172a;
    --destructive: #ef4444;
    --destructive-foreground: #f8fafc;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --ring: #f84525;
    --radius: 0.5rem;
    --primary-glow: #f87d57;
    --gradient-primary: linear-gradient(135deg, #f84525, #f87d57);
    --shadow-elegant: 0 10px 30px -10px #f845251a;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-caveat: 'Caveat', cursive;
    --font-sans: "Wix Madefor Display", sans-serif;
  }

  .dark {
    --background: #141921;
    --foreground: #d4d4d5;
    --card: #1b2027;
    --card-foreground: #d4d4d5;
    --popover: #1b2027;
    --popover-foreground: #d4d4d5;
    --primary: #f84525;
    --primary-foreground: #ffffff;
    --secondary: #2d3135;
    --secondary-foreground: #d4d4d5;
    --muted: #2d3135;
    --muted-foreground: #91989e;
    --accent: #2d3135;
    --accent-foreground: #d4d4d5;
    --destructive: #ef4444;
    --destructive-foreground: #f8fafc;
    --border: #2d3135;
    --input: #2d3135;
    --ring: #f84525;
    --gradient-primary: linear-gradient(135deg, #f84525, #f87d57);
    --shadow-elegant: 0 10px 30px -10px #f8452533;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
    font-family: var(--font-sans);
  }
}

/* Karibeo specific styles */
.font-caveat {
  font-family: var(--font-caveat) !important;
}

.header-banner {
  background: url(https://www.transparenttextures.com/patterns/cubes.png), linear-gradient(to right, rgb(248 69 37), rgb(247, 183, 51));
}

.card {
  backdrop-filter: blur(5px);
  background-color: rgba(255, 255, 255, 0.7);
}

.dark .card {
  background-color: rgba(27, 32, 39, 0.9);
}

.decoration {
  position: absolute;
  z-index: -1;
}

.decoration.blur-2 {
  width: 300px;
  height: 300px;
  filter: blur(200px);
  bottom: 10%;
  left: 5%;
  background-color: rgba(248, 69, 37, 0.2);
}

.decoration.blur-3 {
  width: 300px;
  height: 300px;
  filter: blur(200px);
  top: 13%;
  right: 0%;
  background-color: rgba(248, 69, 37, 0.2);
}

.widget-card {
  transition: all 0.3s ease-out;
}

.widget-card:hover {
  transform: translate(0px, -6px);
}

/* Front-end specific Karibeo original styling */
.karibeo-front {
  font-family: "Wix Madefor Display", sans-serif;
  background-color: #f8f4f3;
  color: #433c3a;
}

/* Gradient text for hero section */
.text-gradient {
  background: linear-gradient(135deg, #F84525, #ff6b35);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced shadows */
.shadow-strong {
  box-shadow: 0 20px 60px rgba(248, 69, 37, 0.15);
}

/* Hero button styling */
.btn-hero {
  background: linear-gradient(135deg, #F84525, #ff6b35);
  border: none;
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(248, 69, 37, 0.3);
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(248, 69, 37, 0.4);
}

/* Backdrop blur cards */
.glass-card {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Enhanced Dashboard CSS - Original Karibeo Styling */
.dashboard-page {
  font-family: "Wix Madefor Display", sans-serif;
  background-color: #f8f4f3;
  color: #433c3a;
}

/* Sidebar Enhanced Styling */
.sidebar-enhanced {
  background-color: transparent;
  border-right: 5px solid #fff;
  min-width: 320px;
  max-width: 320px;
}

.sidebar-enhanced .sidebar-brand_text {
  color: #212529;
  font-weight: 600;
  font-family: 'Wix Madefor Display', sans-serif;
}

.sidebar-enhanced .sidebar-brand_text span {
  color: #F84525;
  font-family: 'Caveat', cursive;
}

.sidebar-enhanced .sidebar-nav ul li a {
  color: #433c3a;
  border-radius: 0.6rem;
  margin-bottom: 2px;
  border-left: 5px solid transparent;
  border-radius: 0 30px 30px 0;
  padding: 10px 0 10px 27px;
  transition: all 0.3s ease;
}

.sidebar-enhanced .sidebar-nav ul li a:hover {
  color: #F84525;
}

.sidebar-enhanced .sidebar-nav ul li.mm-active a {
  color: #F84525;
  background-color: rgba(248, 69, 37, 0.1);
  border-color: #F84525;
}

/* Form Styling */
.form-control-enhanced,
.form-select-enhanced {
  font-size: 14px;
  border-radius: 0.8rem;
  height: 42px;
  border: 1px solid #ced4da;
  transition: border-color 0.3s ease;
}

.form-control-enhanced:focus,
.form-select-enhanced:focus {
  border-color: #F84525;
  box-shadow: 0 0 0 0.2rem rgba(248, 69, 37, 0.25);
}

/* Card Enhanced */
.card-enhanced {
  border-radius: 1rem;
  backdrop-filter: blur(5px);
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Button Enhanced */
.btn-primary-enhanced {
  background-color: #F84525;
  border-color: #F84525;
  color: white;
  border-radius: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary-enhanced:hover {
  background-color: #eb3616;
  border-color: #eb3616;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(248, 69, 37, 0.3);
}

/* File Upload Enhanced */
.file-upload-enhanced {
  border: 2px dashed #F84525;
  border-radius: 1rem;
  background-color: transparent;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.file-upload-enhanced:hover {
  background-color: rgba(248, 69, 37, 0.05);
}

/* Navbar Enhanced */
.navbar-enhanced {
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(15px);
  height: 80px;
  z-index: 11;
}

.navbar-enhanced .search-enhanced {
  width: 360px;
}

.navbar-enhanced .search-enhanced .search__text {
  background-color: #fff;
  border: 1px solid #fff;
  height: 48px;
  border-radius: 0.8rem;
  padding-left: 48px;
}

.navbar-enhanced .search-enhanced .search__text:focus {
  border-color: #F84525 !important;
}

/* Section Header */
.section-header-enhanced {
  margin-bottom: 2rem;
}

.section-header-enhanced .section-header__subtitle {
  font-family: 'Caveat', cursive;
  font-size: 2rem;
  font-weight: 500;
  color: #F84525;
  margin-bottom: 0.5rem;
}

.section-header-enhanced .section-header__title {
  font-size: 2.5rem;
  font-weight: 600;
  color: #433c3a;
  margin-bottom: 1rem;
}

/* Region Cards */
.region-card-enhanced {
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  height: 458px;
  transition: transform 0.3s ease;
}

.region-card-enhanced:hover {
  transform: translateY(-5px);
}

.region-card-enhanced .region-card-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: white;
}

/* Background Primary */
.bg-primary-enhanced {
  background-color: #F84525 !important;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="lines" patternUnits="userSpaceOnUse" width="10" height="10"><path d="M0,0 L10,10 M10,0 L0,10" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23lines)"/></svg>');
}

/* Button Icon */
.btn-icon-md {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  transition: all 0.3s ease;
}

.btn-icon-md:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Mobile-First Responsive Design */
@media (max-width: 768px) {
  /* Mobile App-Like Layout */
  .admin-dashboard,
  .dashboard-layout {
    min-height: 100vh;
    background: #ced4da;
  }

  /* Mobile Navigation */
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: hsl(var(--card));
    border-top: 1px solid hsl(var(--border));
    z-index: 50;
    padding: 0.5rem;
  }

  /* Mobile Header */
  .mobile-header {
    position: sticky;
    top: 0;
    background: hsl(var(--background));
    border-bottom: 1px solid hsl(var(--border));
    z-index: 40;
    padding: 1rem;
  }

  /* Mobile Content */
  .mobile-content {
    padding: 1rem;
    padding-bottom: 5rem; /* Space for bottom nav */
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
  }

  /* Mobile Cards */
  .mobile-card {
    border-radius: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px hsl(var(--primary) / 0.1);
  }

  /* Mobile Buttons */
  .mobile-btn {
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    min-height: 44px; /* Touch-friendly */
    transition: var(--transition-smooth);
  }

  /* Mobile Form Controls */
  .mobile-input {
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid hsl(var(--border));
    min-height: 44px;
  }

  /* Mobile Grid Adjustments */
  .mobile-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .mobile-grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* Mobile Services Grid */
  .services-grid-mobile {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* Mobile Typography */
  .mobile-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
  }

  .mobile-subtitle {
    font-size: 1rem;
    color: hsl(var(--muted-foreground));
  }

  /* Mobile Status Badges */
  .mobile-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
  }

  /* Mobile Safe Areas */
  .mobile-safe-top {
    padding-top: env(safe-area-inset-top);
  }

  .mobile-safe-bottom {
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* Hide desktop elements on mobile */
  .desktop-only {
    display: none;
  }

  /* Mobile-specific spacing */
  .mobile-spacing {
    padding: 1rem;
    margin: 0.5rem 0;
  }
}