/* Enhanced Partner Account Master Page with Perfect Responsive Design */

:root {
  /* Jio Campaign Colors */
  --jio-blue: #003d82;
  --jio-blue-light: #1a5bb8;
  --jio-blue-dark: #002a5c;
  --jio-accent: #0066cc;
  --jio-secondary: #4a90e2;

  /* 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: 56px;
  --border-radius: 6px;
  --border-radius-sm: 4px;
  --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.4;
  margin: 0;
  padding: 0;
  font-size: 13px;
  overflow-x: hidden;
}

/* Perfect Partner Header Design - Unique Classes */
.partner-header-section {
  background: linear-gradient(135deg, var(--jio-blue) 0%, var(--jio-blue-light) 100%);
  box-shadow: var(--shadow-md);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 64px;
  height: var(--header-height);
}

.partner-navbar {
  padding: 0 1rem;
  min-height: var(--header-height);
  align-items: center;
}

.partner-navbar-brand-container {
  display: flex;
  align-items: center;
  flex: 1;
}

.partner-brand-logo-wrapper {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 0.375rem 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.partner-brand-logo-wrapper:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.partner-brand-logo {
  display: flex;
  align-items: center;
  color: var(--white);
}

.partner-brand-logo i {
  font-size: 1rem;
  margin-right: 0.5rem;
}

.partner-brand-text {
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
  white-space: nowrap;
}

.partner-dropdown-container {
  position: relative;
  margin-left: 1rem;
}

.partner-selector {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  padding: 0.375rem 0.875rem;
  border-radius: 16px;
  font-weight: 500;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.partner-selector:hover,
.partner-selector:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--white);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.partner-selector:focus {
  outline: none;
}

.partner-selector.show {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--white);
}

.partner-name {
  font-weight: 600;
}

/* Fixed Partner Dropdown Menu */
.partner-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1050;
  min-width: 200px;
  padding: 0.5rem 0;
  margin: 0.125rem 0 0;
  font-size: 0.875rem;
  color: var(--gray-700);
  text-align: left;
  background-color: var(--white);
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
  transform: translateY(2px);
}

.partner-dropdown-menu .dropdown-item {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  clear: both;
  font-weight: 400;
  color: var(--gray-700);
  text-align: inherit;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
  transition: all 0.15s ease-in-out;
}

.partner-dropdown-menu .dropdown-item:hover,
.partner-dropdown-menu .dropdown-item:focus {
  color: var(--gray-900);
  background-color: var(--gray-100);
}

.partner-dropdown-menu .dropdown-item.active,
.partner-dropdown-menu .dropdown-item:active {
  color: var(--white);
  text-decoration: none;
  background-color: var(--primary-blue);
}

.partner-dropdown-menu .dropdown-divider {
  height: 0;
  margin: 0.5rem 0;
  overflow: hidden;
  border-top: 1px solid var(--gray-200);
}

.partner-nav-right {
  display: flex;
  align-items: center;
}

.partner-btn-icon {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 0.875rem;
}

.partner-btn-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  transform: scale(1.05);
}

.partner-user-avatar {
  width: 36px;
  height: 36px;
  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: 0.875rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.partner-user-avatar:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.partner-avatar-text {
  font-weight: 700;
}

/* Main Wrapper */
.main-wrapper {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* Perfect Sidebar Design */
.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;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-content {
  flex: 1;
  padding: 0.75rem 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom Scrollbar for Sidebar */
.sidebar-content::-webkit-scrollbar {
  width: 4px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: var(--gray-100);
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: var(--jio-blue);
  border-radius: 2px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: var(--jio-blue-dark);
}

.sidebar-section {
  margin-bottom: 1rem;
}

.sidebar-header {
  padding: 0.375rem 1rem;
  margin-bottom: 0.375rem;
  transition: all 0.3s ease;
}

.sidebar-header-text {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
}

.sidebar-item {
  display: flex;
  align-items: center;
  padding: 0.625rem 1rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  position: relative;
  text-decoration: none;
  min-height: 40px;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-item:hover {
  background: linear-gradient(90deg, var(--light-blue) 0%, rgba(26, 115, 232, 0.05) 100%);
  color: var(--jio-blue);
  border-left-color: var(--jio-accent);
}

.sidebar-item.active {
  background: linear-gradient(90deg, var(--light-blue) 0%, rgba(0, 61, 130, 0.1) 100%);
  color: var(--jio-blue);
  border-left-color: var(--jio-blue);
  font-weight: 600;
}

.sidebar-item i {
  width: 20px;
  margin-right: 0.75rem;
  font-size: 0.875rem;
  text-align: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.sidebar-text {
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Collapsed Sidebar States - Perfect Design */
.sidebar.collapsed .sidebar-text {
  opacity: 0;
  visibility: hidden;
  width: 0;
  margin: 0;
}

.sidebar.collapsed .sidebar-header {
  opacity: 0;
  visibility: hidden;
  height: 0;
  padding: 0;
  margin: 0;
}

.sidebar.collapsed .sidebar-item {
  justify-content: center;
  padding: 0.625rem 0.5rem;
  margin: 0.125rem 0.25rem;
  border-radius: var(--border-radius-sm);
  border-left: none;
}

.sidebar.collapsed .sidebar-item:hover,
.sidebar.collapsed .sidebar-item.active {
  border-left: none;
  border-radius: var(--border-radius-sm);
}

.sidebar.collapsed .sidebar-item i {
  margin-right: 0;
  font-size: 1rem;
}

.sidebar.collapsed .sidebar-section {
  margin-bottom: 0.5rem;
}

/* Sidebar Footer with Toggle */
.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  flex-shrink: 0;
}

.sidebar-toggle-btn {
  width: 100%;
  background: var(--jio-blue);
  border: none;
  color: var(--white);
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  min-height: 36px;
}

.sidebar-toggle-btn:hover {
  background: var(--jio-blue-dark);
  color: var(--white);
  transform: translateY(-1px);
}

.sidebar.collapsed .sidebar-toggle-btn i {
  transform: rotate(180deg);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--gray-100);
  min-height: calc(100vh - var(--header-height));
}

.sidebar.collapsed + .main-content {
  margin-left: var(--sidebar-collapsed-width);
}

.content-wrapper {
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Page Header */
.page-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.page-title {
  font-family: "Roboto", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.375rem;
}

.page-subtitle {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.4;
}

/* Content Container */
.content-container {
  min-height: 400px;
}

/* Content Cards */
.content-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 1.25rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.content-card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.card-title {
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  font-size: 1rem;
}

.card-body {
  padding: 1.25rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.375rem;
  font-size: 0.8rem;
  display: block;
}

.form-control {
  border: 2px solid var(--gray-300);
  border-radius: var(--border-radius-sm);
  padding: 0.625rem 0.875rem;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  background: var(--white);
  width: 100%;
}

.form-control:focus {
  border-color: var(--jio-blue);
  box-shadow: 0 0 0 3px rgba(0, 61, 130, 0.1);
  outline: none;
}

.form-control:disabled {
  background: var(--gray-100);
  color: var(--gray-600);
  border-color: var(--gray-300);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--jio-blue) 0%, var(--jio-blue-light) 100%);
  border: none;
  color: var(--white);
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: var(--border-radius-sm);
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--jio-blue-dark) 0%, var(--jio-blue) 100%);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.save-btn {
  min-width: 100px;
}

/* Tables */
.table {
  margin: 0;
  font-size: 0.8rem;
}

.table th {
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
  font-weight: 700;
  color: var(--gray-700);
  padding: 0.875rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  padding: 0.875rem;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}

/* Badges */
.badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--jio-blue);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mobile Sidebar Overlay */
.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;
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Perfect Responsive Design */
@media (max-width: 1200px) {
  .content-wrapper {
    padding: 1.25rem;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1050;
    width: var(--sidebar-width);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .sidebar.collapsed {
    width: var(--sidebar-width);
    transform: translateX(-100%);
  }

  .sidebar.collapsed.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .content-wrapper {
    padding: 1rem;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .partner-navbar {
    padding: 0 0.75rem;
  }

  .partner-dropdown-container {
    display: none;
  }

  .partner-brand-logo-wrapper {
    padding: 0.25rem 0.75rem;
  }

  .partner-brand-text {
    font-size: 0.85rem;
  }

  .partner-brand-logo i {
    font-size: 0.875rem;
    margin-right: 0.375rem;
  }
}

@media (max-width: 576px) {
  .page-header {
    text-align: left;
  }

  .btn-primary {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .card-body {
    padding: 1rem;
  }

  .partner-brand-logo i {
    display: none;
  }

  .partner-brand-text {
    font-size: 0.8rem;
  }

  .content-wrapper {
    padding: 0.75rem;
  }
}

/* Tooltip Customization */
.tooltip {
  font-size: 0.7rem;
}

.tooltip-inner {
  background: var(--gray-900);
  border-radius: var(--border-radius-sm);
  padding: 0.375rem 0.625rem;
}

/* Additional Responsive Improvements */
@media (max-width: 480px) {
  :root {
    --header-height: 52px;
  }

  .partner-btn-icon {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  .partner-user-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  .page-title {
    font-size: 1.125rem;
  }

  .page-subtitle {
    font-size: 0.8rem;
  }
}

/* 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;
}
