/**
 * MUI V2 Digital Credentials Verification Styles.
 * DevOps VietNam Platform.
 * Design Standard: Apple-grade Clean Bento, DevOps Blue Accent.
 */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --verify-primary: #0267B2;
  --verify-primary-hover: #025696;
  --verify-secondary: #2D99E4;
  --verify-primary-light: rgba(2, 103, 178, 0.08);
  --verify-primary-border: rgba(2, 103, 178, 0.22);

  --verify-ink: #1D1D1F;
  --verify-ink-secondary: #48484A;
  --verify-muted: #6E6E73;
  --verify-subtle: #86868B;
  --verify-hairline: #E5E5E7;
  --verify-hairline-soft: #F2F2F7;

  --verify-bg-page: #FAFAFC;
  --verify-bg-card: #FFFFFF;

  --verify-success: #248A3D;
  --verify-success-bg: rgba(36, 138, 61, 0.08);
  --verify-danger: #DC2626;
  --verify-danger-bg: rgba(220, 38, 38, 0.08);

  --verify-radius-sm: 8px;
  --verify-radius-md: 14px;
  --verify-radius-lg: 20px;
  --verify-radius-xl: 28px;
  --verify-radius-full: 9999px;

  --verify-shadow-dock: 0 8px 30px rgba(0, 0, 0, 0.05);
  --verify-shadow-bento: 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 40px -10px rgba(2, 103, 178, 0.08);
  --verify-shadow-hover: 0 20px 48px -12px rgba(2, 103, 178, 0.16);

  --verify-font-sans: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --verify-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.verify-page-shell {
  min-height: calc(100vh - 380px);
  padding-bottom: 72px;
  font-family: var(--verify-font-sans);
  color: var(--verify-ink);
  overflow-x: hidden;
}

.verify-page-shell .container {
  width: 100%;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* =========================================================
   HERO SECTION & SEARCH COMPONENT
   ========================================================= */
.verify-page-shell .hero-section {
  padding: 48px 0 28px;
  text-align: center;
  position: relative;
}

.verify-page-shell .hero-content {
  max-width: 740px;
  margin-left: auto;
  margin-right: auto;
}

.verify-page-shell .hero-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--verify-ink);
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .verify-page-shell .hero-title {
    font-size: 28px;
  }
}

.verify-page-shell .hero-subtitle {
  font-size: 16px;
  color: var(--verify-muted);
  line-height: 1.6;
  max-width: 620px;
  margin: 0 auto 32px;
}

/* Verification Search Bar Outer */
.verify-page-shell .search-card-outer {
  max-width: 660px;
  width: 100%;
  margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid #D2D2D7;
  border-radius: var(--verify-radius-xl);
  padding: 7px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
}

.verify-page-shell .search-card-outer:focus-within {
  border-color: var(--verify-primary);
  box-shadow: 0 0 0 3px rgba(2, 103, 178, 0.12), 0 4px 16px rgba(2, 103, 178, 0.06);
}

.verify-page-shell .search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.verify-page-shell .search-icon {
  color: var(--verify-primary);
  margin-left: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.verify-page-shell input#credentialInput.search-input,
.verify-page-shell input#credentialInput.search-input:focus,
.verify-page-shell input#credentialInput.search-input:focus-visible,
.verify-page-shell input#credentialInput.search-input:hover,
.verify-page-shell input#credentialInput.search-input:active {
  flex: 1;
  min-width: 0;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--verify-font-mono);
  color: var(--verify-ink);
  padding: 12px 8px;
  background: transparent !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.verify-page-shell .search-input::placeholder {
  font-family: var(--verify-font-sans);
  font-weight: 400;
  color: var(--verify-subtle);
  text-transform: none;
  letter-spacing: normal;
  font-size: 15px;
}

.verify-page-shell .search-clear-btn {
  color: var(--verify-subtle);
  padding: 6px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.verify-page-shell .search-clear-btn:hover {
  color: var(--verify-ink);
  background-color: var(--verify-hairline-soft);
}

.verify-page-shell .search-clear-btn.active {
  display: flex;
}

.verify-page-shell .search-btn {
  background: var(--verify-primary);
  color: #FFFFFF;
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: var(--verify-radius-full);
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  box-shadow: none;
}

.verify-page-shell .search-btn:hover {
  background: var(--verify-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(2, 103, 178, 0.28);
}

.verify-page-shell .search-btn:active {
  transform: translateY(0);
}

.verify-page-shell .search-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* =========================================================
   RESULT PRESENTATION AREA (Dynamic Card)
   ========================================================= */
.verify-page-shell .result-section {
  padding: 16px 0 80px;
}

/* Loading State */
.verify-page-shell .loading-state {
  display: none;
  max-width: 880px;
  margin: 0 auto;
  background: #FFFFFF;
  border-radius: var(--verify-radius-xl);
  padding: 48px;
  text-align: center;
  box-shadow: var(--verify-shadow-bento);
  border: 1px solid var(--verify-hairline);
}

.verify-page-shell .spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid var(--verify-hairline);
  border-top-color: var(--verify-primary);
  border-radius: 50%;
  animation: verifySpin 0.8s linear infinite;
  margin: 0 auto 18px;
}

@keyframes verifySpin {
  to { transform: rotate(360deg); }
}

/* Initial Empty State */
.verify-page-shell .empty-state {
  max-width: 840px;
  margin: 0 auto;
  background: #FFFFFF;
  border-radius: var(--verify-radius-xl);
  padding: 56px 36px;
  text-align: center;
  border: 1px solid var(--verify-hairline);
  box-shadow: none;
}

.verify-page-shell .empty-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verify-page-shell .empty-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--verify-ink);
  margin-bottom: 8px;
}

.verify-page-shell .empty-desc {
  font-size: 14.5px;
  color: var(--verify-muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Clean Minimal Digital Credential Certificate Sheet */
.verify-page-shell .result-card {
  display: none;
  max-width: 900px;
  margin: 28px auto 0;
  background: #FFFFFF;
  border-radius: var(--verify-radius-xl);
  border: 1px solid #D2D2D7;
  box-shadow: var(--verify-shadow-bento);
  overflow: hidden;
  animation: verifyFadeIn 0.25s ease;
}

@keyframes verifyFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Minimal Card Header: Swapped Left/Right */
.verify-page-shell .cert-header {
  padding: 16px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--verify-hairline);
  background: #FAFAFC;
  flex-wrap: wrap;
  gap: 12px;
}

.verify-page-shell .cert-header-title-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--verify-ink);
  letter-spacing: -0.01em;
}

.verify-page-shell .cert-status-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--verify-success);
}

.verify-page-shell .cert-status-verified svg {
  flex-shrink: 0;
}

.verify-page-shell .cert-status-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--verify-success);
  letter-spacing: -0.01em;
}

/* Two-Column Body */
.verify-page-shell .cert-body {
  padding: 44px 44px 40px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 44px;
  align-items: stretch;
}

@media (max-width: 820px) {
  .verify-page-shell .cert-body {
    grid-template-columns: 1fr;
    padding: 28px 20px;
    gap: 28px;
  }
}

/* Left Column: Badge Emblem Display */
.verify-page-shell .cert-emblem-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding-right: 28px;
  border-right: 1px solid var(--verify-hairline-soft);
  height: 100%;
}

@media (max-width: 820px) {
  .verify-page-shell .cert-emblem-pane {
    padding-right: 0;
    padding-bottom: 24px;
    border-right: none;
    border-bottom: 1px solid var(--verify-hairline-soft);
  }
}

.verify-page-shell .cert-emblem-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.verify-page-shell .cert-badge-frame {
  width: 170px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  user-select: none;
}

.verify-page-shell .cert-badge-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.verify-page-shell .cert-badge-name {
  display: none !important;
}

.verify-page-shell .cert-official-seal {
  margin-top: auto;
  padding-top: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--verify-muted);
  white-space: nowrap;
}

/* Right Column: Clean Hierarchy & Clear Specs */
.verify-page-shell .cert-citation-pane {
  display: flex;
  flex-direction: column;
}

.verify-page-shell .cert-honor-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--verify-primary);
  margin-bottom: 6px;
}

.verify-page-shell .cert-recipient-name {
  font-size: 32px;
  font-weight: 800;
  color: var(--verify-ink);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 6px;
}

@media (max-width: 640px) {
  .verify-page-shell .cert-recipient-name {
    font-size: 25px;
  }
}

.verify-page-shell .cert-program-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--verify-ink-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Metadata Specs Grid */
.verify-page-shell .cert-meta-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 32px;
  margin-bottom: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--verify-hairline-soft);
  border-bottom: 1px solid var(--verify-hairline-soft);
}

@media (max-width: 560px) {
  .verify-page-shell .cert-meta-specs {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.verify-page-shell .cert-spec-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.verify-page-shell .spec-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--verify-muted);
}

.verify-page-shell .spec-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--verify-ink);
}

.verify-page-shell .spec-value.mono {
  font-family: var(--verify-font-mono);
  color: var(--verify-primary);
  letter-spacing: 0.02em;
}

.verify-page-shell .spec-value.highlight-lifetime {
  color: var(--verify-ink);
  font-weight: 600;
}

/* Scope & Criteria */
.verify-page-shell .cert-criteria-callout {
  margin-top: 2px;
}

.verify-page-shell .criteria-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--verify-muted);
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.verify-page-shell .criteria-text {
  font-size: 14px;
  color: var(--verify-ink-secondary);
  line-height: 1.65;
  margin: 0;
}

/* =========================================================
   UNVERIFIED / NOT FOUND STATE
   ========================================================= */
.verify-page-shell .cert-unverified-body {
  padding: 56px 36px 64px;
  text-align: center;
}

.verify-page-shell .unverified-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verify-page-shell .unverified-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--verify-ink);
  margin-bottom: 10px;
}

.verify-page-shell .unverified-code-badge,
.verify-page-shell .unverified-help {
  display: none !important;
}

.verify-page-shell .unverified-desc {
  font-size: 14.5px;
  color: var(--verify-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
}

.verify-page-shell .unverified-email {
  color: var(--verify-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}

.verify-page-shell .unverified-email:hover {
  color: var(--verify-primary-hover);
}

/* =========================================================
   ACTION DOCK
   ========================================================= */
.verify-page-shell .cert-actions-dock {
  max-width: 900px;
  margin: 20px auto 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.verify-page-shell .btn-action-primary,
.verify-page-shell .btn-action-primary:visited {
  background: #0A66C2 !important;
  color: #FFFFFF !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  padding: 10px 22px !important;
  border-radius: var(--verify-radius-full) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  border: none !important;
  outline: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 3px rgba(10, 102, 194, 0.15) !important;
  text-decoration: none !important;
}

.verify-page-shell .btn-action-primary:hover {
  background: #084e96 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(10, 102, 194, 0.28) !important;
  color: #FFFFFF !important;
}

.verify-page-shell .btn-action-primary:focus,
.verify-page-shell .btn-action-primary:focus-visible {
  background: #084e96 !important;
  color: #FFFFFF !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.25) !important;
}

.verify-page-shell .btn-action-primary:active {
  background: #063c74 !important;
  color: #FFFFFF !important;
  transform: translateY(0) !important;
  box-shadow: none !important;
  outline: none !important;
}

.verify-page-shell .btn-action-secondary,
.verify-page-shell .btn-action-secondary:visited {
  background: #EAF2F9 !important;
  color: #0267B2 !important;
  border: 1.5px solid #C4DCF0 !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  padding: 8.5px 20px !important;
  border-radius: 9999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  outline: none !important;
  box-shadow: 0 1px 2px rgba(2, 103, 178, 0.05) !important;
  text-decoration: none !important;
}

.verify-page-shell .btn-action-secondary svg {
  stroke: #0267B2 !important;
  flex-shrink: 0 !important;
  transition: stroke 0.2s ease !important;
}

.verify-page-shell .btn-action-secondary:hover {
  border-color: #0267B2 !important;
  color: #014c85 !important;
  background-color: #DFEDF8 !important;
  transform: translateY(-1px) !important;
  outline: none !important;
  box-shadow: 0 3px 10px rgba(2, 103, 178, 0.16) !important;
}

.verify-page-shell .btn-action-secondary:hover svg {
  stroke: #014c85 !important;
}

.verify-page-shell .btn-action-secondary:focus,
.verify-page-shell .btn-action-secondary:focus-visible {
  border-color: #0267B2 !important;
  color: #014c85 !important;
  background-color: #DFEDF8 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(2, 103, 178, 0.2) !important;
  transform: none !important;
}

.verify-page-shell .btn-action-secondary:focus svg,
.verify-page-shell .btn-action-secondary:focus-visible svg {
  stroke: #014c85 !important;
}

.verify-page-shell .btn-action-secondary:active {
  background-color: #D2E5F5 !important;
  border-color: #014c85 !important;
  color: #014c85 !important;
  outline: none !important;
  box-shadow: none !important;
  transform: translateY(0) !important;
}

.verify-page-shell .btn-action-secondary:active svg {
  stroke: #014c85 !important;
}

/* Toast */
.verify-page-shell .toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: #1D1D1F;
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--verify-radius-md);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.25);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

.verify-page-shell .toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* =========================================================
   COMPREHENSIVE MOBILE RESPONSIVE STYLES (Verification Center)
   ========================================================= */
@media (max-width: 640px) {
  .verify-page-shell .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .verify-page-shell .hero-section {
    padding: 32px 0 20px;
  }

  .verify-page-shell .hero-title {
    font-size: 24px;
    line-height: 1.25;
    margin-bottom: 10px;
  }

  .verify-page-shell .hero-subtitle {
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 22px;
  }

  /* Search Card Mobile Stacked Layout (Fixes cut-off / overflow bug) */
  .verify-page-shell .search-card-outer {
    border-radius: 20px;
    padding: 8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  }

  .verify-page-shell .search-form {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0;
  }

  .verify-page-shell .search-icon {
    grid-column: 1;
    grid-row: 1;
    margin-left: 8px;
    margin-right: 4px;
  }

  .verify-page-shell input#credentialInput.search-input {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    width: 100%;
    font-size: 15px;
    padding: 10px 4px;
    letter-spacing: 0.02em;
  }

  .verify-page-shell .search-input::placeholder {
    font-size: 13.5px;
  }

  .verify-page-shell .search-clear-btn {
    grid-column: 3;
    grid-row: 1;
    margin-right: 4px;
    padding: 6px;
  }

  .verify-page-shell .search-btn {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    padding: 12px 20px;
    font-size: 14.5px;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(2, 103, 178, 0.2);
  }

  /* Result Area & Card */
  .verify-page-shell .result-section {
    padding: 12px 0 60px;
  }

  .verify-page-shell .cert-header {
    padding: 14px 18px;
    gap: 8px;
  }

  .verify-page-shell .cert-header-title-text {
    font-size: 13.5px;
  }

  .verify-page-shell .cert-status-title,
  .verify-page-shell .cert-status-unverified span {
    font-size: 13px;
  }

  .verify-page-shell .cert-body {
    padding: 24px 18px 28px;
    gap: 20px;
  }

  .verify-page-shell .cert-emblem-pane {
    padding-bottom: 20px;
  }

  .verify-page-shell .cert-badge-frame {
    width: 140px;
    height: 140px;
  }

  .verify-page-shell .cert-recipient-name {
    font-size: 22px;
    margin-bottom: 4px;
  }

  .verify-page-shell .cert-program-name {
    font-size: 14px;
    margin-bottom: 18px;
  }

  .verify-page-shell .cert-meta-specs {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 0;
    margin-bottom: 18px;
  }

  .verify-page-shell .cert-actions-dock {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-top: 16px;
  }

  .verify-page-shell .btn-action-primary,
  .verify-page-shell .btn-action-secondary {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 11px 20px !important;
    font-size: 14px !important;
  }

  .verify-page-shell .cert-unverified-body {
    padding: 36px 18px 40px;
  }

  .verify-page-shell .empty-state {
    padding: 36px 18px;
  }

  .verify-page-shell .toast {
    bottom: 20px;
    right: 16px;
    left: 16px;
    justify-content: center;
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .verify-page-shell input#credentialInput.search-input {
    font-size: 13.5px;
    letter-spacing: 0;
  }

  .verify-page-shell .search-btn {
    font-size: 13.5px;
    padding: 10px 16px;
  }
}
