/* UNLOCKBOX PRO - Web Management Portal Stylesheet */
:root {
  --bg-dark: #0f1117;
  --bg-card: #181b24;
  --bg-card-hover: #1f2330;
  --border-color: #272d3d;
  --accent-gold: #ffaa00;
  --accent-cyan: #00bcd4;
  --accent-blue: #0078d7;
  --accent-green: #3ddc84;
  --accent-red: #ff4757;
  --text-main: #f0f3f8;
  --text-muted: #8c96a8;
  --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Consolas', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.portal-header {
  background-color: #141720;
  border-bottom: 1px solid var(--border-color);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-brand {
  width: 210px;
  height: 52px;
  flex: 0 0 210px;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-decoration: none;
}

.logo-brand img {
  display: block;
  width: 210px;
  height: auto;
  max-width: 210px;
  max-height: 48px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.logo-brand img:hover {
  transform: scale(1.02);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 12px;
  overflow-x: auto;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s;
  cursor: pointer;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent-gold);
  background-color: rgba(255, 170, 0, 0.1);
}

.user-quick-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1c202c;
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 20px;
}

.credit-pill {
  background: rgba(61, 220, 132, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(61, 220, 132, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 12px;
}

/* Main Container */
.portal-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px 70px;
  width: 100%;
  flex: 1;
}

/* Hero Stats Banner */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s, border-color 0.2s;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-val {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}
.stat-lbl {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

/* Sections */
.portal-section {
  display: none;
}
.portal-section.active {
  display: block;
}

.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Plan Cards */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.plan-card {
  background: #141721;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.2s;
}
.plan-card:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.plan-card.featured {
  border: 2px solid var(--accent-gold);
}

.plan-badge {
  position: absolute;
  top: -12px;
  background: var(--accent-gold);
  color: #000;
  font-weight: 800;
  font-size: 11px;
  padding: 3px 12px;
  border-radius: 20px;
  text-transform: uppercase;
}

.plan-name {
  font-size: 18px;
  font-weight: 700;
  margin: 8px 0;
}

.plan-price {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 16px;
}
.plan-price span {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: normal;
}

.plan-features {
  list-style: none;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  text-align: left;
}
.plan-features li::before {
  content: "✓ ";
  color: var(--accent-green);
  font-weight: bold;
}

.btn-primary {
  background: linear-gradient(135deg, #ffaa00 0%, #e65100 100%);
  color: #000;
  border: none;
  padding: 10px 20px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  transition: opacity 0.2s;
}
.btn-primary:hover {
  opacity: 0.9;
}

/* Tables */
.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.portal-table th {
  background: #13161f;
  color: var(--text-muted);
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
}
.portal-table td {
  padding: 12px;
  border-bottom: 1px solid #1f2330;
  color: #d1d6e2;
}
.portal-table tr:hover {
  background: #1c202c;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  background: #12151d;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

/* Public Landing Page & Home Styles */
.public-hero {
  padding: 50px 0 35px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 25px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 170, 0, 0.12);
  border: 1px solid rgba(255, 170, 0, 0.3);
  color: var(--accent-gold);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 38px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
  color: #fff;
}

.hero-title span {
  background: linear-gradient(135deg, #fff, var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-preview-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-preview-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* Platform Chipsets Grid */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.platform-card {
  background: #131620;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.platform-card:hover {
  border-color: rgba(255, 170, 0, 0.4);
}

.platform-chip {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.platform-mode {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-cyan);
  background: rgba(0, 188, 212, 0.12);
  padding: 2px 7px;
  border-radius: 4px;
}

.platform-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.feature-item {
  background: #131620;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 18px;
}

.feature-icon {
  font-size: 22px;
  margin-bottom: 10px;
}

.feature-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
}

.feature-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Auth Guard Notice */
.auth-locked-notice {
  text-align: center;
  padding: 48px 24px;
  background: #141722;
  border: 1px dashed var(--border-color);
  border-radius: 10px;
  margin: 20px 0;
}

.auth-locked-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.auth-locked-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.auth-locked-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

/* Persistent Bottom Navbar / Footer Overlay */
.portal-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 48px;
  background: rgba(11, 13, 18, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  padding: 0 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.portal-footer .footer-copy {
  font-weight: 700;
  color: #f0f3f8;
  letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 1024px) {
  .logo-brand {
    width: 185px;
    flex: 0 0 185px;
    height: 48px;
  }
  .logo-brand img {
    width: 185px;
    max-width: 185px;
    max-height: 44px;
  }
  .header-nav {
    gap: 12px;
  }
  .public-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .portal-header {
    padding: 0 16px;
    height: 56px;
  }
  .logo-brand {
    width: 160px;
    flex: 0 0 160px;
    height: 44px;
  }
  .logo-brand img {
    width: 160px;
    max-width: 160px;
    max-height: 40px;
  }
  .user-quick-profile {
    display: none;
  }
  .platform-grid {
    grid-template-columns: 1fr;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 28px;
  }
  .portal-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 20px 16px;
  }
}

/* ========================================================= */
/* Developer & Role-Based Modular Styles                     */
/* ========================================================= */
.dev-layout {
  display: flex;
  gap: 24px;
  margin-top: 10px;
}
.dev-sidebar {
  width: 250px;
  flex: 0 0 250px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: fit-content;
}
.dev-sidebar-title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  font-weight: 700;
  margin: 12px 0 4px 8px;
}
.dev-sidebar-title:first-child {
  margin-top: 4px;
}
.dev-sidebar-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--text-main);
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  width: 100%;
}
.dev-sidebar-btn:hover {
  background: rgba(255, 170, 0, 0.1);
  color: var(--accent-gold);
}
.dev-sidebar-btn.active {
  background: var(--accent-gold);
  color: #000;
  font-weight: 700;
}
.dev-content-area {
  flex: 1;
  min-width: 0;
}
.dev-tab-pane {
  display: none;
}
.dev-tab-pane.active {
  display: block;
}

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-badge.approved, .status-badge.confirmed {
  background: rgba(61, 220, 132, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(61, 220, 132, 0.3);
}
.status-badge.quarantined, .status-badge.in_review, .status-badge.pending {
  background: rgba(255, 170, 0, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 170, 0, 0.3);
}
.status-badge.rejected, .status-badge.reversed, .status-badge.revoked {
  background: rgba(255, 71, 87, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.auth-alert-box {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13.5px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.auth-alert-box.info {
  background: rgba(0, 188, 212, 0.12);
  border: 1px solid rgba(0, 188, 212, 0.3);
  color: #00bcd4;
}
.auth-alert-box.success {
  background: rgba(61, 220, 132, 0.12);
  border: 1px solid rgba(61, 220, 132, 0.3);
  color: #3ddc84;
}
.auth-alert-box.warning {
  background: rgba(255, 170, 0, 0.12);
  border: 1px solid rgba(255, 170, 0, 0.3);
  color: #ffaa00;
}
.auth-alert-box.error {
  background: rgba(255, 71, 87, 0.12);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: #ff4757;
}

@media (max-width: 900px) {
  .dev-layout {
    flex-direction: column;
  }
  .dev-sidebar {
    width: 100%;
    flex: none;
  }
}
