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

:root {
  /* Corporate Colors */
  --corp-navy: #0F172A;
  --corp-navy-light: #1E293B;
  --corp-navy-lighter: #334155;
  --corp-blue: #2563EB;
  --corp-blue-light: #3B82F6;
  --corp-gold: #F59E0B;
  --corp-gold-light: #FBBF24;
  --corp-purple: #6366F1;
  --corp-teal: #0D9488;
  
  /* Status Colors */
  --success: #10B981;
  --success-light: #D1FAE5;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;

  /* Neutrals */
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border: #E2E8F0;
  
  /* Layout */
  --sidebar-width: 280px;
  --header-height: 70px;
  --card-radius: 16px;
  --btn-radius: 12px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.12);
  --shadow-hover: 0 15px 35px rgba(37, 99, 235, 0.15);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

a {
  text-decoration: none;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

/* ========================================================= 
   AUTH PAGES (Login/Signup) 
   ========================================================= */
.auth-wrapper {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  background: var(--bg-main);
}

.auth-split {
  display: flex;
  width: 100%;
}

.auth-left {
  flex: 1;
  background: linear-gradient(135deg, var(--corp-navy) 0%, #1e1b4b 100%);
  color: white;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 60%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

.auth-left-content {
  position: relative;
  z-index: 2;
  max-width: 500px;
}

.auth-logo {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: 'Outfit';
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-feature-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #CBD5E1;
}

.auth-feature-list i {
  color: var(--corp-blue-light);
  font-size: 1.3rem;
}

.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-main);
}

.auth-card {
  width: 100%;
  max-width: 450px;
  background: var(--bg-card);
  padding: 3rem;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-muted);
}

/* ========================================================= 
   DASHBOARD LAYOUT 
   ========================================================= */
.corp-wrapper {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

.corp-sidebar {
  width: var(--sidebar-width);
  background: var(--corp-navy);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(0,0,0,0.1);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.corp-brand {
  min-height: var(--header-height);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.corp-brand i {
  flex-shrink: 0;
}

.corp-brand > div {
  overflow: hidden;
  min-width: 0;
}

.corp-brand-text {
  font-family: 'Outfit';
  font-size: 1rem;
  font-weight: 700;
  color: white;
  line-height: 1.3;
  word-break: break-word;
  overflow-wrap: break-word;
}

.corp-brand-sub {
  font-size: 0.7rem;
  color: var(--corp-gold-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
  white-space: nowrap;
}

.corp-nav {
  padding: 1.5rem 1rem;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.corp-nav-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin: 1.5rem 0 0.5rem 1rem;
}

.corp-nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  color: #CBD5E1;
  border-radius: var(--btn-radius);
  font-weight: 500;
  margin-bottom: 0.25rem;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.corp-nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.8;
}

.corp-nav-link:hover {
  background: rgba(255,255,255,0.05);
  color: white;
  transform: translateX(4px);
}

.corp-nav-link.active {
  background: var(--corp-blue);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.corp-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin 0.3s ease;
}

.corp-header {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.corp-content {
  padding: 2rem;
  flex: 1;
}

/* ========================================================= 
   CARDS & STATS 
   ========================================================= */
.corp-layout-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.corp-card {
  background: var(--bg-card);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.corp-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.corp-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.corp-stat-card {
  background: var(--bg-card);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.corp-stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.icon-blue { background: #eff6ff; color: var(--corp-blue); }
.icon-success { background: #f0fdf4; color: var(--success); }
.icon-warning { background: #fffbeb; color: var(--warning); }
.icon-purple { background: #eef2ff; color: var(--corp-purple); }

.corp-stat-details h4 {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.corp-stat-details .value {
  font-size: 2rem;
  font-family: 'Outfit';
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}

/* ========================================================= 
   FORMS & INPUTS 
   ========================================================= */
.corp-form-group {
  margin-bottom: 1.5rem;
}

.corp-label {
  display: block;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.corp-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  font-size: 1rem;
  font-family: 'Inter';
  background: #f8fafc;
  transition: all 0.3s ease;
}

.corp-input:focus {
  outline: none;
  border-color: var(--corp-blue);
  background: white;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* ========================================================= 
   BUTTONS 
   ========================================================= */
.corp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--btn-radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  font-family: 'Outfit';
  touch-action: manipulation;
}

.corp-btn-primary {
  background: var(--corp-blue);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.corp-btn-primary:hover {
  background: var(--corp-blue-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.corp-btn-gold {
  background: linear-gradient(135deg, var(--corp-gold), #d97706);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.corp-btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.3);
}

.corp-btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}

.corp-btn-outline:hover {
  border-color: var(--corp-blue);
  color: var(--corp-blue);
  background: #f8fafc;
}

.corp-btn-block {
  width: 100%;
}

/* ========================================================= 
   TABLES 
   ========================================================= */
.corp-table-wrapper {
  overflow-x: auto;
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  -webkit-overflow-scrolling: touch;
}

.corp-table {
  width: 100%;
  border-collapse: collapse;
}

.corp-table th {
  background: #f8fafc;
  padding: 1rem 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 2px solid var(--border);
}

.corp-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  font-size: 0.95rem;
  vertical-align: middle;
}

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

.corp-table tr:hover td {
  background: #f8fafc;
}

/* Badges */
.corp-badge {
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-success { background: var(--success-light); color: #065F46; }
.badge-warning { background: var(--warning-light); color: #92400E; }
.badge-danger { background: var(--danger-light); color: #991B1B; }
.badge-primary { background: #eff6ff; color: var(--corp-blue); }

/* ========================================================= 
   MOBILE RESPONSIVENESS 
   ========================================================= */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
  touch-action: manipulation;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 1024px) {
  .auth-left { display: none; }
  .auth-right { padding: 1rem; }
  .auth-card { padding: 2rem; box-shadow: none; border: 1px solid var(--border); }
}

@media (max-width: 992px) {
  .corp-sidebar {
    transform: translateX(-100%);
  }
  .corp-sidebar.active {
    transform: translateX(0);
  }
  .corp-main {
    margin-left: 0;
  }
  .mobile-toggle {
    display: flex !important;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    box-shadow: none;
    z-index: 101;
    cursor: pointer;
    padding: 0;
  }
  .mobile-toggle i {
    display: block !important;
    width: 20px;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    font-size: 0 !important;
    color: transparent !important;
    transition: all 0.3s ease;
  }
  .mobile-toggle i::before {
    content: none !important;
  }
  .mobile-toggle::before {
    content: "";
    width: 28px;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  .mobile-toggle::after {
    content: "";
    width: 14px;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  /* Elegant hover/active animation where lines equalize */
  .mobile-toggle:active i,
  .mobile-toggle:active::after {
    width: 28px;
  }
  .corp-layout-grid {
    grid-template-columns: 1fr;
  }
  .sidebar-overlay {
    display: block;
    visibility: hidden;
  }
  .sidebar-overlay.active {
    visibility: visible;
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .corp-header {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
  }
  .corp-content {
    padding: 1rem;
  }
  .corp-stat-grid {
    grid-template-columns: 1fr;
  }
}
