﻿:root {
  /* International SaaS Palette (Inspired by Stripe/Linear) */
  --primary: #ff477e;
  /* Radiant Pink */
  --primary-hover: #f0356c;
  --secondary: #2c3e50;
  /* Deep Blue */

  --bg-main: #f8fafc;
  /* Slate 50 */
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;

  --text-main: #1e293b;
  /* Slate 800 */
  --text-muted: #64748b;
  /* Slate 500 */
  --text-light: #94a3b8;
  /* Slate 400 */

  --border-subtle: #e2e8f0;
  /* Slate 200 */
  --border-focus: #c7d2fe;
  /* Indigo 200 */

  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --sidebar-width: 260px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
}

/* App Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar - Modern & Clean */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
  transition: all 0.3s ease;
}

.sidebar .brand {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.sidebar .brand img {
  max-height: 32px;
  width: auto;
  object-fit: contain;
}

.sidebar .brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--secondary);
}

.sidebar .brand-tagline {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar nav {
  flex: 1;
  padding: 0 12px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background-color: #f1f5f9;
  color: var(--secondary);
}

.nav-link.active {
  background-color: #eef2ff;
  color: var(--primary);
}

.nav-link svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.sidebar-footer {
  padding: 24px;
  border-top: 1px solid var(--border-subtle);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 40px 48px;
  max-width: 1400px;
  width: 100%;
}

.page-header {
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.page-header h1 {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--secondary);
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-top: 4px;
}

/* Dashboard Stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card .label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: block;
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: -0.025em;
}

/* Professional Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 32px;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--secondary);
}

.card-body {
  padding: 24px;
}

/* Tables - International Standard */
.table-container {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: 12px 24px;
  background: #f8fafc;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

td {
  padding: 16px 24px;
  font-size: 0.875rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
}

tr:hover td {
  background-color: #f8fafc;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
}

.btn-outline {
  background: #fff;
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-outline:hover {
  background: #f1f5f9;
  border-color: var(--text-muted);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.875rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: #fff;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--border-focus);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: capitalize;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background: #e0f2fe;
  color: #075985;
}


/* Mobile Interface Overrides */
.mobile-header {
  display: none;
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    display: none;
  }

  .mobile-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .main-content {
    padding: 20px 16px 100px;
    width: 100%;
  }

  .page-header {
    flex-direction: column;
    gap: 12px;
  }

  .mobile-nav {
    display: flex !important;
  }
}

/* Utilities & Refinements */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border-subtle);
  height: 64px;
  padding: 0 16px;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

.mobile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 600;
  transition: color 0.2s;
}

.mobile-tab.active {
  color: var(--primary);
}

.mobile-tab svg {
  width: 22px;
  height: 22px;
}

.stat-card.primary {
  border-left: 4px solid var(--primary);
}

.stat-card.success {
  border-left: 4px solid var(--success);
}

.stat-card.warning {
  border-left: 4px solid var(--warning);
}

.stat-card.info {
  border-left: 4px solid #06b6d4;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 1024px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Form Controls Refinement */
input,
select,
textarea {
  font-family: inherit;
}

/* Mobile Navigation Drawer */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    width: 280px;
    display: flex !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1);
  }

  body.menu-open .sidebar {
    left: 0;
  }

  body.menu-open {
    overflow: hidden;
  }
}

/* Authentication Styles - Premium SaaS Look */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top left, #fff1f2 0%, #ffffff 50%, #fdf2f8 100%);
  padding: 20px;
}

.auth-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  width: 100%;
  max-width: 440px;
  padding: 40px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.auth-logo {
  max-width: 180px;
  margin: 0 auto 30px;
  display: block;
}

.auth-card h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 8px;
  letter-spacing: -0.025em;
}

.auth-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 32px;
}

.auth-form {
  text-align: left;
}

.auth-form .form-group label {
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.auth-form .form-control {
  background: #fcfcfd;
  border: 1.5px solid var(--border-subtle);
  padding: 12px 16px;
  font-size: 1rem;
  height: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form .form-control:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 71, 126, 0.1);
}

.auth-form .btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 10px;
  box-shadow: 0 10px 15px -3px rgba(255, 71, 126, 0.3);
}

.auth-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .auth-card {
    padding: 30px 20px;
    border-radius: 16px;
  }
}