/* Global Jio Design System - Updated Color Theme and Logo Design */

:root {
  /* Jio Primary Colors - Updated Theme */
  --jio-primary: #003d82;
  --jio-primary-light: #1a5bb8;
  --jio-primary-dark: #002a5c;
  --jio-secondary: #4a90e2;
  --jio-accent: #0066cc;

  /* Jio Brand Colors */
  --jio-blue: #003d82;
  --jio-blue-gradient-start: #003d82;
  --jio-blue-gradient-end: #1a5bb8;

  /* Google RCS Colors */
  --primary-blue: #1a73e8;
  --primary-blue-dark: #1557b0;
  --secondary-blue: #4285f4;
  --light-blue: #e8f0fe;

  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-400: #bdbdbd;
  --gray-500: #9e9e9e;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;

  /* Status Colors */
  --success-green: #34a853;
  --warning-orange: #fbbc04;
  --error-red: #ea4335;

  /* Layout Variables */
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 56px;
  --header-height: 64px;
  --content-max-width: 1400px;
  --border-radius: 8px;
  --border-radius-sm: 6px;
  --border-radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.5;
  margin: 0;
  padding: 0;
  font-size: 14px;
  overflow-x: hidden;
}

/* Jio Header Design System - Universal */
.jio-header {
  background: linear-gradient(135deg, var(--jio-blue-gradient-start) 0%, var(--jio-blue-gradient-end) 100%);
  box-shadow: var(--shadow-md);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
}

.jio-header-container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Jio Logo Container - Consistent Design */
.jio-logo-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.jio-logo-container:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.jio-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--jio-primary);
}

.jio-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--jio-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.jio-logo-text {
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--jio-primary);
  white-space: nowrap;
}

/* Partner Dropdown - Aligned with Logo */
.jio-partner-dropdown {
  margin-left: 1.5rem;
  position: relative;
}

.jio-partner-selector {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.jio-partner-selector:hover,
.jio-partner-selector:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.jio-partner-name {
  font-weight: 600;
}

/* Header Navigation - Right Side */
.jio-header-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.jio-nav-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.jio-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  transform: scale(1.05);
}

.jio-user-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.jio-user-avatar:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Content Alignment System */
.jio-content-wrapper {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.jio-main-content {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* Sidebar Alignment with Header */
.jio-sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: fixed;
  left: 0;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.jio-sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

/* Sidebar Content Alignment */
.jio-sidebar-content {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.jio-sidebar-header {
  padding: 0.75rem 1.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.jio-sidebar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--jio-primary);
  transition: all 0.3s ease;
}

.jio-sidebar-logo-icon {
  width: 28px;
  height: 28px;
  background: var(--jio-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.jio-sidebar-logo-text {
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--jio-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Navigation */
.jio-sidebar-section {
  margin-bottom: 1.5rem;
}

.jio-sidebar-section-title {
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.jio-sidebar-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  text-decoration: none;
  min-height: 44px;
}

.jio-sidebar-item:hover {
  background: linear-gradient(90deg, var(--light-blue) 0%, rgba(26, 115, 232, 0.05) 100%);
  color: var(--jio-primary);
  border-left-color: var(--jio-accent);
}

.jio-sidebar-item.active {
  background: linear-gradient(90deg, var(--light-blue) 0%, rgba(0, 61, 130, 0.1) 100%);
  color: var(--jio-primary);
  border-left-color: var(--jio-primary);
  font-weight: 600;
}

.jio-sidebar-item i {
  width: 20px;
  margin-right: 0.75rem;
  font-size: 1rem;
  text-align: center;
  flex-shrink: 0;
}

.jio-sidebar-item-text {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Collapsed Sidebar States */
.jio-sidebar.collapsed .jio-sidebar-logo-text,
.jio-sidebar.collapsed .jio-sidebar-item-text,
.jio-sidebar.collapsed .jio-sidebar-section-title {
  opacity: 0;
  visibility: hidden;
  width: 0;
}

.jio-sidebar.collapsed .jio-sidebar-header {
  padding: 0.75rem 0.5rem;
}

.jio-sidebar.collapsed .jio-sidebar-item {
  justify-content: center;
  padding: 0.75rem 0.5rem;
  margin: 0.25rem;
  border-radius: var(--border-radius-sm);
  border-left: none;
}

.jio-sidebar.collapsed .jio-sidebar-item i {
  margin-right: 0;
  font-size: 1.1rem;
}

/* Main Content with Proper Alignment */
.jio-main-layout {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

.jio-content-area {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--gray-100);
}

.jio-sidebar.collapsed + .jio-content-area {
  margin-left: var(--sidebar-collapsed-width);
}

.jio-page-content {
  padding: 2rem;
  max-width: var(--content-max-width);
  margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .jio-header-container,
  .jio-content-wrapper,
  .jio-page-content {
    max-width: 100%;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

@media (max-width: 768px) {
  .jio-header-container {
    padding: 0 1rem;
  }

  .jio-logo-container {
    padding: 0.375rem 1rem;
  }

  .jio-logo-text {
    font-size: 1rem;
  }

  .jio-logo-icon {
    width: 28px;
    height: 28px;
    font-size: 0.875rem;
  }

  .jio-partner-dropdown {
    display: none;
  }

  .jio-sidebar {
    transform: translateX(-100%);
    z-index: 1050;
  }

  .jio-sidebar.show {
    transform: translateX(0);
  }

  .jio-content-area {
    margin-left: 0;
  }

  .jio-page-content {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 576px) {
  .jio-header-container {
    padding: 0 0.75rem;
  }

  .jio-logo-container {
    padding: 0.25rem 0.75rem;
  }

  .jio-logo-text {
    font-size: 0.9rem;
  }

  .jio-logo-icon {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
  }

  .jio-nav-btn,
  .jio-user-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }

  .jio-page-content {
    padding: 1rem 0.75rem;
  }
}

@media (max-width: 480px) {
  :root {
    --header-height: 56px;
  }

  .jio-logo-icon {
    display: none;
  }

  .jio-logo-text {
    font-size: 0.85rem;
  }

  .jio-nav-btn,
  .jio-user-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }
}

/* Dropdown Menu Styling */
.jio-dropdown-menu {
  background: var(--white);
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  min-width: 200px;
}

.jio-dropdown-item {
  padding: 0.75rem 1rem;
  color: var(--gray-700);
  transition: all 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.jio-dropdown-item:hover {
  background: var(--light-blue);
  color: var(--jio-primary);
}

/* Smooth Transitions */
* {
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s
    ease;
}

/* Mobile Sidebar Overlay */
.jio-sidebar-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.jio-sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}
