@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-light: #e2e8f0;
    --border-focus: #1e3a8a;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --accent-primary: #0f172a;
    --accent-blue: #2563eb;
    --accent-gold: #b45309;
    --accent-gold-light: #fef3c7;
    --accent-success: #0f766e;
    --accent-success-light: #ccfbf1;
    --accent-error: #be123c;
    --accent-error-light: #ffe4e6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 4px;
    --transition: all 0.2s ease-in-out;
}

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

.hidden {
    display: none !important;
}

.tab-section {
    display: block;
}

.tab-section.hidden {
    display: none !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================
   NAVIGATION - FIXED FOR PC + MOBILE
   ========================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.75rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.03);
    max-width: 100vw;
    overflow: visible;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.01em;
    flex-shrink: 0;
    white-space: nowrap;
}

.brand i {
    font-size: 1.35rem;
    color: var(--accent-gold);
    transition: transform 0.3s ease;
}

.brand:hover i {
    transform: rotate(15deg) scale(1.1);
}

/* Hamburger Menu Button - Hidden on PC by default */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    flex-shrink: 0;
    z-index: 1001;
}

.menu-toggle i {
    font-size: 1.5rem;
}

/* Navigation Links - Always visible on PC */
.nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
    overflow: visible; /* Prevent clipping the absolute positioned dropdown menu on desktop */
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
    min-width: 0; /* Allow the flex container to shrink and scroll horizontally */
    justify-content: flex-start;
}

.nav-links > .nav-item:first-child,
.nav-links > .nav-item.push-right {
    margin-left: auto; /* Push links to the right edge if there is space */
}

.nav-links::after {
    content: '';
    display: block;
    width: 1.5rem;
    flex-shrink: 0;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-item {
    flex-shrink: 0;
    margin: 0;
}

.nav-item button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.82rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-item button:hover {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.04);
    transform: translateY(-1px);
}

.nav-item.active button {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.06);
    font-weight: 600;
}

.nav-item-admin button {
    color: var(--text-muted);
    border: 1px dashed var(--border-light);
}

.nav-item-admin button:hover {
    border-color: var(--text-muted);
    background: rgba(15, 23, 42, 0.02);
}

.nav-item-admin.logged-in button {
    color: var(--accent-blue);
    border-color: rgba(37, 99, 235, 0.2);
    background: rgba(37, 99, 235, 0.05);
}

/* ==========================================
   MOBILE RESPONSIVE BREAKPOINTS
   ========================================== */

@media (max-width: 1024px) {
    .navbar {
        padding: 0.5rem 0.75rem;
        gap: 0.25rem;
    }
    
    .nav-item button {
        font-size: 0.7rem;
        padding: 0.35rem 0.5rem;
    }
}

@media (max-width: 768px) {
    /* Hide nav links on mobile, show hamburger */
    .nav-links {
        display: none !important;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        padding: 1rem;
        gap: 0.25rem;
        border-bottom: 1px solid var(--border-light);
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        max-height: 80vh;
        overflow-y: auto;
        overflow-x: hidden;
        align-items: stretch;
        z-index: 999;
        width: 100%;
    }
    
    .nav-links > .nav-item:first-child,
    .nav-links > .nav-item.push-right {
        margin-left: 0; /* Reset desktop auto margin on mobile vertical layout */
    }
    
    .nav-links::after {
        display: none; /* Disable spacer in vertical mobile layout */
    }
    
    /* Show nav when menu is open */
    .nav-links.open {
        display: flex !important;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-item button {
        width: 100%;
        justify-content: flex-start;
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
        border-radius: var(--radius-sm);
    }
    
    .nav-item button i {
        font-size: 1rem;
        width: 1.2rem;
    }
    
    /* Show hamburger menu on mobile */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .brand {
        font-size: 0.95rem;
    }
    
    .brand span {
        font-size: 0.85rem;
    }
    
    .container {
        padding: 0 1rem;
        margin: 1.5rem auto;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    h1.section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.4rem 0.5rem;
    }
    
    .brand {
        font-size: 0.85rem;
    }
    
    .brand span {
        font-size: 0.75rem;
    }
    
    .brand i {
        font-size: 1rem;
    }
    
    .menu-toggle i {
        font-size: 1.2rem;
    }
    
    .nav-item button {
        font-size: 0.8rem;
        padding: 0.5rem 0.6rem;
    }
    
    .container {
        padding: 0 0.75rem;
        margin: 1rem auto;
    }
    
    .card {
        padding: 1rem;
    }
    
    .card::before {
        height: 3px;
    }
    
    h1.section-title {
        font-size: 1.25rem;
    }
}

/* ==========================================
   REST OF YOUR EXISTING STYLES
   ========================================== */

.container {
    max-width: 1280px;
    margin: 2.5rem auto;
    padding: 0 2rem;
    overflow-x: hidden;
}

.view-section {
    display: none;
}

.view-section.active {
    display: block;
    animation: fadeIn 0.25s ease-out;
}

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

.title-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

h1.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

p.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.975rem;
    max-width: 550px;
    margin: 0 auto;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.02), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

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

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    border-color: #cbd5e1;
}

.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="color"],
select {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 0.625rem 0.875rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
    width: 100%;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    font-weight: 550;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    border: 1px solid transparent;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: #1e293b;
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-primary);
    border-color: #cbd5e1;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.btn-success {
    background: var(--accent-success);
    color: #ffffff;
}

.btn-success:hover {
    background: #0d5c56;
}

.btn-danger {
    background: var(--accent-error);
    color: #ffffff;
}

.btn-danger:hover {
    background: #9f0f32;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
}

.dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--text-primary);
    background: #f1f5f9;
}

.dropzone i {
    font-size: 2rem;
    color: var(--text-secondary);
}

.dropzone h3 {
    font-size: 0.95rem;
    font-weight: 600;
}

.designer-split {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .designer-split {
        grid-template-columns: 1fr;
    }
}

.designer-workspace {
    position: relative;
    width: 100%;
    overflow: auto;
    background: #cbd5e1;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 520px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.06);
}

.designer-container {
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    background: #ffffff;
    user-select: none;
    -webkit-user-select: none;
}

.designer-bg-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.draggable-field {
    position: absolute;
    cursor: move;
    border: 1px dashed transparent;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: background-color 0.15s, border-color 0.15s;
    transform-origin: top left;
}

.draggable-field:hover {
    border-color: rgba(37, 99, 235, 0.4);
    background: rgba(37, 99, 235, 0.03);
}

.draggable-field.active {
    border-color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.06);
    box-shadow: 0 0 0 1px var(--accent-blue);
}

.draggable-field .field-label {
    font-size: 9px;
    background: var(--text-primary);
    color: #ffffff;
    padding: 1px 4px;
    border-radius: 2px;
    position: absolute;
    top: -16px;
    left: 0;
    pointer-events: none;
    opacity: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: opacity 0.1s;
}

.draggable-field.active .field-label,
.draggable-field:hover .field-label {
    opacity: 1;
}

.sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.75rem;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.5rem;
    margin-bottom: 0.25rem;
}

.properties-tab-header {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    gap: 0.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.375rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

.property-group {
    border-top: 1px solid var(--border-light);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.property-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.375rem 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .2s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .2s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--text-primary);
}

input:checked + .slider:before {
    transform: translateX(18px);
}

.claim-container {
    max-width: 560px;
    margin: 0 auto;
}

.claim-list-wrapper {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.claim-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: #ffffff;
    transition: var(--transition);
}

.claim-item:hover {
    border-color: #94a3b8;
    box-shadow: var(--shadow-sm);
}

.claim-details h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.claim-details p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.claim-details .cert-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.verify-container {
    max-width: 680px;
    margin: 0 auto;
}

.verification-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

.status-verified {
    background: var(--accent-success-light);
    color: var(--accent-success);
}

.status-invalid {
    background: var(--accent-error-light);
    color: var(--accent-error);
}

.verification-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.verification-grid-item {
    display: flex;
    flex-direction: column;
}

.verification-grid-item label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
}

.verification-grid-item p {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-top: 0.125rem;
}

.verification-grid-item code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.social-share-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.social-share-row .btn {
    flex: 1;
}

.table-container {
    overflow-x: auto;
    margin-top: 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

table.data-table th, table.data-table td {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--border-light);
}

table.data-table th {
    background: #f8fafc;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

table.data-table tbody tr:last-child td {
    border-bottom: none;
}

table.data-table tbody tr:hover {
    background: #f8fafc;
}

.badge-pill {
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-pill.success {
    background: var(--accent-success-light);
    color: var(--accent-success);
}

.badge-pill.warning {
    background: var(--accent-gold-light);
    color: var(--accent-gold);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    max-width: 92%;
    max-height: 92%;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
    border: 1px solid var(--border-light);
}

.modal-canvas-frame {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-width: 100%;
}

.modal-canvas-frame canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 9999;
}

.toast {
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.85rem;
    font-weight: 500;
    transform: translateY(12px);
    opacity: 0;
    animation: slideIn 0.2s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
    to { transform: translateY(0); opacity: 1; }
}

.toast.success { border-left: 3px solid var(--accent-success); }
.toast.error { border-left: 3px solid var(--accent-error); }
.toast.info { border-left: 3px solid var(--accent-blue); }

.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.w-full { width: 100%; }

.claim-no-results-card {
    background: rgba(254, 243, 199, 0.15) !important;
    border: 1px solid rgba(217, 119, 6, 0.2) !important;
    border-radius: var(--radius-lg);
    padding: 2.25rem 2rem;
    margin-top: 2rem;
    text-align: left;
    animation: slideDown 0.3s ease-out;
}

.claim-no-results-card::before {
    display: none !important;
}

.warning-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.warning-icon {
    color: #d97706;
    width: 24px;
    height: 24px;
}

.claim-no-results-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #92400e;
    margin: 0;
}

.warning-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.searched-email-container {
    background: #ffffff;
    border: 1px solid rgba(217, 119, 6, 0.15);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin: 0.75rem 0 1.25rem 0;
    word-break: break-all;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.searched-email-container span {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: #b45309;
    font-size: 0.9rem;
}

.warning-tips-box {
    border-top: 1px dashed rgba(217, 119, 6, 0.2);
    padding-top: 1rem;
}

.warning-tips-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.warning-tips-title i {
    width: 15px;
    height: 15px;
    color: #b45309;
}

.warning-tips-list {
    list-style-type: disc;
    padding-left: 1.25rem;
    font-size: 0.825rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stepper-section {
    margin-top: 4.5rem;
    border-top: 1px solid var(--border-light);
    padding-top: 3.5rem;
}

.stepper-title {
    text-align: center;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Playfair Display', Georgia, serif;
    margin-bottom: 0.375rem;
}

.stepper-subtitle {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.stepper-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

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

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.25rem 1.75rem;
    text-align: center;
    position: relative;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.02);
    border-color: #cbd5e1;
}

.step-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-primary);
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.step-icon-wrapper {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-primary);
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem auto 1.25rem auto;
    transition: var(--transition);
}

.step-card:hover .step-icon-wrapper {
    background: var(--accent-gold-light);
    color: var(--accent-gold);
    transform: scale(1.05);
}

.step-card h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.faq-section {
    margin-top: 5rem;
    border-top: 1px solid var(--border-light);
    padding-top: 3.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

.faq-title {
    text-align: center;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Playfair Display', Georgia, serif;
    margin-bottom: 2.5rem;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item[open] {
    box-shadow: var(--shadow-sm);
    border-color: #cbd5e1;
}

.faq-question {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    list-style: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-icon {
    transition: transform 0.2s ease;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.faq-item[open] .faq-icon {
    transform: rotate(180deg);
    color: var(--text-primary);
}

.faq-answer {
    padding: 0 1.5rem 1.25rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    border-top: 1px solid transparent;
    animation: slideUp 0.15s ease-out;
}

.faq-item[open] .faq-answer {
    border-top-color: #f1f5f9;
}

.requests-table th, 
.requests-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.requests-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

.badge-pill {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    line-height: 1;
}

.badge-pill.pending {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-pill.success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-pill.warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-pill.error {
    background-color: #fee2e2;
    color: #991b1b;
}

@media (max-width: 768px) {
    .requests-table th:nth-child(3),
    .requests-table td:nth-child(3) {
        display: none;
    }
}

/* ==========================================
   MORE DROPDOWN MENU - PC ONLY
   ========================================== */
.nav-item.dropdown {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.dropdown-trigger i.chevron-arrow {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.nav-item.dropdown.open .dropdown-trigger i.chevron-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 190px;
    z-index: 1000;
    transform-origin: top right;
    animation: dropdownFadeIn 0.15s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.nav-item.dropdown.open .dropdown-menu {
    display: flex;
}

/* Make buttons in dropdown full width and aligned */
.dropdown-menu .nav-item {
    width: 100%;
    margin: 0;
}

.dropdown-menu .nav-item button {
    width: 100%;
    justify-content: flex-start;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    background: transparent;
}

.dropdown-menu .nav-item button:hover {
    background: rgba(15, 23, 42, 0.04);
}

.dropdown-menu .nav-item.active button {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-primary);
    font-weight: 600;
}

/* Highlight dropdown trigger if active item is inside it */
.nav-item.dropdown:has(.nav-item.active) .dropdown-trigger {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.06);
    font-weight: 600;
}

@media (max-width: 768px) {
    #nav-more {
        display: none !important;
    }
}

/* ====================================================
   MOBILE & CROSS-DEVICE RESPONSIVENESS AND VIEWPORT GUARDS
   ==================================================== */

/* Fullscreen Guard for ultra-small screens (< 320px) */
#resolution-guard-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-main);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
}

@media (max-width: 319px) {
    #resolution-guard-overlay {
        display: flex !important;
    }
    body > *:not(#resolution-guard-overlay) {
        display: none !important;
    }
}

/* Viewport Warning Guard for Admin Pages on Mobile/Tablet (< 1024px) */
@media (max-width: 1023px) {
    .view-section:not(.bypass-warning) .resolution-warning-card {
        display: block !important;
    }
    .view-section:not(.bypass-warning) > *:not(.title-header):not(.resolution-warning-card) {
        display: none !important;
    }
}

/* Fluid Typography and Spacing Adjustments */
@media (max-width: 768px) {
    :root {
        --radius-lg: 12px;
        --radius-md: 8px;
    }

    .container {
        padding: 1rem 0.75rem;
        margin-top: 1.5rem;
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 1.6rem !important;
        letter-spacing: -0.02em;
        line-height: 1.25;
    }

    .section-subtitle {
        font-size: 0.85rem !important;
        margin-top: 0.35rem;
    }

    .title-header {
        margin-bottom: 1.5rem !important;
        text-align: left;
    }

    .card {
        padding: 1.5rem 1.25rem !important;
    }

    /* Form Fields and Buttons mobile touch target optimization */
    input, select, textarea, button, .btn {
        min-height: 42px; /* Ensure fat-finger friendly touch heights */
    }

    /* Prevent Certificate Canvas Previews from causing overflow */
    canvas, #verify-canvas, #preview-canvas, #claim-preview-canvas {
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }

    /* Stack grid forms vertically on small viewports */
    .form-grid, .designer-split, .settings-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .social-share-row {
        flex-direction: column;
        align-items: stretch;
    }

    .social-share-row a, .social-share-row button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.45rem !important;
    }

    .navbar {
        padding: 0.5rem 0.75rem !important;
    }

    .brand span {
        font-size: 0.95rem;
    }
    
    .card {
        padding: 1.25rem 1rem !important;
    }
}
