/* 
 * NEXT LEVEL PREMIUM UI 
 * PROLOGICS MYSQL BACKUP SYSTEM
 */

 :root {
  /* Core Colors */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.4);
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.2);

  /* Dark Theme Palette */
  --bg-main: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.7);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  
  /* Glassmorphism */
  --glass-bg: rgba(15, 23, 42, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(12px);

  /* Layout */
  --sidebar-w: 280px;
  --topbar-h: 72px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --font-family: 'Outfit', -apple-system, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Base Elements */
a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { color: #818cf8; }

h1, h2, h3, h4, h5, h6 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }

/* -------------------------------------
 * AUTH LAYOUT (Login Page)
 * ------------------------------------- */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(circle at top right, #1e1b4b, #0f172a 40%, #020617 100%);
  position: relative;
  overflow: hidden;
}

/* Animated Background Blobs */
.auth-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.auth-blob {
  position: absolute;
  filter: blur(80px);
  opacity: 0.5;
  border-radius: 50%;
  animation: float 10s infinite ease-in-out alternate;
}
.blob-1 { top: -10%; left: 10%; width: 400px; height: 400px; background: rgba(99, 102, 241, 0.3); animation-delay: 0s; }
.blob-2 { bottom: -10%; right: 5%; width: 500px; height: 500px; background: rgba(139, 92, 246, 0.2); animation-delay: -2s; }
.blob-3 { top: 40%; left: 40%; width: 300px; height: 300px; background: rgba(45, 212, 191, 0.15); animation-delay: -5s; }

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -50px) scale(1.1); }
}

.auth-container {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 10;
  padding: 20px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  box-shadow: 0 10px 25px var(--primary-glow);
}
.auth-brand-name {
  font-size: 32px;
  color: white;
  margin-bottom: 4px;
}
.auth-brand-name span { color: var(--text-muted); font-weight: 300; }
.auth-brand-tagline { color: var(--text-muted); font-size: 15px; letter-spacing: 0.5px; }

/* Premium Glass Card */
.auth-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Forms */
.form-group { margin-bottom: 24px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.input-icon { position: relative; }
.input-icon i, .input-icon svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 16px;
  transition: var(--transition);
}
.input-icon input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: white;
  font-size: 15px;
  font-family: inherit;
  transition: var(--transition);
}
.input-icon input::placeholder { color: #475569; }
.input-icon input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}
.input-icon input:focus + i { color: var(--primary); }

.label-flex { display: flex; justify-content: space-between; align-items: center; }
.forgot-link { font-size: 13px; color: var(--primary); }
.forgot-link:hover { text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: white;
  box-shadow: 0 8px 16px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px var(--primary-glow);
  filter: brightness(1.1);
}
.btn-block { width: 100%; padding: 14px; font-size: 16px; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover { background: rgba(255,255,255,0.05); }

/* -------------------------------------
 * MAIN DASHBOARD LAYOUT
 * ------------------------------------- */
.app-body {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-main);
}

/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 100;
}
.sidebar-header {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-logo {
  color: var(--primary);
  font-size: 24px;
  margin-right: 12px;
  text-shadow: 0 0 10px var(--primary-glow);
}
.sidebar-brand { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.brand-primary { color: white; }
.brand-secondary { color: var(--text-muted); font-weight: 400; }
.sidebar-toggle-close { display: none; }

.sidebar-nav {
  flex: 1;
  padding: 24px 16px;
  overflow-y: auto;
}
.nav-section { margin-bottom: 24px; }
.nav-section-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #475569;
  font-weight: 700;
  margin-bottom: 12px;
  padding-left: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 4px;
}
.nav-item i { font-size: 18px; width: 24px; text-align: center; }
.nav-item:hover {
  background: rgba(255,255,255,0.03);
  color: var(--text-main);
  transform: translateX(4px);
}
.nav-item.active {
  background: linear-gradient(90deg, var(--primary-glow), transparent);
  color: var(--primary);
  border-left: 3px solid var(--primary);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.1);
}
.user-info { display: flex; align-items: center; gap: 12px; }
.user-avatar {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: white;
  box-shadow: 0 4px 10px var(--primary-glow);
}
.user-details { display: flex; flex-direction: column; }
.user-name { font-weight: 600; font-size: 14px; color: white; }
.user-role { font-size: 12px; color: var(--text-muted); text-transform: capitalize; }
.btn-logout {
  color: var(--text-muted);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05);
}
.btn-logout:hover {
  background: var(--danger-glow);
  color: var(--danger);
  transform: rotate(10deg);
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent 40%);
}

.topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border-color);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  display: flex;
  align-items: center;
  padding: 0 32px;
  justify-content: space-between;
  z-index: 50;
}
.topbar-toggle { display: none; background: none; border: none; color: white; font-size: 20px; cursor: pointer; }
.topbar-breadcrumb { font-size: 20px; font-weight: 600; color: white; letter-spacing: -0.5px; }

.page-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* -------------------------------------
 * DASHBOARD WIDGETS
 * ------------------------------------- */
.dashboard-header { margin-bottom: 32px; }
.dashboard-header h2 { font-size: 28px; margin-bottom: 8px; color: white; }

/* Grid Layouts */
.grid { display: grid; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-bottom: 32px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 24px; }

/* Stat Cards */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0; transition: var(--transition);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2); border-color: rgba(255,255,255,0.15); }
.stat-card:hover::before { opacity: 1; }

.stat-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.bg-primary-light { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.bg-success-light { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.bg-danger-light { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.bg-warning-light { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.stat-content { flex: 1; }
.stat-title { font-size: 14px; color: var(--text-muted); font-weight: 500; margin-bottom: 6px; }
.stat-value { font-size: 32px; font-weight: 700; color: white; line-height: 1; }

/* Content Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.1);
}
.card-header h3 { font-size: 18px; margin: 0; }
.list-group { padding: 0; }
.list-item {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: rgba(255,255,255,0.02); }

/* Badges */
.badge { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-success { background: var(--success-glow); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-danger { background: var(--danger-glow); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-primary { background: var(--primary-glow); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }

/* Utility */
.mb-4 { margin-bottom: 24px; }
.mt-4 { margin-top: 24px; }
.text-muted { color: var(--text-muted) !important; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }

/* Flash Messages */
.flash {
  margin: 20px 32px 0;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; gap: 12px;
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.flash i { font-size: 20px; }
.flash-error i { color: var(--danger); }
.flash-error { border-left: 4px solid var(--danger); }
.flash-success i { color: var(--success); }
.flash-success { border-left: 4px solid var(--success); }
.flash-close { margin-left: auto; background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }
