/* ==========================================================================
   Vinco Certificate Manager — Frontend Styles
   Brand: Navy #0F1B2D, Gold #C5A55A, Red #FE000A, Off-white #F5F3EE
   ========================================================================== */

:root {
    --vcm-navy: #0F1B2D;
    --vcm-navy-light: #1A3352;
    --vcm-gold: #C5A55A;
    --vcm-gold-dark: #A08642;
    --vcm-red: #FE000A;
    --vcm-red-dark: #C80007;
    --vcm-cream: #F5F3EE;
    --vcm-white: #FFFFFF;
    --vcm-gray: #6B7D95;
    --vcm-gray-light: #E8E6E0;
    --vcm-text: #333333;
    --vcm-text-muted: #666666;
    --vcm-border: #E5E5E5;
    --vcm-success: #22a55b;
    --vcm-success-bg: #e6f7ed;
    --vcm-error: #d63638;
    --vcm-error-bg: #fdeeee;
    --vcm-warning: #dba617;
    --vcm-warning-bg: #fef7e6;
    --vcm-shadow: 0 4px 24px rgba(15, 27, 45, 0.08);
    --vcm-shadow-lg: 0 12px 40px rgba(15, 27, 45, 0.12);
    --vcm-radius: 10px;
    --vcm-radius-sm: 6px;
}

/* ========== SEARCH WRAPPER ========== */
.vcm-search-wrapper {
    max-width: 620px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--vcm-text);
}

.vcm-search-card {
    background: var(--vcm-white);
    border: 1px solid var(--vcm-border);
    border-radius: var(--vcm-radius);
    padding: 48px 40px;
    box-shadow: var(--vcm-shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.vcm-search-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--vcm-gold) 0%, var(--vcm-red) 50%, var(--vcm-gold) 100%);
}

.vcm-search-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--vcm-navy);
    margin: 0 0 12px;
    line-height: 1.3;
}

.vcm-search-subtitle {
    font-size: 15px;
    color: var(--vcm-gray);
    margin: 0 0 32px;
    line-height: 1.6;
}

/* ========== FORM ELEMENTS ========== */
.vcm-input-group {
    text-align: left;
    margin-bottom: 20px;
}

.vcm-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--vcm-navy);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.vcm-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.vcm-input-icon {
    position: absolute;
    left: 16px;
    display: flex;
    align-items: center;
    color: var(--vcm-gray);
    pointer-events: none;
    z-index: 1;
}

.vcm-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1.5px solid var(--vcm-border);
    border-radius: var(--vcm-radius-sm);
    font-size: 15px;
    color: var(--vcm-text);
    background: var(--vcm-white);
    transition: all 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.vcm-input:focus {
    outline: none;
    border-color: var(--vcm-gold);
    box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.15);
}

.vcm-input::placeholder {
    color: #A8B0BE;
}

/* ========== BUTTONS ========== */
.vcm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--vcm-radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
    line-height: 1;
}

.vcm-btn-primary {
    background: var(--vcm-navy);
    color: var(--vcm-white);
    width: 100%;
}

.vcm-btn-primary:hover:not(:disabled) {
    background: var(--vcm-navy-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 27, 45, 0.25);
}

.vcm-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vcm-btn-secondary {
    background: var(--vcm-white);
    color: var(--vcm-navy);
    border: 1.5px solid var(--vcm-navy);
}

.vcm-btn-secondary:hover {
    background: var(--vcm-navy);
    color: var(--vcm-white);
}

.vcm-btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.vcm-btn-danger {
    background: transparent;
    color: var(--vcm-error);
    border: 1.5px solid var(--vcm-error);
    padding: 8px 16px;
    font-size: 13px;
}

.vcm-btn-danger:hover {
    background: var(--vcm-error);
    color: var(--vcm-white);
}

.vcm-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* ========== SEARCH RESULTS ========== */
.vcm-search-results {
    margin-top: 28px;
    text-align: left;
}

.vcm-result-card {
    background: var(--vcm-cream);
    border: 1px solid var(--vcm-gold);
    border-radius: var(--vcm-radius);
    padding: 24px;
    margin-bottom: 16px;
    position: relative;
    transition: all 0.2s ease;
}

.vcm-result-card:hover {
    box-shadow: var(--vcm-shadow);
}

.vcm-result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 16px;
}

.vcm-result-program {
    font-size: 17px;
    font-weight: 700;
    color: var(--vcm-navy);
    margin: 0 0 4px;
    line-height: 1.3;
}

.vcm-result-learner {
    font-size: 14px;
    color: var(--vcm-text-muted);
    margin: 0;
}

.vcm-result-badge {
    background: var(--vcm-gold);
    color: var(--vcm-navy);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.vcm-result-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 13px;
}

.vcm-result-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vcm-result-detail-label {
    color: var(--vcm-gray);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.vcm-result-detail-value {
    color: var(--vcm-text);
    font-weight: 500;
}

.vcm-result-actions {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(197, 165, 90, 0.3);
}

/* ========== NOTICES ========== */
.vcm-notice {
    padding: 16px 20px;
    border-radius: var(--vcm-radius-sm);
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.5;
}

.vcm-notice-success {
    background: var(--vcm-success-bg);
    border-left: 4px solid var(--vcm-success);
    color: #0a6e3a;
}

.vcm-notice-error {
    background: var(--vcm-error-bg);
    border-left: 4px solid var(--vcm-error);
    color: #a01e20;
}

.vcm-notice-warning {
    background: var(--vcm-warning-bg);
    border-left: 4px solid var(--vcm-warning);
    color: #825a0a;
}

.vcm-notice-info {
    background: #e6f2fb;
    border-left: 4px solid #378ADD;
    color: #0c447c;
}

.vcm-help-text {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--vcm-gray);
}

.vcm-help-text a {
    color: var(--vcm-gold-dark);
    text-decoration: none;
    font-weight: 500;
}

.vcm-help-text a:hover {
    text-decoration: underline;
}

/* ========== MANAGER WRAPPER ========== */
.vcm-manager-wrapper {
    max-width: 1100px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--vcm-text);
}

.vcm-manager-header {
    margin-bottom: 32px;
}

.vcm-manager-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--vcm-navy);
    margin: 0 0 8px;
}

.vcm-manager-subtitle {
    font-size: 15px;
    color: var(--vcm-gray);
    margin: 0;
}

/* ========== STATS GRID ========== */
.vcm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.vcm-stat-card {
    background: var(--vcm-white);
    border: 1px solid var(--vcm-border);
    border-radius: var(--vcm-radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.vcm-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--vcm-gold);
}

.vcm-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--vcm-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.vcm-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--vcm-navy);
    line-height: 1;
}

/* ========== TABS ========== */
.vcm-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--vcm-border);
    margin-bottom: 24px;
}

.vcm-tab {
    background: transparent;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--vcm-gray);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    font-family: inherit;
}

.vcm-tab:hover {
    color: var(--vcm-navy);
}

.vcm-tab-active {
    color: var(--vcm-navy);
}

.vcm-tab-active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--vcm-gold);
}

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

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

/* ========== UPLOAD SECTION ========== */
.vcm-upload-section {
    background: var(--vcm-white);
    border: 1px solid var(--vcm-border);
    border-radius: var(--vcm-radius);
    padding: 32px;
}

.vcm-upload-instructions {
    background: var(--vcm-cream);
    border-radius: var(--vcm-radius-sm);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.vcm-upload-instructions h3 {
    margin: 0 0 12px;
    font-size: 16px;
    color: var(--vcm-navy);
    font-weight: 600;
}

.vcm-upload-instructions ol {
    margin: 0 0 16px 18px;
    padding: 0;
    color: var(--vcm-text);
    font-size: 14px;
    line-height: 1.7;
}

.vcm-upload-instructions li {
    margin-bottom: 4px;
}

/* ========== DROPZONE ========== */
.vcm-upload-dropzone {
    border: 2px dashed var(--vcm-gray-light);
    border-radius: var(--vcm-radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--vcm-cream);
    color: var(--vcm-gray);
    margin-bottom: 16px;
}

.vcm-upload-dropzone:hover,
.vcm-upload-dropzone.vcm-dragover {
    border-color: var(--vcm-gold);
    background: #FDF8EE;
    color: var(--vcm-gold-dark);
}

.vcm-upload-dropzone svg {
    color: var(--vcm-gold);
    margin-bottom: 12px;
}

.vcm-dropzone-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--vcm-navy);
    margin: 0 0 4px;
}

.vcm-dropzone-hint {
    font-size: 13px;
    color: var(--vcm-gray);
    margin: 0;
}

.vcm-file-input {
    display: none;
}

.vcm-file-preview {
    background: var(--vcm-white);
    border: 1px solid var(--vcm-gold);
    border-radius: var(--vcm-radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
}

.vcm-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--vcm-navy);
}

.vcm-file-info svg {
    color: var(--vcm-gold);
    flex-shrink: 0;
}

.vcm-file-name {
    font-weight: 500;
    flex-grow: 1;
    word-break: break-all;
    font-size: 14px;
}

.vcm-file-remove {
    background: transparent;
    border: none;
    color: var(--vcm-error);
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
}

/* ========== UPLOAD RESULT ========== */
.vcm-upload-result {
    margin-top: 20px;
}

.vcm-upload-errors {
    margin-top: 12px;
    max-height: 200px;
    overflow-y: auto;
    background: var(--vcm-white);
    border: 1px solid var(--vcm-error);
    border-radius: var(--vcm-radius-sm);
    padding: 12px 16px;
}

.vcm-upload-errors ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--vcm-text);
}

/* ========== MANAGE TABLE ========== */
.vcm-manage-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.vcm-search-input-wrap {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.vcm-certificates-table {
    background: var(--vcm-white);
    border: 1px solid var(--vcm-border);
    border-radius: var(--vcm-radius);
    overflow: hidden;
}

.vcm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.vcm-table thead {
    background: var(--vcm-navy);
    color: var(--vcm-white);
}

.vcm-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vcm-table td {
    padding: 14px 16px;
    border-top: 1px solid var(--vcm-border);
    color: var(--vcm-text);
    vertical-align: middle;
}

.vcm-table tr:hover td {
    background: var(--vcm-cream);
}

.vcm-table .vcm-cert-id {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: var(--vcm-gold-dark);
    font-weight: 600;
}

.vcm-table-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.vcm-loading {
    text-align: center;
    padding: 40px;
    color: var(--vcm-gray);
    font-size: 14px;
}

.vcm-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--vcm-gray);
}

/* ========== PAGINATION ========== */
.vcm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.vcm-page-btn {
    background: var(--vcm-white);
    border: 1px solid var(--vcm-border);
    padding: 8px 14px;
    border-radius: var(--vcm-radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--vcm-text);
    font-family: inherit;
    transition: all 0.2s;
}

.vcm-page-btn:hover:not(:disabled) {
    background: var(--vcm-navy);
    color: var(--vcm-white);
    border-color: var(--vcm-navy);
}

.vcm-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.vcm-page-btn-active {
    background: var(--vcm-navy);
    color: var(--vcm-white);
    border-color: var(--vcm-navy);
}

.vcm-page-info {
    color: var(--vcm-gray);
    font-size: 13px;
    margin: 0 12px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
    .vcm-search-card,
    .vcm-upload-section {
        padding: 28px 20px;
    }

    .vcm-search-title,
    .vcm-manager-title {
        font-size: 22px;
    }

    .vcm-result-details {
        grid-template-columns: 1fr;
    }

    .vcm-result-actions {
        flex-direction: column;
    }

    .vcm-result-actions .vcm-btn {
        width: 100%;
    }

    .vcm-table {
        font-size: 12px;
    }

    .vcm-table th,
    .vcm-table td {
        padding: 10px 8px;
    }

    .vcm-stat-value {
        font-size: 24px;
    }
}

/* ========== VERIFY CERTIFICATE ========== */
.vcm-verify-wrapper {
    max-width: 620px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--vcm-text);
}

.vcm-verify-result-card {
    background: var(--vcm-white);
    border: 2px solid var(--vcm-success);
    border-radius: var(--vcm-radius);
    padding: 28px;
    margin-top: 24px;
}

.vcm-verify-result-card.vcm-verify-not-found {
    border-color: var(--vcm-error);
}

.vcm-verify-badge-row {
    margin-bottom: 16px;
}

.vcm-verify-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
}

.vcm-verify-authentic {
    background: var(--vcm-success-bg);
    color: #0a6e3a;
}

.vcm-verify-invalid {
    background: var(--vcm-error-bg);
    color: #a01e20;
}

.vcm-verify-auth-text {
    font-size: 14px;
    color: var(--vcm-success);
    font-weight: 500;
    margin: 0 0 20px;
    line-height: 1.5;
}

.vcm-verify-not-found p {
    font-size: 14px;
    color: var(--vcm-text-muted);
    margin: 12px 0 0;
    line-height: 1.6;
}

.vcm-verify-details {
    border-top: 1px solid var(--vcm-border);
    padding-top: 16px;
}

.vcm-verify-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 16px;
}

.vcm-verify-row:last-child {
    border-bottom: none;
}

.vcm-verify-label {
    flex: 0 0 160px;
    font-size: 12px;
    font-weight: 600;
    color: var(--vcm-gray);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding-top: 2px;
}

.vcm-verify-value {
    flex: 1;
    font-size: 15px;
    color: var(--vcm-text);
}

@media (max-width: 640px) {
    .vcm-verify-row {
        flex-direction: column;
        gap: 4px;
    }

    .vcm-verify-label {
        flex: none;
    }
}