/* ============================================================
   Jio-Cisco AN Transformation Portal — Main Stylesheet
   Cisco Branded | CiscoSansTT | Mission Control Aesthetic
   ============================================================ */

/* --- Font Faces --- */
@font-face {
  font-family: 'CiscoSansTT';
  src: url('../fonts/CiscoSansTT-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: 'CiscoSansTT';
  src: url('../fonts/CiscoSansTT.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'CiscoSansTT';
  src: url('../fonts/CiscoSansTT-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

/* --- CSS Variables --- */
:root {
  --cisco-blue: #049FD9;
  --cisco-blue-dark: #037DAD;
  --cisco-blue-light: #E8F6FC;
  --cisco-green: #6CC04A;
  --cisco-coral: #FF6D5A;
  --cisco-amber: #FFBF3F;
  --cisco-purple: #7F68AE;

  --dark: #1B1B1B;
  --dark-surface: #242424;
  --dark-border: #333;
  --dark-text: #A0A0A0;

  --light-bg: #F5F6F8;
  --white: #FFFFFF;
  --text-primary: #1B1B1B;
  --text-secondary: #5A5A5A;
  --text-muted: #8A8A8A;

  --border: #E2E4E8;
  --border-light: #EDEEF1;

  --sidebar-width: 260px;
  --header-height: 60px;
  --banner-height: 52px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12);

  --transition: 200ms cubic-bezier(.4,0,.2,1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'CiscoSansTT', 'Segoe UI', sans-serif;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--light-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
}

a { color: var(--cisco-blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--cisco-blue-dark); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--text-primary); }
h1 { font-size: 1.8rem; letter-spacing: -0.02em; }
h2 { font-size: 1.4rem; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p { color: var(--text-secondary); }

/* --- Sidebar --- */
.sidebar {
  position: fixed;
  top: var(--banner-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--banner-height));
  background: var(--dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-brand {
  padding: 20px 24px;
  border-bottom: 1px solid var(--dark-border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-brand img {
  height: 28px;
  filter: brightness(0) invert(1);
}

.sidebar-brand .brand-divider {
  width: 1px;
  height: 24px;
  background: var(--dark-border);
}

.sidebar-brand .brand-text {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dark-text);
  line-height: 1.3;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.sidebar-nav .nav-section {
  margin-bottom: 24px;
}

.sidebar-nav .nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-text);
  padding: 0 12px 8px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: #C8C8C8;
  font-size: 0.9rem;
  font-weight: 400;
  transition: all var(--transition);
  margin-bottom: 2px;
}

.sidebar-nav a:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}

.sidebar-nav a.active {
  background: var(--cisco-blue);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(4,159,217,.35);
}

.sidebar-nav a .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.sidebar-nav a .nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,.12);
  color: #aaa;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.sidebar-nav a.active .nav-badge {
  background: rgba(255,255,255,.25);
  color: #fff;
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--dark-border);
  font-size: 0.72rem;
  color: var(--dark-text);
}

/* --- Main Content Area --- */
.main-wrapper {
  margin-left: var(--sidebar-width);
  margin-top: var(--banner-height);
  flex: 1;
  min-height: calc(100vh - var(--banner-height));
  display: flex;
  flex-direction: column;
}

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

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-left .page-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.header-left .breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.header-left .breadcrumb a { color: var(--text-muted); }
.header-left .breadcrumb a:hover { color: var(--cisco-blue); }

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

.header-right .download-bar {
  display: flex;
  gap: 8px;
}

.header-right .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.header-right .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cisco-blue-light);
  color: var(--cisco-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.header-right .user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.header-right .user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.btn-logout {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.btn-logout:hover {
  border-color: var(--cisco-coral);
  color: var(--cisco-coral);
}

/* --- Page Content --- */
.page-content {
  flex: 1;
  padding: 32px;
  max-width: 1280px;
}

.page-content.wide {
  max-width: 100%;
}

/* --- Mobile Toggle --- */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--dark);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 90;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open {
    display: block;
  }
  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .main-wrapper {
    margin-left: 0;
  }
  .header {
    padding: 0 16px 0 56px;
  }
  .page-content {
    padding: 20px 16px;
  }
}

/* --- Print Styles --- */
@media print {
  .sidebar, .header, .mobile-toggle, .download-bar, .btn-logout, .user-info { display: none !important; }
  .main-wrapper { margin-left: 0; }
  .page-content { padding: 0; max-width: 100%; }
  body { background: #fff; }
}
