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

:root {
  --bg: #070c14;
  --surface: #0c1524;
  --surface-2: #142239;
  --surface-3: #1c2e4c;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --primary: #00e5ff;
  --primary-soft: rgba(0, 229, 255, 0.08);
  --primary-hover: #33ebff;
  --border: #16263f;
  --border-focus: #00e5ff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #f43f5e;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 15px rgba(0, 229, 255, 0.2);
  
  --font-sans: 'Inter', sans-serif;
  --font-title: 'Outfit', sans-serif;
  --sidebar-width: 260px;
  --header-height: 70px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-sans);
}

body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--surface-3);
}

/* Application Layout Shell */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-section {
  padding: 0 8px 24px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar-brand-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 180px;
  height: 80px;
  margin: 0 auto;
  transition: transform 0.2s ease;
}

.sidebar-brand-container:hover {
  transform: translateY(-1px);
}

.sidebar-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-placeholder {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-monogram {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #005c8a 0%, var(--primary) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.3);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
  color: #fff;
}

.brand-tagline {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  font-weight: 600;
  margin-top: 1px;
}

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

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

.nav-item a:hover {
  color: var(--text);
  background: var(--primary-soft);
  border-color: rgba(0, 229, 255, 0.1);
}

.nav-item.active a {
  color: #fff;
  background: linear-gradient(90deg, var(--primary-soft) 0%, rgba(0, 229, 255, 0.02) 100%);
  border-color: rgba(0, 229, 255, 0.2);
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow-glow);
}

.nav-item a svg {
  width: 20px;
  height: 20px;
  transition: stroke 0.2s ease;
}

.nav-item.active a svg {
  stroke: var(--primary);
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--primary);
}

.user-details {
  display: flex;
  flex-direction: column;
}

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

.user-role {
  font-size: 11px;
  color: var(--muted);
}

.logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.2);
  color: var(--danger);
}

/* Main Content Area */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
  overflow-x: hidden;
}

/* Header bar */
.top-header {
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.page-title-section h1 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 600;
  color: #fff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.current-date {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--success);
  font-weight: 600;
  background: rgba(16, 185, 129, 0.08);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* Page content area */
.content-body,
.page-content {
  padding: 32px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

/* Mobile Menu Button */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
