/* --- File: assets/css/style.css --- */

/* 1. GOOGLE FONTS & VARIABLES */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand Colors extracted from Logo */
  --brand-blue: #569bd5; /* The AdddZero Logo Blue */
  --brand-blue-hover: #407ab0;

  /* Nature Colors extracted from Dragonfly Image */
  --eco-green-dark: #1b3a2b; /* Deep background green */
  --eco-green-light: #6fb985; /* Bright leaf green */
  --eco-accent: #a8d5ba;

  /* Neutrals */
  --text-dark: #0f1f18;
  --text-muted: #6c757d;
  --bg-light: #f4f8f6; /* Very subtle green tint to white */
  --surface-white: #ffffff;

  /* UI Properties */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 50rem;

  --shadow-soft: 0 10px 30px -10px rgba(27, 58, 43, 0.1);
  --shadow-hover: 0 15px 35px -10px rgba(86, 155, 213, 0.25);
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

/* 2. NAVBAR (The Eco-Tech Header) */
.navbar {
  background-color: var(--eco-green-dark) !important; /* Overrides bg-dark */
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.navbar-brand span {
  font-weight: 700;
  letter-spacing: -0.5px;
  font-size: 1.4rem;
  background: linear-gradient(90deg, #fff, var(--brand-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

/* 3. CARDS (Soft, Rounded, Floating) */
.card {
  border: none;
  border-radius: var(--radius-md);
  background: var(--surface-white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.card:hover {
  /* Subtle lift effect */
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-weight: 600;
  padding: 1.25rem 1.5rem;
}

/* 4. BUTTONS (Curvy like the logo) */
.btn {
  border-radius: var(--radius-pill); /* Pill shape matches logo curves */
  padding: 0.6rem 1.5rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background-color: var(--brand-blue);
  box-shadow: 0 4px 15px rgba(86, 155, 213, 0.3);
}

.btn-primary:hover, .btn-primary:active, .btn-primary:focus {
  background-color: var(--brand-blue-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(86, 155, 213, 0.4);
}

.btn-outline-secondary {
  border: 2px solid #e9ecef;
  color: var(--text-dark);
}

.btn-outline-secondary:hover {
  background-color: var(--text-dark);
  border-color: var(--text-dark);
}

/* 5. FORMS (Clean and Spacious) */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1px solid #e0e0e0;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  background-color: #fcfcfc;
}

.form-control:focus, .form-select:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(86, 155, 213, 0.1);
  background-color: #fff;
}

.form-label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* 6. LOGIN PAGE SPECIFICS (The Dragonfly Theme) */
.login-container {
  min-height: 100vh;
  background-color: #fff;
}

.bg-image-container {
  position: relative;
  /* Use the dragonfly image or a high-quality placeholder of similar style */
  background: url('../img/img.png') center center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  text-align: center;
}

/* The Overlay - Green/Blue tint to make text readable and blend logo */
.bg-image-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Gradient from Deep Forest to Logo Blue */
  background: linear-gradient(135deg, rgba(13, 43, 34, 0.85), rgba(86, 155, 213, 0.6));
  z-index: 1;
}

.bg-image-container > * {
  z-index: 2;
  position: relative;
}

.bg-image-container h1 {
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

/* Login Form Box */
.form-box {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
}

.form-section {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
}

/* 7. CUSTOM COMPONENTS */

/* The AdddZero Spinner/Loader (Custom Morphing) */
.az-loader-morph {
  width: 40px;
  height: 40px;
  background-color: var(--brand-blue);
  border-radius: 50%;
  animation: morph 2s ease-in-out infinite;
}

@keyframes morph {
  0% { border-radius: 50%; transform: scale(1); background-color: var(--brand-blue); }
  50% { border-radius: 10%; transform: scale(0.8) rotate(90deg); background-color: var(--eco-green-light); }
  100% { border-radius: 50%; transform: scale(1) rotate(180deg); background-color: var(--brand-blue); }
}

/* Global Loader Overlay */
#global-loader {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255,255,255,0.9);
  z-index: 9999;
  display: none; /* JS toggles 'd-flex' */
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Badges updates */
.badge {
  padding: 0.5em 0.8em;
  font-weight: 500;
  border-radius: 6px;
}
.bg-primary-subtle { background-color: #e3f2fd !important; color: var(--brand-blue) !important; }
.text-primary { color: var(--brand-blue) !important; }

/* Table styling */
.table thead th {
  font-weight: 600;
  letter-spacing: 0.5px;
  border-bottom-width: 1px;
  background-color: #f8f9fa;
  color: var(--text-muted);
}
.table-hover tbody tr:hover {
  background-color: #f1f8ff;
}



/* Custom Leaflet Marker for Dashboard */
.custom-asset-pin {
  background-color: white;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.custom-asset-pin:hover {
  transform: scale(1.2);
  border-color: var(--brand-blue); /* or #0d6efd */
  z-index: 1000 !important;
}

.custom-asset-pin img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Default placeholder color if no image */
.custom-asset-pin-placeholder {
  background-color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}
