/*--------------------------------------------------------------
# PR2U Admin APK Upload Portal Styles
# Luxury Midnight Obsidian & Champagne Gold Theme
--------------------------------------------------------------*/

:root {
  --bg-main: #090d16;
  --bg-surface: #0d1424;
  --bg-card: #131b2e;
  --bg-card-hover: #17223b;
  --gold-primary: #d4af37;
  --gold-light: #f7e59c;
  --gold-dark: #a67c1e;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --gold-border: rgba(212, 175, 55, 0.22);
  --text-white: #ffffff;
  --text-light: #f1f5f9;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-ruby: #b91c3d;
  --accent-sapphire: #0284c7;
  --accent-violet: #7c3aed;
  --accent-emerald: #10b981;
}

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

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--gold-light);
  text-decoration: none;
  transition: all 0.25s ease;
}

a:hover {
  color: #ffffff;
}

/* Header & Top Bar */
.admin-navbar {
  background: rgba(9, 13, 22, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gold-border);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-logo {
  max-height: 42px;
  filter: drop-shadow(0 4px 10px rgba(212, 175, 55, 0.35));
}

.admin-title-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
}

.admin-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-nav-outline {
  background: rgba(255, 255, 255, 0.05);
  color: var(--gold-light);
  border: 1px solid var(--gold-border);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-nav-outline:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  color: #ffffff;
}

.btn-nav-danger {
  background: rgba(185, 28, 61, 0.15);
  color: #fda4af;
  border: 1px solid rgba(185, 28, 61, 0.35);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-nav-danger:hover {
  background: #b91c3d;
  color: #ffffff;
}

/* Container */
.admin-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 30px 20px 60px 20px;
  flex: 1;
  width: 100%;
}

/* Page Heading */
.dashboard-header {
  margin-bottom: 28px;
}

.dashboard-title {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-title i {
  color: var(--gold-primary);
}

.dashboard-desc {
  color: var(--text-muted);
  font-size: 14.5px;
  margin-top: 4px;
}

/* Grid for Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 22px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Product Card */
.admin-product-card {
  background: linear-gradient(145deg, #131b2e 0%, #0d1424 100%);
  border: 1px solid var(--gold-border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.admin-product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f7e59c, #d4af37);
  opacity: 0.8;
}

.admin-product-card[data-app="pr2u"]::before { background: linear-gradient(90deg, #f7e59c, #d4af37); }
.admin-product-card[data-app="pr2u-kiosk"]::before { background: linear-gradient(90deg, #38bdf8, #0284c7); }
.admin-product-card[data-app="pr2u-self-checkout"]::before { background: linear-gradient(90deg, #34d399, #10b981); }
.admin-product-card[data-app="pr2u-ktv-client"]::before { background: linear-gradient(90deg, #c084fc, #7c3aed); }
.admin-product-card[data-app="pr2u-mummy"]::before { background: linear-gradient(90deg, #fb7185, #b91c3d); }

.card-header-flex {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.app-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #ffffff;
  flex-shrink: 0;
}

.app-icon.icon-pr2u { background: linear-gradient(135deg, #dfbe65 0%, #a67c1e 100%); color: #0a0e17; }
.app-icon.icon-kiosk { background: linear-gradient(135deg, #0ea5e9 0%, #1e40af 100%); }
.app-icon.icon-checkout { background: linear-gradient(135deg, #10b981 0%, #047857 100%); }
.app-icon.icon-ktv { background: linear-gradient(135deg, #a855f7 0%, #6b21a8 100%); }
.app-icon.icon-mummy { background: linear-gradient(135deg, #f43f5e 0%, #881337 100%); }

.app-info-wrap {
  flex-grow: 1;
}

.app-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold-light);
  margin-bottom: 2px;
}

/* Version & Build Badges */
.app-version-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
  letter-spacing: 0.2px;
}

.build-sub-pill {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  padding: 0 5px;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 700;
}

.version-name-tag {
  color: #7dd3fc;
  font-weight: 700;
  margin-right: 6px;
  font-size: 12.5px;
}

.version-code-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: rgba(212, 175, 55, 0.15);
  color: #f7e59c;
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 1px 7px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.badge-version-modal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.app-name {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.app-target-file {
  font-size: 12px;
  font-family: monospace;
  color: #94a3b8;
}

/* File Metadata Stats Box */
.file-meta-box {
  background: rgba(9, 13, 22, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 12.5px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
}

.meta-label {
  color: var(--text-dim);
}

.meta-val {
  font-weight: 600;
  color: #ffffff;
}

.meta-val.hash {
  font-family: monospace;
  font-size: 11px;
  color: var(--gold-light);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dropzone */
.dropzone-area {
  border: 2px dashed rgba(212, 175, 55, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 14px;
}

.dropzone-area:hover, .dropzone-area.dragover {
  border-color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.dropzone-icon {
  font-size: 28px;
  color: var(--gold-primary);
  margin-bottom: 6px;
}

.dropzone-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
}

.dropzone-hint {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Upload Progress Bar */
.upload-progress-box {
  display: none;
  background: rgba(9, 13, 22, 0.85);
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.upload-progress-box.active {
  display: block;
}

.progress-info-flex {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #ffffff;
}

.progress-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f7e59c, #d4af37, #a67c1e);
  border-radius: 10px;
  transition: width 0.2s ease;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

/* Card Actions */
.card-actions-flex {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.card-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.btn-card-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
  font-size: 11.5px;
  font-weight: 600;
  padding: 8px 6px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  white-space: nowrap;
}

.btn-card-action:hover {
  background: rgba(212, 175, 55, 0.15);
  color: #ffffff;
  border-color: var(--gold-primary);
  transform: translateY(-1px);
}

.btn-card-action.btn-card-primary {
  background: rgba(212, 175, 55, 0.14);
  border-color: rgba(212, 175, 55, 0.4);
  color: #f7e59c;
}

.btn-card-action.btn-card-primary:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.3) 0%, rgba(166, 124, 30, 0.3) 100%);
  border-color: var(--gold-primary);
  color: #ffffff;
}

/* Audit Log Table */
.audit-section {
  background: linear-gradient(145deg, #131b2e 0%, #0d1424 100%);
  border: 1px solid var(--gold-border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.audit-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.audit-table th {
  text-align: left;
  padding: 10px 14px;
  background: rgba(9, 13, 22, 0.6);
  color: var(--gold-light);
  font-weight: 600;
  border-bottom: 1px solid var(--gold-border);
}

.audit-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

.audit-table tr:hover td {
  background: rgba(212, 175, 55, 0.04);
}

.log-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.log-badge.success { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.log-badge.warn { background: rgba(245, 158, 11, 0.18); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.3); }
.log-badge.error { background: rgba(244, 63, 94, 0.18); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.3); }

/* Login Modal / Container */
.login-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: linear-gradient(145deg, #131b2e 0%, #0d1424 100%);
  border: 1px solid var(--gold-border);
  border-radius: 22px;
  padding: 38px 32px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  text-align: center;
  position: relative;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f7e59c, #d4af37, #a67c1e);
}

.login-logo {
  max-width: 220px;
  margin-bottom: 20px;
  filter: drop-shadow(0 6px 18px rgba(212, 175, 55, 0.35));
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.login-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc !important;
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}

.form-group small,
.form-group .text-muted {
  color: #94a3b8 !important;
  font-size: 12px !important;
  margin-top: 5px;
  display: block;
}

/* High-Contrast Inputs (Login, Modals, Forms) */
.form-control,
input.form-control,
input[type="text"],
input[type="password"] {
  width: 100%;
  background: #162036 !important;
  border: 1.5px solid rgba(212, 175, 55, 0.45) !important;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff !important;
  caret-color: #f59e0b;
  outline: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.form-control:focus,
input.form-control:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  background: #1e293b !important;
  color: #ffffff !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3), 0 0 16px rgba(245, 158, 11, 0.2) !important;
  outline: none !important;
}

.form-control::placeholder,
input::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
  font-weight: 400;
  font-size: 13.5px;
}

/* Browser Autofill Contrast Fix (Chrome, Edge, Safari) */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0px 1000px #162036 inset !important;
  box-shadow: 0 0 0px 1000px #162036 inset !important;
  transition: background-color 5000s ease-in-out 0s !important;
  caret-color: #ffffff !important;
  color: #ffffff !important;
}

/* Readonly Inputs (e.g. Share URLs) */
.form-control[readonly],
input[readonly] {
  background: #0d1527 !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  font-weight: 600;
  cursor: text;
}

.btn-login {
  width: 100%;
  background: linear-gradient(135deg, #dfbe65 0%, #c59e35 50%, #a67c1e 100%);
  color: #0a0e17;
  font-size: 14.5px;
  font-weight: 700;
  padding: 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.4);
  transition: all 0.25s ease;
}

.btn-login:hover {
  background: linear-gradient(135deg, #f5d77f 0%, #dfbe65 50%, #b8860b 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.6);
}

/* Modals */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-modal.show {
  display: flex;
}

.admin-modal-content {
  background: linear-gradient(145deg, #131b2e 0%, #0d1424 100%);
  border: 1px solid var(--gold-border);
  border-radius: 20px;
  max-width: 530px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 26px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  position: relative;
}

.admin-modal-content::-webkit-scrollbar {
  width: 6px;
}
.admin-modal-content::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 10px;
}

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

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #ffffff;
}

/* Toast */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #090d16;
  border: 1px solid var(--gold-border);
  color: #ffffff;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
  z-index: 99999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.admin-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Remote Automation & CLI Section */
.cli-section {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 35px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.cli-section-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cli-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cli-section-title i {
  color: var(--gold-primary);
}

.cli-section-desc {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.api-key-badge-box {
  display: flex;
  flex-direction: column;
  background: rgba(10, 14, 23, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 22px;
  gap: 8px;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.api-key-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.api-key-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.api-key-label i {
  color: var(--gold-primary);
}

.api-key-value-wrap {
  background: #060910;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  max-width: 100%;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.api-key-value {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  color: #5eead4;
  letter-spacing: 0.5px;
  word-break: break-all;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  line-height: 1.5;
  user-select: all;
  -webkit-user-select: all;
  display: block;
  width: 100%;
  max-width: 100%;
}

.btn-copy-key {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-copy-key:hover {
  background: var(--gold-primary);
  color: #000000;
}

.cli-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.cli-card {
  background: rgba(11, 16, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  min-width: 0;
}

.cli-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.cli-snippet {
  background: #060910;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cli-snippet code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  color: #f1f5f9;
  font-size: 13px;
}

.btn-snippet-copy {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
  transition: color 0.2s;
}

.btn-snippet-copy:hover {
  color: var(--gold-primary);
}

.cli-download-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-cli-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.08) 100%);
  border: 1px solid var(--gold-border);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-cli-download:hover {
  background: var(--gold-primary);
  color: #000000;
  transform: translateY(-1px);
}

.btn-cli-sub {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
}

.btn-cli-sub:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Time-Limited Public Share Modal & Duration Pills */
.share-tabs-nav {
  display: flex;
  background: rgba(9, 13, 22, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
}

.share-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.share-tab-btn.active {
  background: rgba(212, 175, 55, 0.18);
  color: #f7e59c;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.duration-pills-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 6px;
  margin: 8px 0 14px;
}

.btn-duration-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 6px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-duration-pill:hover {
  background: rgba(212, 175, 55, 0.12);
  color: #fff;
  border-color: var(--gold-primary);
}

.btn-duration-pill.active {
  background: linear-gradient(135deg, #dfbe65 0%, #a67c1e 100%);
  border-color: var(--gold-light);
  color: #0a0e17;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(212, 175, 55, 0.35);
}

.custom-days-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(212, 175, 55, 0.28);
  border-radius: 9px;
  padding: 6px 10px;
  margin-top: 6px;
  transition: all 0.2s ease;
}

.custom-days-row:hover,
.custom-days-row.active {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
}

.custom-days-label {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  white-space: nowrap;
}

.custom-days-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.custom-days-input {
  width: 65px;
  background: rgba(9, 13, 22, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 6px;
  color: #ffffff;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.custom-days-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.35);
  background: rgba(9, 13, 22, 0.95);
}

.custom-days-unit {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 600;
}

.btn-custom-days-apply {
  background: rgba(212, 175, 55, 0.18);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: #f7e59c;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-custom-days-apply:hover,
.custom-days-row.active .btn-custom-days-apply {
  background: linear-gradient(135deg, #dfbe65 0%, #a67c1e 100%);
  color: #0a0e17;
  border-color: var(--gold-light);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35);
}

.share-expiry-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  color: #7dd3fc;
  margin-bottom: 14px;
}

.share-expiry-indicator strong {
  color: #ffffff;
  font-family: monospace;
}

.qr-display-box {
  background: #ffffff;
  padding: 16px;
  border-radius: 16px;
  display: inline-block;
  margin: 4px auto 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  max-width: 100%;
}

.qr-display-box canvas, .qr-display-box img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/*--------------------------------------------------------------
# Comprehensive Mobile Responsiveness Breakpoints
--------------------------------------------------------------*/
@media (max-width: 768px) {
  .admin-navbar {
    padding: 10px 14px;
  }
  .admin-brand {
    gap: 8px;
  }
  .admin-logo {
    max-height: 34px;
  }
  .admin-title-badge {
    font-size: 10px;
    padding: 3px 8px;
  }
  .admin-nav-actions {
    gap: 6px;
  }
  .btn-nav-outline, .btn-nav-danger {
    padding: 6px 10px;
    font-size: 12px;
  }
  .admin-container {
    padding: 18px 12px 50px 12px;
  }
  .dashboard-header {
    margin-bottom: 20px;
  }
  .dashboard-title {
    font-size: 21px;
  }
  .dashboard-desc {
    font-size: 13px;
  }
  .admin-product-card {
    padding: 18px 14px;
    border-radius: 16px;
  }
  .card-header-flex {
    gap: 12px;
  }
  .app-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
  .app-name {
    font-size: 17px;
  }
  .file-meta-box {
    padding: 10px 12px;
  }
  .meta-row {
    font-size: 12px;
  }
  .cli-section {
    padding: 16px 12px;
  }
  .cli-section-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
  }
  .api-key-badge-box {
    padding: 10px 12px;
    margin-bottom: 16px;
    width: 100%;
  }
  .api-key-value-wrap {
    padding: 7px 10px;
  }
  .api-key-value {
    font-size: 11.5px;
  }
  .cli-snippet {
    padding: 8px 10px;
    gap: 6px;
  }
  .cli-snippet code {
    font-size: 11.5px;
    word-break: break-all;
  }
  .btn-cli-download {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    padding: 9px 12px;
  }
  .cli-cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .cli-card {
    padding: 14px;
  }
  .audit-section {
    padding: 16px 12px;
  }
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-toast {
    left: 12px;
    right: 12px;
    bottom: 16px;
    padding: 12px 16px;
    font-size: 13px;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .admin-navbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .admin-title-badge {
    display: none;
  }
  .admin-nav-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .card-actions-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .btn-card-action {
    font-size: 11px;
    padding: 8px 4px;
    min-height: 40px;
  }
  .admin-modal {
    padding: 10px;
  }
  .admin-modal-content {
    padding: 18px 14px;
    border-radius: 16px;
  }
  .duration-pills-wrap {
    grid-template-columns: repeat(3, 1fr);
  }
  .login-card {
    padding: 26px 16px;
    border-radius: 18px;
  }
  .login-title {
    font-size: 19px;
  }
  .api-key-badge-box {
    padding: 8px 10px;
  }
  .api-key-label {
    font-size: 11px;
  }
  .api-key-value-wrap {
    padding: 6px 8px;
  }
  .api-key-value {
    font-size: 11px;
    letter-spacing: 0px;
  }
  .btn-copy-key {
    padding: 4px 8px;
    font-size: 11px;
  }
}

/* ==================================================================== */
/* Passkeys (WebAuthn / FIDO2) Security Styles                           */
/* ==================================================================== */

.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.login-divider span {
  padding: 0 12px;
  text-transform: uppercase;
}

.btn-passkey-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.25) 100%);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.45);
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}

.btn-passkey-login:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(5, 150, 105, 0.4) 100%);
  border-color: #6ee7b7;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-passkey-login i {
  font-size: 19px;
}

.btn-passkey-login:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.passkey-login-hint {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 8px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Dashboard Passkeys Section */
.passkey-section {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.passkey-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.passkey-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.passkey-section-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
  max-width: 620px;
  line-height: 1.5;
}

.btn-register-passkey {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-register-passkey:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

/* Passkeys Table */
.passkey-table {
  width: 100%;
  border-collapse: collapse;
}

.passkey-table th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 700;
  text-align: left;
}

.passkey-table td {
  padding: 14px;
  font-size: 13px;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

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

.passkey-device-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.passkey-device-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.passkey-name-title {
  font-weight: 700;
  color: #ffffff;
  font-size: 13.5px;
  margin-bottom: 2px;
}

.passkey-name-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
}

.btn-revoke-passkey {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-revoke-passkey:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Empty State Card */
.passkey-empty-card {
  text-align: center;
  padding: 32px 16px;
  background: rgba(255, 255, 255, 0.015);
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.passkey-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.btn-passkey-cta {
  display: inline-flex;
  width: auto;
  padding: 10px 22px;
}
