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

:root {
  --bg-color: #0b061f; /* Deep dark purple background */
  --card-bg: rgba(255, 255, 255, 0.02);
  --card-border: rgba(255, 255, 255, 0.1);
  --primary-color: #7b2cbf; /* Vibrant Purple */
  --accent-magenta: #e00096; /* Pink/Magenta */
  --accent-cyan: #38bdf8; /* Cyan/Teal */
  --accent-peach: #ff9f1c; /* Coral/Peach */
  
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --input-bg: rgba(0, 0, 0, 0.3);
  --input-border: rgba(255, 255, 255, 0.15);
  --input-focus: var(--accent-cyan);
  
  --error-color: #ef4444;
  --success-color: #22c55e;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(123, 44, 191, 0.15), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(224, 0, 150, 0.1), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(56, 189, 248, 0.05), transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: 480px;
  padding: 20px;
  z-index: 10;
}

/* Glass & Neon effects */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.7),
    0 0 20px rgba(123, 44, 191, 0.2) inset;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
  position: relative;
  overflow: hidden;
}

/* Glossy highlight inside card */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.03), transparent);
  transform: skewX(-20deg);
  animation: gloss 4s infinite;
}

@keyframes gloss {
  0% { left: -100%; }
  20% { left: 200%; }
  100% { left: 200%; }
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header {
  text-align: center;
  margin-bottom: 32px;
}

.brand-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.header h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.header p {
  color: var(--text-muted);
  font-size: 14px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.email-input-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-field {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-main);
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
  outline: none;
}

.input-field:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3), inset 0 0 5px rgba(56, 189, 248, 0.1);
  background: rgba(0, 0, 0, 0.4);
}

.input-field::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.toggle-password {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s;
}

.toggle-password:hover {
  color: var(--accent-cyan);
}

.options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 13px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-group input {
  accent-color: var(--accent-cyan);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
}

.link:hover {
  color: #fff;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

select.input-field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2338bdf8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

select.input-field option {
  background-color: var(--bg-color);
  color: var(--text-main);
}

.email-prefix {
  flex: 1;
}

.email-domain {
  flex: 1;
}

.at-symbol {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Neon Gradient Button */
.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-magenta) 0%, #b00075 100%);
  color: white;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(224, 0, 150, 0.4);
}

.btn-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: all 0.5s;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(224, 0, 150, 0.6), 0 0 15px rgba(224, 0, 150, 0.4) inset;
}

.btn-submit:hover::before {
  left: 100%;
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-submit.loading .btn-text {
  display: none;
}

.btn-submit.loading .spinner {
  display: block;
}

.btn-submit.loading {
  pointer-events: none;
  opacity: 0.8;
}

@keyframes pulseIcon {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 8px currentColor); }
  100% { transform: scale(0.95); opacity: 0.5; }
}

.loader-icon {
  animation: pulseIcon 1.5s ease-in-out infinite;
}

/* Password Strength Indicator */
.strength-meter {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.strength-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: all 0.3s ease;
  background: var(--error-color);
}

.strength-text {
  font-size: 11px;
  margin-top: 6px;
  display: block;
  color: var(--text-muted);
  text-align: right;
}

.message-box {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.message-box.error {
  display: block;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--error-color);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.message-box.success {
  display: block;
  background-color: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: var(--success-color);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}

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

/* Background decorative neon elements based on SkyDove Image */
.blob {
  position: absolute;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.6;
  border-radius: 50%;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: var(--primary-color);
}

.blob-2 {
  bottom: -20%;
  right: -10%;
  width: 450px;
  height: 450px;
  background: var(--accent-magenta);
}

.blob-3 {
  top: 30%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: var(--accent-cyan);
}

.blob-4 {
  bottom: 10%;
  left: -20%;
  width: 250px;
  height: 250px;
  background: var(--accent-peach);
}

/* Geometric Accents inspired by SkyDove image */
.geo-shape {
  position: absolute;
  z-index: -1;
  opacity: 0.5;
}

.geo-square {
  bottom: 20%;
  right: 10%;
  width: 100px;
  height: 100px;
  border: 10px solid var(--accent-cyan);
  transform: rotate(45deg);
  box-shadow: 0 0 20px var(--accent-cyan), inset 0 0 20px var(--accent-cyan);
}

.geo-circle {
  top: 15%;
  left: 15%;
  width: 120px;
  height: 120px;
  border: 15px solid var(--accent-peach);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--accent-peach), inset 0 0 20px var(--accent-peach);
}

.footer-text {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
}

/* =========================================
   ADMIN DASHBOARD STYLES
   ========================================= */

.admin-body {
  align-items: stretch;
  padding: 0;
  margin: 0;
}

.admin-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 280px;
  height: 100vh;
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-bottom: none;
  border-right: 1px solid var(--card-border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  animation: slideRight 0.5s ease forwards;
}

@keyframes slideRight {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.sidebar-header {
  margin-bottom: 40px;
}

.admin-role {
  color: var(--accent-magenta);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-top: 4px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(123, 44, 191, 0.2), transparent);
  color: var(--text-main);
  border-left: 3px solid var(--accent-cyan);
}

.sidebar-spacer {
  flex: 1;
}

.logout-link {
  color: var(--error-color);
}
.logout-link:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-color);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
  position: relative;
}

.content-view {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.content-view.active {
  display: block;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.content-header h2 {
  font-size: 28px;
  font-weight: 700;
}

.header-select {
  width: auto;
  padding: 10px 16px;
  background-position: right 12px center;
}

.btn-small {
  width: auto;
  padding: 10px 20px;
  font-size: 14px;
}

.chart-card, .table-card, .form-card {
  border-radius: 16px;
  padding: 24px;
}

.form-card {
  max-width: 600px;
  margin: 0 auto;
}

/* Validation UI */
.validation-ui {
  margin-top: 12px;
  padding: 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}

.req-list {
  list-style: none;
  font-size: 12px;
}

.req-list li {
  margin-bottom: 4px;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.req-list li.valid {
  color: var(--success-color);
}

/* DataTables customization for Dark Theme */
.dataTable-wrapper.no-header .dataTable-container {
  border-bottom: 1px solid var(--card-border);
}

.dataTable-table {
  color: var(--text-main);
}

.dataTable-table > thead > tr > th {
  border-bottom: 1px solid var(--card-border);
  color: var(--accent-cyan);
}

.dataTable-table > tbody > tr > td {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dataTable-input, .dataTable-selector {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-main);
  border-radius: 8px;
  padding: 8px 12px;
}

.dataTable-info, .dataTable-pagination a {
  color: var(--text-muted);
}
.dataTable-pagination a:hover {
  background: rgba(255,255,255,0.1);
}
.dataTable-pagination .active a, .dataTable-pagination .active a:hover {
  background: var(--primary-color);
}

/* Stat Cards */
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
}

.stat-icon {
  background: linear-gradient(135deg, var(--accent-magenta), var(--primary-color));
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  box-shadow: 0 4px 15px rgba(224, 0, 150, 0.4);
}

.stat-details h3 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 4px 0;
  background: linear-gradient(90deg, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-details p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

/* Team Management Grid */
.team-management-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .team-management-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .admin-container {
    flex-direction: column;
    overflow-y: auto;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--card-border);
    padding: 20px;
    animation: slideDown 0.5s ease forwards;
  }

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

  .sidebar-header {
    margin-bottom: 16px;
    text-align: center;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .nav-link {
    padding: 10px 14px;
    font-size: 13px;
  }
  
  .nav-link svg {
    width: 16px;
    height: 16px;
  }

  .main-content {
    padding: 20px 16px;
    overflow-y: visible;
  }
  
  .content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .content-header h2 {
    font-size: 22px;
  }

  .email-input-group {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .at-symbol {
    display: none; /* Hide @ on mobile when stacked */
  }

  .glass-card {
    padding: 20px;
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
  }
}

