/* ============================================================
   StarGold Verification — verify.css  v1.1
   ============================================================ */

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

/* ── Design tokens ── */
:root {
    --sgv-gold: #C3945B;
    --sgv-gold-light: #b08149;
    --sgv-gold-dark: #91683a;
    --sgv-bg: #FBF9F7;
    --sgv-surface: #FBF9F7;
    --sgv-surface-2: rgba(67, 23, 21, 0.04);
    --sgv-border: rgba(195, 148, 91, .35);
    --sgv-text: #431715;
    --sgv-text-muted: rgba(67, 23, 21, 0.65);
    --sgv-green: #683533;
    --sgv-green-bg: rgba(104, 53, 51, .1);
    --sgv-red: #e05c6a;
    --sgv-red-bg: rgba(224, 92, 106, .1);
    --sgv-radius: 16px;
    --sgv-radius-sm: 10px;
    --sgv-shadow: 0 8px 32px rgba(67, 23, 21, .06);
    --sgv-transition: .2s ease;
    --sgv-font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Wrapper ── */
.sgv-wrap {
    font-family: var(--sgv-font);
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1rem;
    color: var(--sgv-text);
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   FORM
   ============================================================ */

.sgv-form-wrap {
    background: var(--sgv-surface);
    border: 1px solid var(--sgv-border);
    border-radius: var(--sgv-radius);
    box-shadow: var(--sgv-shadow);
    overflow: hidden;
}

.sgv-form-header {
    text-align: center;
    padding: 2.5rem 2rem 1.75rem;
    background: linear-gradient(160deg, rgba(195, 148, 91, .08) 0%, transparent 60%);
    border-bottom: 1px solid var(--sgv-border);
}

.sgv-form-header__icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    color: var(--sgv-gold);
    background: rgba(195, 148, 91, .12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.sgv-form-header__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sgv-gold-light);
    margin: 0 0 .4rem;
    letter-spacing: -.02em;
}

.sgv-form-header__sub {
    font-size: .875rem;
    color: var(--sgv-text-muted);
    margin: 0;
    line-height: 1.55;
}

.sgv-form {
    padding: 1.75rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.sgv-form__group {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    position: relative;
}

.sgv-form__label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--sgv-text-muted);
    text-transform: uppercase;
    letter-spacing: .07em;
}

.sgv-required {
    color: var(--sgv-gold);
    margin-left: .2rem;
}

.sgv-form__input {
    width: 100%;
    background: var(--sgv-surface-2);
    border: 1px solid var(--sgv-border);
    border-radius: var(--sgv-radius-sm);
    color: var(--sgv-text);
    font-family: var(--sgv-font);
    font-size: .9375rem;
    padding: .75rem 1rem;
    transition: border-color var(--sgv-transition), box-shadow var(--sgv-transition);
    box-sizing: border-box;
    outline: none;
}

.sgv-form__input::placeholder {
    color: var(--sgv-text-muted);
    opacity: .6;
}

.sgv-form__input:focus {
    border-color: var(--sgv-gold);
    box-shadow: 0 0 0 3px rgba(195, 148, 91, .18);
}

/* File upload zone */
.sgv-form__file {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.sgv-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    background: var(--sgv-surface-2);
    border: 2px dashed var(--sgv-border);
    border-radius: var(--sgv-radius-sm);
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: border-color var(--sgv-transition), background var(--sgv-transition);
    text-align: center;
}

.sgv-upload:hover,
.sgv-upload--has-file {
    border-color: var(--sgv-gold);
    background: rgba(195, 148, 91, .06);
}

.sgv-upload__icon {
    width: 36px;
    height: 36px;
    color: var(--sgv-gold);
}

.sgv-upload__text {
    font-size: .85rem;
    color: var(--sgv-text-muted);
    line-height: 1.4;
    word-break: break-all;
}

/* Notices */
.sgv-notice {
    margin: 0 2rem;
    padding: .8rem 1rem;
    border-radius: var(--sgv-radius-sm);
    font-size: .875rem;
    line-height: 1.5;
}

.sgv-notice--error {
    background: var(--sgv-red-bg);
    border: 1px solid rgba(224, 92, 106, .35);
    color: var(--sgv-red);
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */

@keyframes sgv-spin {
    to {
        transform: rotate(360deg);
    }
}

.sgv-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(26, 18, 0, .35);
    border-top-color: #1a1200;
    border-radius: 50%;
    animation: sgv-spin .7s linear infinite;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.sgv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-family: var(--sgv-font);
    font-size: .95rem;
    font-weight: 600;
    border-radius: var(--sgv-radius-sm);
    padding: .85rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}

.sgv-btn--primary {
    background: linear-gradient(135deg, var(--sgv-gold) 0%, #D7AE7A 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(195, 148, 91, .25);
}

.sgv-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(195, 148, 91, .45);
    background: linear-gradient(135deg, #b8854a 0%, #C3945B 100%);
}

.sgv-btn--primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(195, 148, 91, .2);
}

.sgv-btn--primary:disabled {
    opacity: .75;
    cursor: not-allowed;
    transform: none;
}

.sgv-btn--outline {
    background: #fff;
    border: 1px solid var(--sgv-border);
    color: var(--sgv-text-muted);
}

.sgv-btn--outline:hover {
    border-color: var(--sgv-gold);
    color: var(--sgv-gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(195, 148, 91, .12);
}

.sgv-btn--outline:active {
    transform: translateY(1px);
}

.sgv-btn--outline-danger {
    background: #fff;
    border: 1px solid rgba(224, 92, 106, .4);
    color: var(--sgv-red);
}

.sgv-btn--outline-danger:hover {
    border-color: var(--sgv-red);
    background: var(--sgv-red-bg);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(224, 92, 106, .15);
}

.sgv-btn--outline-danger:active {
    transform: translateY(1px);
}

.sgv-btn--dashed {
    background: rgba(195, 148, 91, 0.04);
    border: 1.5px dashed rgba(195, 148, 91, 0.6);
    color: var(--sgv-gold-dark);
}

.sgv-btn--dashed:hover {
    background: rgba(195, 148, 91, 0.1);
    border-color: var(--sgv-gold);
    color: var(--sgv-gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(195, 148, 91, .15);
}

.sgv-btn--dashed:active {
    transform: translateY(1px);
}

/* ============================================================
   RESULT CARD
   ============================================================ */

.sgv-card {
    background: var(--sgv-surface);
    border: 1px solid var(--sgv-border);
    border-radius: var(--sgv-radius);
    box-shadow: var(--sgv-shadow);
    padding: 2.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
}

.sgv-card--authentic {
    border-top: 3px solid var(--sgv-green);
}

.sgv-card--not-found {
    border-top: 3px solid var(--sgv-red);
}

.sgv-card__icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

.sgv-card--authentic .sgv-card__icon {
    background: var(--sgv-green-bg);
    color: var(--sgv-green);
}

.sgv-card--not-found .sgv-card__icon {
    background: var(--sgv-red-bg);
    color: var(--sgv-red);
}

.sgv-card__status {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -.02em;
}

.sgv-card--authentic .sgv-card__status {
    color: var(--sgv-green);
}

.sgv-card--not-found .sgv-card__status {
    color: var(--sgv-red);
}

.sgv-card__details {
    width: 100%;
    background: var(--sgv-surface-2);
    border: 1px solid var(--sgv-border);
    border-radius: var(--sgv-radius-sm);
    overflow: hidden;
}

.sgv-detail {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem 1.2rem;
    border-bottom: 1px solid var(--sgv-border);
    text-align: left;
}

.sgv-detail:last-child {
    border-bottom: none;
}

.sgv-detail__label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--sgv-text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    flex-shrink: 0;
}

.sgv-detail__value {
    font-size: .9rem;
    font-weight: 500;
    color: var(--sgv-text);
    text-align: right;
    word-break: break-all;
}

.sgv-img-link {
    color: var(--sgv-gold);
    text-decoration: none;
    font-weight: 600;
}

.sgv-img-link:hover {
    text-decoration: underline;
}

.sgv-not-found-msg {
    font-size: .9rem;
    color: var(--sgv-text-muted);
    line-height: 1.6;
    margin: 0;
}

.sgv-not-found-msg strong {
    color: var(--sgv-text);
}

/* ============================================================
   CERTIFICATE CARD
   ============================================================ */

.sgv-cert {
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #FBF9F7 60%, #f0ebe1 100%);
    border: 1px solid rgba(195, 148, 91, .45);
    border-radius: var(--sgv-radius-sm);
    overflow: hidden;
    position: relative;
}

/* Decorative corner lines */
.sgv-cert::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(195, 148, 91, .18);
    border-radius: 6px;
    pointer-events: none;
}

.sgv-cert__header {
    padding: 1.5rem 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(195, 148, 91, .2);
    background: linear-gradient(180deg, rgba(195, 148, 91, .08) 0%, transparent 100%);
}

.sgv-cert__badge {
    font-size: 1.8rem;
    color: var(--sgv-gold);
    line-height: 1;
    margin-bottom: .5rem;
    text-shadow: 0 0 12px rgba(195, 148, 91, .4);
}

.sgv-cert__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sgv-gold-light);
    margin: 0 0 .25rem;
    letter-spacing: .02em;
}

.sgv-cert__org {
    font-size: .8rem;
    color: var(--sgv-text-muted);
    margin: 0;
}

.sgv-cert__org strong {
    color: var(--sgv-gold);
}

.sgv-cert__body {
    padding: .25rem 1.5rem 1.25rem;
}

.sgv-cert__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .6rem 0;
    border-bottom: 1px solid rgba(195, 148, 91, .1);
    font-size: .85rem;
}

.sgv-cert__row:last-child {
    border-bottom: none;
}

.sgv-cert__row span:first-child {
    color: var(--sgv-text-muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.sgv-cert__row span:last-child {
    color: var(--sgv-gold-light);
    font-weight: 600;
}

/* ============================================================
   QR CODE
   ============================================================ */

.sgv-qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}

.sgv-qr-label {
    font-size: .75rem;
    color: var(--sgv-text-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0;
}

.sgv-qr-img {
    border-radius: 10px;
    padding: 6px;
    background: #fff;
    display: block;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 480px) {
    .sgv-form {
        padding: 1.25rem 1.25rem 1.5rem;
    }

    .sgv-form-header {
        padding: 1.75rem 1.25rem 1.25rem;
    }

    .sgv-card {
        padding: 1.75rem 1.25rem 1.5rem;
    }

    .sgv-card__status {
        font-size: 1.15rem;
    }

    .sgv-cert {
        font-size: .85rem;
    }

    .sgv-cert__header {
        padding: 1.25rem 1.25rem .75rem;
    }

    .sgv-cert__body {
        padding: .25rem 1.25rem 1rem;
    }

    .sgv-detail {
        flex-direction: column;
        gap: .25rem;
    }

    .sgv-detail__value {
        text-align: left;
    }

    .sgv-notice {
        margin: 0 1.25rem;
    }
}