/* AWS Management Console Enterprise Theme for Xstoreindia (Light & Dark Adaptive) */

/* 1. Light Theme (Default: Bright, Crisp & High-Contrast) */
.aws-console-wrap {
  margin: 24px 0 32px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.aws-console-bar {
  background: #232f3e;
  border-bottom: 2px solid #ff9900;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: #ffffff;
}

.aws-logo-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.aws-logo-badge .aws-tag {
  background: #ff9900;
  color: #131921;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.aws-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.aws-title-wrap strong {
  font-size: 1.15rem;
  color: #ffffff;
}

.aws-tower-pill {
  font-size: 0.75rem;
  background: #334155;
  padding: 3px 8px;
  border-radius: 4px;
  color: #cbd5e1;
  font-weight: 600;
}

.aws-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

.aws-status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
}

/* Theme Toggle Button */
.aws-theme-toggle-btn {
  background: #334155;
  color: #f8fafc;
  border: 1px solid #475569;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.aws-theme-toggle-btn:hover {
  background: #475569;
  color: #ffffff;
  border-color: #ff9900;
}

.aws-console-content {
  padding: 24px;
}

/* KPI Overview Row */
.aws-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.aws-kpi-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s, box-shadow 0.2s;
}

.aws-kpi-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.aws-kpi-lbl {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.aws-kpi-val {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
}

.aws-kpi-sub {
  font-size: 0.74rem;
  color: #059669;
  font-weight: 600;
  margin-top: 4px;
}

/* Section Cards */
.aws-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.aws-section-card h3 {
  margin: 0 0 16px;
  font-size: 1.05rem;
  color: #0f172a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
}

.aws-section-card h3 span:first-child {
  font-weight: 700;
}

.aws-section-subhead {
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
}

/* Microservices Grid */
.aws-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.aws-service-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s ease;
}

.aws-service-card:hover {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.aws-service-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.aws-service-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.aws-service-latency {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
}

.aws-service-status {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.aws-status-healthy {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.aws-service-meta {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.aws-service-meta strong {
  color: #1e293b;
}

/* Tables */
.aws-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.aws-table th {
  background: #f1f5f9;
  color: #334155;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
  font-weight: 700;
}

.aws-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
}

.aws-table tr:hover {
  background: #f8fafc;
}

/* Category Filter Dropdown */
.aws-category-select {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  outline: none;
}

.aws-category-select:focus {
  border-color: #2874f0;
}

/* Settlement Preview Box */
.aws-settlement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  background: #f8fafc;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.aws-settlement-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aws-settlement-lbl {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 600;
}

.aws-settlement-val {
  font-size: 1.35rem;
  font-weight: 800;
}

/* Buttons */
.aws-btn {
  background: #ff9900;
  color: #131921;
  border: none;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: opacity 0.2s;
}

.aws-btn:hover {
  opacity: 0.9;
}

.aws-btn-dark {
  background: #334155;
  color: #f8fafc;
}

.aws-btn-dark:hover {
  background: #475569;
}

/* --------------------------------------------------------------------------
 * 2. Dark Console Mode (.aws-console-wrap.dark-theme)
 * Available via Theme Toggle for users who want AWS Cloud Dark
 * -------------------------------------------------------------------------- */
.aws-console-wrap.dark-theme {
  background: #0f172a;
  color: #f8fafc;
  border-color: #1e293b;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.aws-console-wrap.dark-theme .aws-console-bar {
  background: #1e293b;
  border-bottom: 2px solid #ff9900;
}

.aws-console-wrap.dark-theme .aws-status-pill {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.aws-console-wrap.dark-theme .aws-status-dot {
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
}

.aws-console-wrap.dark-theme .aws-kpi-box {
  background: #1e293b;
  border-color: #334155;
}

.aws-console-wrap.dark-theme .aws-kpi-lbl {
  color: #94a3b8;
}

.aws-console-wrap.dark-theme .aws-kpi-val {
  color: #f8fafc;
}

.aws-console-wrap.dark-theme .aws-kpi-sub {
  color: #34d399;
}

.aws-console-wrap.dark-theme .aws-section-card {
  background: #1e293b;
  border-color: #334155;
}

.aws-console-wrap.dark-theme .aws-section-card h3 {
  color: #f8fafc;
  border-bottom-color: #334155;
}

.aws-console-wrap.dark-theme .aws-section-subhead {
  color: #94a3b8;
}

.aws-console-wrap.dark-theme .aws-service-card {
  background: #1e293b;
  border-color: #334155;
}

.aws-console-wrap.dark-theme .aws-service-card:hover {
  border-color: #64748b;
  background: #243248;
}

.aws-console-wrap.dark-theme .aws-service-name {
  color: #f1f5f9;
}

.aws-console-wrap.dark-theme .aws-service-latency {
  color: #94a3b8;
}

.aws-console-wrap.dark-theme .aws-service-meta {
  color: #94a3b8;
}

.aws-console-wrap.dark-theme .aws-service-meta strong {
  color: #f8fafc;
}

.aws-console-wrap.dark-theme .aws-table th {
  background: #0f172a;
  color: #cbd5e1;
  border-bottom-color: #334155;
}

.aws-console-wrap.dark-theme .aws-table td {
  border-bottom-color: #334155;
  color: #e2e8f0;
}

.aws-console-wrap.dark-theme .aws-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.aws-console-wrap.dark-theme .aws-category-select {
  background: #0f172a;
  color: #f8fafc;
  border-color: #334155;
}

.aws-console-wrap.dark-theme .aws-settlement-grid {
  background: #0f172a;
  border-color: #334155;
}

.aws-console-wrap.dark-theme .aws-settlement-lbl {
  color: #94a3b8;
}

/* -------------------------------------------------------------------------
   6. Admin MFA & Hardware Token Styles
   ------------------------------------------------------------------------- */
.aws-mfa-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
}

.aws-mfa-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aws-mfa-badge-enforced {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  width: fit-content;
}

.aws-mfa-badge-pending {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  width: fit-content;
}

.aws-mfa-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* -------------------------------------------------------------------------
   7. Risk Governance & Separation of Duty Styles
   ------------------------------------------------------------------------- */
.aws-risk-badge-critical {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.aws-risk-badge-high {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fed7aa;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.aws-risk-badge-medium {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fef08a;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.aws-risk-badge-low {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.aws-signal-chip {
  display: inline-block;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-family: monospace;
  margin: 1px 2px;
}

/* -------------------------------------------------------------------------
   Dark Theme Adaptive Rules for MFA & Risk
   ------------------------------------------------------------------------- */
.aws-console-wrap.dark-theme .aws-mfa-box {
  background: #0f172a;
  border-color: #334155;
}

.aws-console-wrap.dark-theme .aws-signal-chip {
  background: #1e293b;
  color: #cbd5e1;
  border-color: #475569;
}

@media (max-width: 768px) {
  .aws-console-bar,
  .aws-console-content,
  .aws-section-card {
    padding: 14px;
  }
  .aws-service-grid {
    grid-template-columns: 1fr;
  }
  .aws-kpi-row {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  }
  .aws-theme-toggle-btn,
  .aws-category-select {
    min-height: 44px;
  }
}

