/*
=============================================================================
  Okular Services — Client Portal Stylesheet
  Glassmorphic, dark, interactive dashboard interface
=============================================================================
*/

/* ── Portal Glassmorphism Tokens ────────────────────────────────────────── */
:root {
  --glass-bg:           rgba(13, 17, 23, 0.6);
  --glass-bg-elevated:  rgba(22, 27, 34, 0.75);
  --glass-border:       rgba(255, 255, 255, 0.08);
  --glass-border-glow:  rgba(124, 58, 237, 0.3);
  --glass-shadow:       0 12px 40px 0 rgba(0, 0, 0, 0.5);
  
  --status-online:      #10b981;
  --status-offline:     #ef4444;
  --status-pending:     #f59e0b;
}

/* ── Glow Backgrounds for Glassmorphism ──────────────────────────────────── */
.portal-glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  background: var(--bg-base);
  pointer-events: none;
}

.portal-glow-orb-1 {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float-orb-1 20s infinite alternate ease-in-out;
}

.portal-glow-orb-2 {
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float-orb-2 25s infinite alternate ease-in-out;
}

@keyframes float-orb-1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-5%, 10%) scale(1.1); }
}

@keyframes float-orb-2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(10%, -5%) scale(1.05); }
}

/* ── Auth/Login Layout ────────────────────────────────────────────────── */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  width: 100%;
  max-width: 440px;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #3b82f6 100%);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin: 12px 0 8px;
  color: var(--text-primary);
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-form-group {
  margin-bottom: 20px;
  position: relative;
}

.auth-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.auth-input-wrapper {
  position: relative;
}

.auth-input-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.auth-input {
  width: 100%;
  background: rgba(7, 9, 15, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px 12px 42px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.2);
}

.auth-btn-submit {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
  font-size: 15px;
  padding: 12px 24px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.auth-divider:not(:empty)::before {
  margin-right: 12px;
}

.auth-divider:not(:empty)::after {
  margin-left: 12px;
}

.btn-discord {
  width: 100%;
  background: #5865F2;
  border: none;
  color: #fff;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-discord:hover {
  background: #4752c4;
  box-shadow: 0 0 16px rgba(88, 101, 242, 0.4);
  transform: translateY(-1px);
}

.demo-credentials-card {
  background: rgba(124, 58, 237, 0.05);
  border: 1px dashed rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 24px;
}

.demo-credentials-card h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: #a78bfa;
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-credentials-card p {
  margin: 4px 0;
  font-size: 12px;
  color: var(--text-secondary);
  font-family: monospace;
}

.demo-credentials-card strong {
  color: var(--text-primary);
}

/* ── Dashboard Layout ───────────────────────────────────────────────────── */
.portal-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar Navigation */
.portal-sidebar {
  width: 260px;
  background: rgba(13, 17, 23, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 10;
  transition: transform var(--transition);
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

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

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.sidebar-link i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(124, 58, 237, 0.1);
  color: var(--text-primary);
}

.sidebar-link.active {
  border-left: 3px solid var(--accent);
  padding-left: 13px;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-username {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.sidebar-role {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--status-offline);
}

/* Main Content Area */
.portal-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: 260px;
}

.portal-topbar {
  height: 64px;
  background: rgba(7, 9, 15, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 5;
}

.portal-topbar-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.portal-body {
  padding: 32px;
  flex: 1;
}

.portal-tab-content {
  display: none;
}

.portal-tab-content.active {
  display: block;
}

/* ── Dashboard Components ────────────────────────────────────────────────── */

/* Glass Cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  padding: 24px;
  margin-bottom: 24px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.glass-card:hover {
  border-color: var(--glass-border-glow);
}

.glass-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.glass-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Servers Grid */
.servers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.server-card {
  border-left: 4px solid var(--border);
}

.server-card.status-online {
  border-left-color: var(--status-online);
}

.server-card.status-offline {
  border-left-color: var(--status-offline);
}

.server-card.status-pending {
  border-left-color: var(--status-pending);
}

.server-card-header-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.server-meta {
  display: flex;
  flex-direction: column;
}

.server-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.server-info-subtext {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.server-info-subtext span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Status Indicator Dot */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}

.status-badge.online {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
}

.status-badge.offline {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.status-badge.restarting {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.restarting .status-dot {
  animation: pulse-glow 1s infinite alternate;
}

@keyframes pulse-glow {
  0% { opacity: 0.3; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.1); }
}

/* Power Controls */
.server-controls {
  display: flex;
  gap: 8px;
}

.btn-ctrl {
  background: rgba(7, 9, 15, 0.4);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.btn-ctrl:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.btn-ctrl.start:hover {
  color: var(--status-online);
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}

.btn-ctrl.stop:hover {
  color: var(--status-offline);
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.05);
}

.btn-ctrl.restart:hover {
  color: var(--status-pending);
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.05);
}

.btn-ctrl:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(7, 9, 15, 0.2) !important;
  color: var(--text-muted) !important;
  border-color: var(--border) !important;
}

/* Live Metrics Layout */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.metric-widget {
  background: rgba(7, 9, 15, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.metric-circle-wrap {
  width: 60px;
  height: 60px;
  position: relative;
}

.metric-circle-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.metric-circle-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 4;
}

.metric-circle-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease-in-out;
}

.metric-circle-progress.cpu { stroke: var(--accent); }
.metric-circle-progress.ram { stroke: #3b82f6; }
.metric-circle-progress.disk { stroke: #10b981; }

.metric-circle-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-details {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.metric-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}

.metric-subtext {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Console Simulator ── */
.console-box {
  background: #05070b;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: 'Consolas', 'Courier New', Courier, monospace;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
  position: relative;
}

.console-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
  z-index: 2;
}

.console-header {
  background: rgba(13, 17, 23, 0.9);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.console-dot-container {
  display: flex;
  gap: 6px;
}

.console-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.console-dot.red { background: #ef4444; }
.console-dot.yellow { background: #f59e0b; }
.console-dot.green { background: #10b981; }

.console-title {
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.console-actions-right {
  display: flex;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.console-terminal {
  padding: 16px;
  height: 240px;
  overflow-y: auto;
  color: #38bdf8;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.console-line {
  word-break: break-all;
}

.console-line.log-system { color: #8b949e; }
.console-line.log-info { color: #38bdf8; }
.console-line.log-success { color: #34d399; }
.console-line.log-warning { color: #fbbf24; }
.console-line.log-error { color: #f87171; }
.console-line.log-command { color: #a78bfa; font-weight: 600; }

.console-input-row {
  display: flex;
  align-items: center;
  background: rgba(7, 9, 15, 0.7);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
}

.console-prompt {
  color: #a78bfa;
  margin-right: 10px;
  font-weight: bold;
  user-select: none;
}

.console-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #f0f6fc;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

/* ── Subscriptions Tab ──────────────────────────────────────────────────── */
.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.service-sub-card {
  display: flex;
  flex-direction: column;
}

.service-sub-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.service-sub-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-soft);
  color: #a78bfa;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.service-sub-card.soon .service-sub-icon {
  background: rgba(245, 158, 11, 0.05);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.2);
}

.service-sub-meta {
  display: flex;
  flex-direction: column;
}

.service-sub-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.service-sub-status {
  font-size: 12px;
  color: var(--status-online);
  font-weight: 600;
}

.service-sub-card.soon .service-sub-status {
  color: var(--status-pending);
}

.service-sub-description {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
  flex: 1;
}

/* AI Chat Module */
.ai-agent-widget {
  background: rgba(7, 9, 15, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 380px;
}

.ai-agent-header {
  background: rgba(13, 17, 23, 0.8);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #a78bfa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  position: relative;
}

.ai-indicator-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  background: var(--status-online);
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
}

.ai-agent-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.ai-agent-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
}

.ai-chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.5;
}

.chat-bubble.ai {
  align-self: flex-start;
  background: rgba(22, 27, 34, 0.8);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-top-left-radius: 2px;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--text-primary);
  border-top-right-radius: 2px;
}

.chat-bubble code {
  font-family: monospace;
  background: rgba(0,0,0,0.3);
  padding: 2px 4px;
  border-radius: 3px;
  color: #a78bfa;
}

.chat-bubble pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 8px 0;
}

.chat-bubble pre code {
  color: inherit;
  background: transparent;
  padding: 0;
}

.ai-typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(22, 27, 34, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  align-self: flex-start;
  border-top-left-radius: 2px;
  opacity: 0.8;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-secondary);
  border-radius: 50%;
  animation: typing-bounce 1s infinite alternate;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

.ai-chat-input-row {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  background: rgba(13, 17, 23, 0.8);
  gap: 10px;
}

.ai-chat-input {
  flex: 1;
  background: rgba(7, 9, 15, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
}

.ai-chat-input:focus {
  border-color: var(--accent);
}

.btn-send-chat {
  width: 38px;
  height: 38px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn-send-chat:hover {
  background: var(--accent-dark);
  transform: scale(1.05);
}

/* ── Billing Tab ────────────────────────────────────────────────────────── */
.billing-limit-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.limit-progress-group {
  display: flex;
  flex-direction: column;
}

.limit-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.limit-title {
  font-weight: 600;
  color: var(--text-secondary);
}

.limit-stats {
  color: var(--text-primary);
}

.limit-bar-bg {
  height: 8px;
  background: rgba(7, 9, 15, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.limit-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #3b82f6 100%);
  border-radius: var(--radius-pill);
  transition: width 1s ease;
}

/* Glass table */
.glass-table-wrapper {
  overflow-x: auto;
}

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

.glass-table th {
  padding: 12px 16px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.glass-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.glass-table tbody tr {
  transition: background var(--transition);
}

.glass-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.glass-table td strong {
  color: var(--text-primary);
}

.btn-invoice-dl {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.btn-invoice-dl:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: var(--accent-soft);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-size: 13.5px;
  min-width: 280px;
  transform: translateX(120%);
  animation: slide-in-toast 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-in-toast {
  100% { transform: translateX(0); }
}

.toast.toast-success { border-left: 4px solid var(--status-online); }
.toast.toast-error { border-left: 4px solid var(--status-offline); }
.toast.toast-info { border-left: 4px solid var(--accent); }

.toast-icon {
  font-size: 16px;
}
.toast.toast-success .toast-icon { color: var(--status-online); }
.toast.toast-error .toast-icon { color: var(--status-offline); }
.toast.toast-info .toast-icon { color: #a78bfa; }

/* ── responsive adjustments ── */
@media (max-width: 768px) {
  .portal-container {
    flex-direction: column;
  }
  
  .portal-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 12px;
  }
  
  .sidebar-link {
    padding: 8px 12px;
    white-space: nowrap;
  }
  
  .sidebar-link.active {
    border-left: none;
    border-bottom: 3px solid var(--accent);
    padding-left: 12px;
    padding-bottom: 5px;
  }
  
  .sidebar-footer {
    display: none; /* Hide standard bottom bar, we handle logout differently or top bar */
  }

  .portal-topbar {
    padding: 0 16px;
  }
  
  .portal-body {
    padding: 16px;
  }
}
