/* Fixcorp Onboarding Portal - Dark Black & Cyberpunk Red Theme (Matching fixcorp.in) */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-primary: #000000;
  --bg-surface: #0a0a0c;
  --bg-sidebar: #050507;
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-white: #ffffff;
  
  --primary: #ef4444;
  --indigo: #dc2626;
  --indigo-hover: #b91c1c;
  --emerald: #ef4444;
  --emerald-hover: #991b1b;
  --amber: #f59e0b;
  --rose: #ef4444;

  --border-light: rgba(239, 68, 68, 0.2);
  --border-dark: rgba(239, 68, 68, 0.4);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.8);
  --shadow-md: 0 4px 15px rgba(239, 68, 68, 0.15);
  --shadow-lg: 0 10px 30px rgba(239, 68, 68, 0.25);
  --radius-md: 10px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
}

/* App Container Layout */
.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  color: var(--text-white);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 1001;
  border-right: 1px solid var(--border-light);
  transition: transform 0.3s ease;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 24px 8px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: #ff0000;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.brand-text h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-text span {
  color: var(--primary);
}

.mobile-close-btn {
  display: none;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: #a1a1aa;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.nav-item a:hover, .nav-item.active a {
  background-color: rgba(255, 0, 0, 0.15);
  color: var(--text-white);
}

.nav-item.active a {
  background: #ff0000;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  background: #000000;
}

/* Top Header Navbar */
.top-header {
  height: 70px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 99;
}

.mobile-toggle-btn {
  display: none;
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 6px;
}

.header-title h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  background-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.user-name-text {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

/* Page Body Layout */
.page-body {
  padding: 28px;
  flex: 1;
}

/* Cards System */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background-color: #0d0d10;
  padding: 14px 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #a1a1aa;
  border-bottom: 1px solid var(--border-light);
}

.data-table td {
  padding: 16px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
  color: #e4e4e7;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background-color: rgba(239, 68, 68, 0.05);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.badge-active, .badge-approved { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-pending { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-submitted { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
.badge-email_sent { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.badge-rejected { background: rgba(239, 68, 68, 0.25); color: #fca5a5; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #ff0000;
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}
.btn-primary:hover {
  background: #cc0000;
  transform: translateY(-1px);
}

.btn-emerald {
  background: #ff0000;
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: #e4e4e7;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.2);
}

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

/* Forms & Inputs */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #a1a1aa;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  height: 48px;
  background-color: #050507;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0 16px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: #0a0a0c;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.8);
  overflow: hidden;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  background: #050507;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Dashboard Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: #ff0000;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(255, 0, 0, 0.12);
  border: 1px solid rgba(255, 0, 0, 0.3);
  color: #ff0000;
  flex-shrink: 0;
}

.stat-info h3 {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.stat-info p {
  font-size: 12px;
  font-weight: 600;
  color: #a1a1aa;
  margin: 2px 0 0 0;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sidebar {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    display: none;
  }
  .sidebar-overlay.active { display: block; }
  .mobile-toggle-btn, .mobile-close-btn { display: block; }
  .top-header { padding: 0 16px; }
  .page-body { padding: 16px; }
}

@media (max-width: 500px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   MODAL SYSTEM - Premium Dark Style
   ============================================= */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease;
}

.modal-backdrop.show {
  display: flex;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: #0d0d10;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(239, 68, 68, 0.08);
  animation: modalSlideUp 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(239, 68, 68, 0.15);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #f4f4f5;
  margin: 0;
}

.modal-header button {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #a1a1aa;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}

.modal-header button:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.modal-body {
  padding: 20px 24px;
}

.modal-body p {
  font-size: 13px;
  color: #71717a;
  margin-bottom: 16px;
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(239, 68, 68, 0.1);
}

/* Close modal on backdrop click */
.modal-backdrop > *:not(.modal-box) {
  pointer-events: none;
}

