@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
  --bg-dark: #0b011d;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.1);
  --primary-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  --secondary-gradient: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --border-color: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(12px);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(126, 34, 206, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(249, 115, 22, 0.1) 0%, transparent 40%);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 40px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.logo span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #fff;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 60px 0;
  min-height: 70vh;
}

.hero-content {
  flex: 1;
}

.hero-title {
  font-size: 56px;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-title span {
  display: block;
}

.hero-title .accent-1 { color: #f43f5e; }
.hero-title .accent-2 { color: #ffffff; }
.hero-title .accent-3 { color: #38bdf8; }

.hero-desc {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 30px;
  max-width: 500px;
}

.hero-visual {
  flex: 1;
  position: relative;
}

.hero-image {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 30px;
  transition: transform 0.3s, background 0.3s;
}

.card:hover {
  background: var(--bg-card-hover);
}

.card h3 {
  font-size: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Auth */
.auth-panel {
  max-width: 720px;
  margin: 40px auto;
  overflow: hidden;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: 20px;
}

.auth-banner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  min-height: 190px;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.92), rgba(59, 130, 246, 0.78)),
    linear-gradient(45deg, rgba(255, 255, 255, 0.16) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0.16) 75%, transparent 75%);
  background-size: auto, 42px 42px;
  border-bottom: 1px solid var(--border-color);
}

.auth-kicker {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 700;
  color: white;
}

.auth-banner h3 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.1;
}

.auth-banner p {
  max-width: 460px;
  color: rgba(255, 255, 255, 0.86);
}

.auth-mark {
  display: grid;
  place-items: center;
  flex: 0 0 86px;
  width: 86px;
  height: 86px;
  align-self: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 28px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.auth-actions {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(230px, 1fr);
  gap: 18px;
  align-items: end;
  padding: 28px 34px 34px;
}

.auth-actions .muted {
  grid-column: 1 / -1;
  margin: 0;
}

.role-picker {
  margin: 0;
}

#googleBtnWrap {
  min-height: 44px;
  display: flex;
  align-items: center;
}

.app-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.app-tab {
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s ease;
}

.app-tab:hover {
  background: rgba(255, 255, 255, 0.1);
}

.app-tab.active {
  background: var(--accent-gradient);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-family: inherit;
  font-size: 16px;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(249, 115, 22, 0.5);
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--secondary-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.5);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

input, textarea, select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  color: white;
  font-family: inherit;
  transition: border-color 0.3s, background 0.3s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #f97316;
  background: rgba(255, 255, 255, 0.1);
}

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

th {
  text-align: left;
  padding: 0 10px 10px 10px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
}

td {
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
}

td:first-child { border-radius: 12px 0 0 12px; }
td:last-child { border-radius: 0 12px 12px 0; }

/* Grid */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Utilities */
.hidden { display: none !important; }
.space { height: 20px; }
.muted { color: var(--text-muted); font-size: 14px; }

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.ok { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.warn { background: rgba(234, 179, 8, 0.2); color: #fde047; }
.danger { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }

/* Responsive */
/* Bottom Navigation */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 450px;
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  height: 76px;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  padding: 0 15px;
}

.bottom-nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-item svg {
  z-index: 2;
  transition: all 0.3s;
  width: 26px;
  height: 26px;
}

.bottom-nav-item.active {
  color: #3b82f6;
}

.bottom-nav-item.active svg {
  transform: translateY(-8px);
}

.indicator {
  position: absolute;
  bottom: 12px;
  width: 36px;
  height: 5px;
  background: #3b82f6;
  border-radius: 10px;
  opacity: 0;
  transform: scaleX(0);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-item.active .indicator {
  opacity: 1;
  transform: scaleX(1);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
}

.nav-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 10px;
  height: 10px;
  background: #ff4757;
  border-radius: 50%;
  border: 2px solid #111;
  z-index: 10;
  box-shadow: 0 0 8px rgba(255, 71, 87, 0.5);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  object-fit: cover;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* App Pages */
.app-page {
  animation: fadeIn 0.4s ease-out;
}

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

/* Responsive adjustment for bottom nav */
@media (max-width: 900px) {
  .bottom-nav {
    display: flex;
  }
  
  /* Add padding to body to prevent content being hidden behind bottom nav */
  body {
    padding-bottom: 100px;
  }
}

@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero-title { font-size: 40px; }
  .nav-links { display: none; }
  .app-tabs { display: none; }
  .auth-banner { flex-direction: column; }
  .auth-mark { align-self: flex-start; }
  .auth-actions { grid-template-columns: 1fr; }
}
/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

/* Action Buttons in Tables */
.action-buttons {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.4);
}

/* Checkbox Group */
.checkbox-group-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 15px;
  margin-top: 5px;
  scrollbar-width: thin;
  scrollbar-color: var(--text-muted) transparent;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.2s;
}

.checkbox-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.checkbox-item input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #f97316;
  margin: 0;
}

/* Notifications */
.notification {
  pointer-events: auto;
  min-width: 280px;
  max-width: 380px;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(15, 15, 25, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: all 0.3s;
}

.notification.hiding {
  opacity: 0;
  transform: translateX(50px) scale(0.9);
}

.notification.info { border-left: 4px solid #3b82f6; }
.notification.success { border-left: 4px solid #22c55e; }
.notification.error { border-left: 4px solid #ef4444; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(100px) scale(0.9); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
