/* CI Trip Hotel Partner Extranet - Modern SaaS Design System */
:root {
  --ci-green: #218141;
  --ci-green-dark: #123c28;
  --ci-green-light: #e8f5e9;
  --ci-orange: #f18a19;
  --ci-blue: #2869aa;
  --ci-bg: #f5f7fa;
  --ci-surface: #ffffff;
  --ci-border: #e2e8f0;
  --ci-text: #1e293b;
  --ci-muted: #64748b;
  --ci-radius: 10px;
  --ci-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; }
body.extranet-body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--ci-bg);
  color: var(--ci-text);
  font-size: 14px;
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
  width: 240px;
  background: #ffffff;
  border-right: 1px solid var(--ci-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--ci-border);
  text-decoration: none;
}

.sidebar-brand img {
  height: 38px;
  width: auto;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-text b {
  font-size: 16px;
  color: var(--ci-green-dark);
  letter-spacing: 0.5px;
}

.sidebar-brand-text small {
  font-size: 10px;
  color: var(--ci-orange);
  font-weight: 700;
  letter-spacing: 1px;
}

.sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--ci-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background: var(--ci-green-light);
  color: var(--ci-green);
}

.nav-item.active {
  background: var(--ci-green);
  color: #ffffff;
  font-weight: 600;
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  background: var(--ci-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--ci-border);
  font-size: 12px;
  color: var(--ci-muted);
}

/* Main Content Area */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Navigation Bar */
.app-topbar {
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid var(--ci-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.property-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid var(--ci-border);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13.5px;
}

.property-selector select {
  border: none;
  background: transparent;
  font-weight: 600;
  color: var(--ci-text);
  outline: none;
  cursor: pointer;
  font-size: 14px;
}

.badge-score {
  background: #dcfce7;
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

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

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ci-text);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ci-green-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

/* Page Content Container */
.page-container {
  padding: 24px 28px 48px;
  max-width: 1400px;
  width: 100%;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ci-text);
  margin: 0;
}

.page-subtitle {
  font-size: 13px;
  color: var(--ci-muted);
  margin-top: 4px;
}

/* Primary and Ghost Buttons */
.btn-ext {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.btn-ext-primary {
  background: var(--ci-green);
  color: #ffffff;
}

.btn-ext-primary:hover {
  background: #176332;
}

.btn-ext-orange {
  background: var(--ci-orange);
  color: #ffffff;
}

.btn-ext-orange:hover {
  background: #d87609;
}

.btn-ext-outline {
  background: #ffffff;
  border-color: var(--ci-border);
  color: var(--ci-text);
}

.btn-ext-outline:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-ext-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

/* KPI Cards Grid (Performance Overview) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

.kpi-card {
  background: #ffffff;
  border: 1px solid var(--ci-border);
  border-radius: var(--ci-radius);
  padding: 20px;
  box-shadow: var(--ci-shadow);
  display: flex;
  flex-direction: column;
}

.kpi-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ci-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--ci-text);
  margin: 12px 0 6px;
}

.kpi-meta {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.kpi-link {
  color: var(--ci-blue);
  text-decoration: none;
  font-weight: 600;
}

.kpi-link:hover { text-decoration: underline; }

/* Data Tables */
.ext-card {
  background: #ffffff;
  border: 1px solid var(--ci-border);
  border-radius: var(--ci-radius);
  box-shadow: var(--ci-shadow);
  overflow: hidden;
  margin-bottom: 24px;
}

.ext-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ci-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.ext-card-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ci-text);
  margin: 0;
}

.ext-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.ext-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ci-border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ext-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.ext-table tr:hover td {
  background: #fbfcfe;
}

/* Status Pills */
.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 700;
}

.pill-active, .pill-approved { background: #dcfce7; color: #15803d; }
.pill-pending { background: #fef3c7; color: #b45309; }
.pill-paused { background: #f1f5f9; color: #475569; }
.pill-cancelled { background: #fee2e2; color: #b91c1c; }

/* Subtabs bar */
.tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--ci-border);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ci-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--ci-green);
  border-bottom-color: var(--ci-green);
}

.tab-btn:hover:not(.active) {
  color: var(--ci-text);
}

/* Support Box */
.support-card {
  background: #f8fafc;
  border: 1px solid var(--ci-border);
  border-radius: var(--ci-radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
}

.manager-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.manager-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #334155;
}
