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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.nav-logo {
    max-height: 36px;
    width: auto;
}

.nav-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-links a {
    margin-left: 20px;
    color: #666;
    text-decoration: none;
}

.nav-links a:hover {
    color: #333;
}

/* Cards */
.card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card.centered {
    max-width: 400px;
    margin: 60px auto;
    text-align: center;
}

.card h1 {
    margin-bottom: 10px;
}

.card p {
    margin-bottom: 20px;
    color: #666;
}

/* Forms */
.form {
    text-align: left;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #e9ecef;
    color: #333;
}

.btn-secondary:hover {
    background: #ddd;
}

.btn-save {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    transition: all 0.2s ease;
}

.btn-save:disabled {
    background: #e9ecef;
    color: #999;
}

.btn-save.has-changes {
    background: #28a745;
    color: #fff;
    cursor: pointer;
    animation: pulse 0.3s ease;
}

.btn-save.has-changes:hover {
    background: #218838;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Flash messages */
.flash {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
}

.flash-success {
    background: #d4edda;
    color: #155724;
}

.flash-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Dashboard */
.dashboard h1 {
    margin-bottom: 20px;
}

.dashboard h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.dashboard section {
    margin-bottom: 30px;
}

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

.section-header h2 {
    margin: 0;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Profile summary */
.profile-summary {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.profile-field {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.profile-field:last-child {
    border-bottom: none;
}

.field-label {
    font-weight: 500;
    color: #666;
    min-width: 150px;
}

.field-value {
    color: #333;
}

.records-list {
    display: grid;
    gap: 15px;
}

.record-card {
    display: block;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}

.record-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.record-card h3 {
    margin-bottom: 5px;
}

.record-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.record-card.reviewed {
    border-left: 4px solid #22c55e;
}

.review-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Edit record */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    padding: 8px 14px;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    background: #f0f0f0;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.back-link:hover {
    background: #e0e0e0;
    color: #333;
}

/* Admin link */
.admin-link {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.admin-link:hover {
    background: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

/* Corner link (top-right aligned) */
.corner-link {
    display: block;
    text-align: right;
    margin-bottom: 10px;
    padding: 8px 14px;
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
}

.corner-link:hover {
    color: #333;
}

.edit-record h1 {
    margin-bottom: 20px;
}

.edit-record h2 {
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.edit-record hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 30px 0;
}

/* Data table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
}

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

/* Code input */
.code-input {
    font-size: 2rem !important;
    letter-spacing: 8px;
    text-align: center;
    font-family: monospace;
}

/* Utilities */
.text-muted {
    color: #999;
    font-size: 0.9rem;
}

.text-muted a {
    color: #666;
}

/* Admin Dashboard */
.admin-dashboard {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.admin-header h1 {
    margin: 0;
}

.admin-logout {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.admin-logout:hover {
    color: #333;
}

.admin-dashboard h2 {
    font-size: 1.2rem;
    margin: 30px 0 10px 0;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.admin-dashboard h2:first-of-type {
    margin-top: 20px;
    padding-top: 0;
    border-top: none;
}

/* Admin tabs */
.admin-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
}

.admin-tabs .tab {
    padding: 12px 24px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.admin-tabs .tab:hover {
    color: #333;
    background: #f8f9fa;
}

.admin-tabs .tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.admin-tabs .tab.disabled {
    color: #aaa;
    pointer-events: none;
}

/* Admin content area */
.admin-content {
    margin-top: 10px;
}

.admin-content h3 {
    font-size: 1.1rem;
    margin: 25px 0 8px 0;
    color: #333;
}

.admin-content h3:first-of-type {
    margin-top: 0;
}

/* Form select */
.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Field help text */
.field-help {
    font-size: 0.85rem;
    color: #888;
    margin: 4px 0 8px 0;
}

.field-help a {
    color: #007bff;
}

.field-annotation {
    font-size: 0.85rem;
    color: #666;
    margin: 2px 0 8px 0;
    font-style: italic;
}

/* Form input (same as form-group input) */
.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-input:disabled {
    background: #f5f5f5;
    color: #888;
    cursor: not-allowed;
}

/* Text button (inline) */
.btn-text {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    margin-left: 8px;
}

.btn-text:hover {
    text-decoration: underline;
}

.field-config-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.field-config-table th,
.field-config-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.field-config-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.field-config-table td:not(:first-child):not(:nth-child(2)) {
    text-align: center;
}

.annotation-input {
    width: 100%;
    padding: 6px 8px;
    font-size: 0.85rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.annotation-input:focus {
    outline: none;
    border-color: #4a90d9;
}

.annotation-input::placeholder {
    color: #aaa;
}

.radio-label {
    display: none;
}

/* Readonly field styling */
.field-readonly {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 6px;
    color: #666;
}

/* Checkbox styling */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #007bff;
}

.checkbox-text {
    font-weight: normal;
}

/* Hide duplicate label for standalone checkboxes */
.form-group > .checkbox-label {
    margin-top: -5px;
}

.form-group > .checkbox-label .checkbox-text {
    display: none;
}

/* Multi-select styling */
.multi-select {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
}

.multi-select .checkbox-label {
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    transition: background 0.2s;
}

.multi-select .checkbox-label:hover {
    background: #e9ecef;
}

.multi-select .checkbox-text {
    display: inline;
}

/* Number input */
input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Date/datetime inputs */
input[type="date"],
input[type="datetime-local"] {
    cursor: pointer;
}

/* Phone/email/url inputs - give visual hint */
input[type="tel"],
input[type="email"],
input[type="url"] {
    /* Same as regular inputs, just for semantic clarity */
}

/* Data confirmation box */
.confirmation-box {
    margin: 25px 0;
    padding: 20px;
    background: #f0f7ff;
    border: 2px solid #007bff;
    border-radius: 8px;
}

.confirmation-label {
    font-size: 1.1rem;
}

.confirmation-label .checkbox-text {
    display: inline;
    font-weight: 600;
    color: #0056b3;
}

.confirmation-status {
    margin: 10px 0 0 30px;
    font-size: 0.9rem;
    color: #666;
}

.confirmation-config {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

/* Marketing page */
.marketing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 10px;
}

.marketing-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    letter-spacing: -0.3px;
    text-decoration: none;
}

.marketing-nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.marketing-nav-links a {
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
}

.marketing-nav-links a:hover {
    color: #333;
}

.marketing-nav-links a.btn {
    color: #fff;
}

.marketing-nav-links a.btn:hover {
    color: #fff;
}

.marketing-hero {
    text-align: center;
    padding: 60px 20px 50px;
}

.marketing-hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 18px;
    color: #222;
}

.marketing-hero p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 32px;
    line-height: 1.6;
}

.marketing-hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.marketing-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.feature-card {
    background: #fff;
    padding: 24px 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}

.feature-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #222;
}

.feature-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.marketing-usecase {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    background: #fff;
    padding: 36px 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 24px;
    border-left: 4px solid #007bff;
}

.usecase-text h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #222;
}

.usecase-text p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

.usecase-text p:last-child {
    margin-bottom: 0;
}

.usecase-example {
    font-style: italic;
    color: #777 !important;
}

.usecase-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 160px;
}

.diagram-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.diagram-row-children {
    gap: 10px;
}

.diagram-node {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.diagram-node-parent {
    background: #007bff;
    color: #fff;
}

.diagram-node-child {
    background: #e8f0fe;
    color: #1a56db;
    border: 1px solid #c3d8fd;
}

.diagram-arrow {
    color: #aaa;
    font-size: 1.2rem;
    line-height: 1;
}

.diagram-caption {
    font-size: 0.78rem;
    color: #999;
    text-align: center;
    margin-top: 4px;
}

.marketing-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 24px;
}

.marketing-card h2 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: #222;
}

.how-it-works {
    padding-left: 20px;
    margin: 0;
}

.how-it-works li {
    margin-bottom: 12px;
    color: #444;
    line-height: 1.5;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.faq-item {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.faq-item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.faq-item p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.marketing-contact {
    text-align: center;
}

.marketing-contact p {
    color: #666;
    margin-bottom: 20px;
}

.marketing-cta {
    text-align: center;
    padding: 40px 30px;
    background: #f0f6ff;
    border-radius: 8px;
    margin-bottom: 24px;
}

.marketing-cta h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #222;
}

.marketing-cta p {
    color: #666;
    margin-bottom: 24px;
}

.marketing-cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Pricing page */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.pricing-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 32px 28px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.pricing-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.pricing-card.featured {
    border: 2px solid #007bff;
}

.pricing-tier {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin-bottom: 8px;
}

.pricing-card.featured .pricing-tier {
    color: #007bff;
}

.pricing-price {
    font-size: 2.4rem;
    font-weight: 700;
    color: #222;
    line-height: 1;
    margin-bottom: 4px;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 400;
    color: #888;
}

.pricing-desc {
    font-size: 0.9rem;
    color: #666;
    margin: 12px 0 20px;
    line-height: 1.5;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
}

.pricing-features li {
    font-size: 0.9rem;
    color: #444;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li::before {
    content: "✓";
    color: #28a745;
    font-weight: 700;
    flex-shrink: 0;
}

.pricing-footnote {
    max-width: 680px;
    margin: 0 auto 48px;
    padding: 0 24px;
    font-size: 0.82rem;
    color: #888;
    text-align: center;
    line-height: 1.6;
}

.pricing-footnote a {
    color: #888;
}

/* Billing admin */
.billing-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.billing-status.active {
    background: #d4edda;
    color: #155724;
}

.billing-status.trial {
    background: #fff3cd;
    color: #856404;
}

.billing-status.suspended {
    background: #f8d7da;
    color: #721c24;
}

.billing-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #aaa;
    font-size: 0.85rem;
}

.billing-divider::before,
.billing-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #eee;
}

/* Danger zone */
.danger-zone {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    background: #fff8f8;
}

.danger-zone h3 {
    font-size: 1rem;
    color: #dc3545;
    margin-bottom: 8px;
}

.danger-zone p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 16px;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
    color: #fff;
}

/* Org code availability status */
.org-code-status {
    font-size: 0.85rem;
    margin-top: 4px;
    min-height: 1.2em;
}

.org-code-available {
    color: #28a745;
}

.org-code-taken {
    color: #dc3545;
}

/* Airtable setup guide */
.airtable-guide {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px 14px;
    background: #f8f9fa;
}

.airtable-guide summary {
    font-weight: 500;
    padding: 2px 0;
}

.airtable-guide-content {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #444;
}

.airtable-guide-content ol {
    padding-left: 18px;
    margin: 0;
}

.airtable-guide-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.airtable-guide-content ul {
    margin: 6px 0 0 0;
    padding-left: 18px;
}

.airtable-guide-content code {
    background: #e9ecef;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.85rem;
}

/* ============================================================
   RESPONSIVE — mobile-first breakpoints
   ============================================================ */

/* Tablet and below (≤768px) */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    /* Marketing nav — stack brand above links */
    .marketing-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .marketing-nav-links {
        gap: 12px;
        flex-wrap: wrap;
    }

    .marketing-nav-links a {
        font-size: 0.9rem;
    }

    .marketing-hero {
        padding: 40px 10px 32px;
    }

    .marketing-hero h1 {
        font-size: 1.75rem;
    }

.marketing-hero p {
        font-size: 1rem;
    }

    .marketing-hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .marketing-hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Feature cards: single column */
    .marketing-features {
        grid-template-columns: 1fr;
    }

    /* Usecase: stack, hide diagram */
    .marketing-usecase {
        grid-template-columns: 1fr;
    }

    .usecase-diagram {
        display: none;
    }

    /* Pricing: single column */
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    /* CTA actions: stack */
    .marketing-cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .marketing-cta-actions .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Admin dashboard */
    .admin-dashboard {
        padding: 16px;
        border-radius: 0;
    }

    .admin-header h1 {
        font-size: 1.1rem;
    }

    /* Admin tabs: allow wrap, tighter padding */
    .admin-tabs {
        flex-wrap: wrap;
    }

    .admin-tabs .tab {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    /* Field config table: horizontal scroll */
    .field-config-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.85rem;
    }

    .field-config-table th,
    .field-config-table td {
        padding: 8px 10px;
        white-space: nowrap;
    }

    /* Data table: horizontal scroll */
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Profile field label: no fixed min-width */
    .field-label {
        min-width: 100px;
        font-size: 0.9rem;
    }

    /* Card centered: reduce top margin */
    .card.centered {
        margin: 24px auto;
        max-width: 100%;
    }

    /* Form actions: stack on small screens */
    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Section header wraps */
    .section-header {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Phone only (≤480px) */
@media (max-width: 480px) {
    .marketing-hero h1 {
        font-size: 1.5rem;
    }

    .marketing-card,
    .marketing-usecase,
    .marketing-cta {
        padding: 20px 16px;
    }

    .admin-dashboard {
        padding: 12px;
    }

    /* Navbar wraps on very small screens */
    .navbar {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Profile fields: stack label above value */
    .profile-field {
        flex-direction: column;
        gap: 2px;
    }

    .field-label {
        min-width: unset;
    }

    /* Billing promo form: stack */
    form[action*="activate-promo"] {
        flex-direction: column !important;
    }

    form[action*="activate-promo"] > div {
        width: 100%;
    }

    form[action*="activate-promo"] .btn {
        width: 100%;
    }

    /* Code input: smaller on tiny screens */
    .code-input {
        font-size: 1.5rem !important;
        letter-spacing: 4px;
    }
}

/* Demo mode code display */
.demo-code-box {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.demo-label {
    font-size: 0.85rem;
    color: #856404;
    margin-bottom: 5px;
    font-weight: 500;
}

.demo-code {
    font-size: 2rem;
    font-family: monospace;
    font-weight: bold;
    color: #856404;
    letter-spacing: 4px;
    margin: 0;
}
