:root {
    --f-navy-deep: #0e172d;
    --f-navy: #14213d;
    --f-gold: #c9a44f;
    --f-muted: #9ea3b2;
    --f-border: rgba(201, 164, 79, 0.35);
}

* { box-sizing: border-box; }
html { direction: rtl; }

body.filing {
    margin: 0;
    background: #f6f8fa;
    color: var(--f-navy);
    font-family: 'Inter', 'Vazirmatn', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.filing h1, .filing h2, .filing h3, .filing .heading { font-family: 'Vazirmatn', sans-serif; }
.filing a { text-decoration: none; }
.filing button { font-family: inherit; cursor: pointer; border: none; }
.filing ul { list-style: none; margin: 0; padding: 0; }

/* Topbar */
.f-topbar {
    background: var(--f-navy-deep);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.f-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.f-topbar-left form { display: contents; }

.f-search {
    background: #1f2b4a;
    border: 1px solid #404d66;
    height: 40px;
    width: 320px;
    max-width: 60vw;
    border-radius: 10px;
    padding: 0 14px;
    color: #fff;
    font-size: 12px;
    font-family: inherit;
    outline: none;
    text-align: right;
}
.f-search::placeholder { color: var(--f-muted); }
.f-search:focus { border-color: var(--f-gold); }

.f-user-chip {
    background: #212e4d;
    border-radius: 20px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}

.f-user-chip .avatar-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--f-gold);
}

.f-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.f-brand-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
}

.f-topbar-crest {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.f-topbar-crest img {
    width: 40px;
    height: 40px;
}

.a-admin-badge {
    display: inline-block;
    background: var(--f-gold);
    color: var(--f-navy-deep);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-inline-end: 6px;
    vertical-align: middle;
}

.f-brand-col .name { font-weight: 700; font-size: 16px; color: #fff; }
.f-brand-col .sub { font-size: 10px; color: var(--f-muted); }

.f-avatar {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--f-gold), #8a6a2a);
    overflow: hidden;
    flex-shrink: 0;
}
.f-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Body: sidebar + main */
.f-body {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - 68px);
    background: #fff;
}

.f-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #1c2947 0%, #121c33 50%, #0a0f1f 100%);
    padding: 24px 16px;
    position: relative;
    border-left: 2px solid rgba(201, 164, 79, 0.5);
    overflow-y: auto;
}

/* Hamburger toggle: hidden on desktop, shown ≤1024px in the topbar */
.f-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 34px;
    height: 34px;
    padding: 6px;
    background: transparent;
    flex-shrink: 0;
}
.f-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--f-gold);
}

/* Close (×) button inside the drawer, hidden on desktop */
.f-sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 14px;
    left: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--f-gold);
    font-size: 18px;
    line-height: 1;
}

/* Drawer backdrop, hidden on desktop */
.f-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 31, 0.55);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.f-nav-section { padding: 14px 4px 2px; }

.f-nav-label {
    color: var(--f-gold);
    font-size: 11px;
    font-weight: 600;
    text-align: right;
    display: block;
    margin-bottom: 2px;
}

.f-nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
}

.f-nav-item .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

.f-nav-item.active {
    background: var(--f-gold);
    color: var(--f-navy);
    font-weight: 600;
}

.f-nav-item.active .dot { background: var(--f-navy); }

.f-nav-item:hover:not(.active) { background: rgba(255, 255, 255, 0.06); }

.f-nav-divider {
    height: 1px;
    background: rgba(201, 164, 79, 0.18);
    margin: 4px 0;
}

.f-main {
    flex: 1;
    min-width: 0;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.f-title-block { margin-bottom: 0; }
.f-title-block h1 { font-weight: 900; font-size: 30px; color: var(--f-navy); margin: 0; text-align: right; }

/* Gold-bordered dark banner, reused as the title pattern on every filing sub-page */
.f-page-banner {
    background: linear-gradient(90deg, #0d1429, #1a243d);
    border: 1px solid var(--f-gold);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.f-page-banner h1 {
    font-family: 'Vazirmatn', sans-serif;
    color: var(--f-gold);
    font-size: 19px;
    font-weight: 900;
    margin: 0;
}

.f-page-banner .hint { color: var(--f-gold); font-size: 12px; }

/* Blue notice box (used on the folders page) */
.f-info-box {
    background: #e3f2fc;
    color: #1a598c;
    border-radius: 10px;
    padding: 16px;
    text-align: right;
    margin-bottom: 0;
}
.f-info-box .title { font-weight: 600; font-size: 13px; display: block; margin-bottom: 6px; }
.f-info-box .desc { font-size: 11px; display: block; }

/* Blue save button used on dashboard forms (support/password/etc) */
.f-btn-blue {
    background: #2480d9;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}

/* Red danger button, e.g. "remove all files from this folder" */
.f-btn-danger {
    background: #bf2626;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 4px;
}
.f-btn-danger:hover { background: #a31f1f; }

/* Fixed-column detail table: folders / customers / tickets */
.f-data-table-wrap {
    background: #fff;
    border: 1px solid #e5e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(26, 26, 38, 0.05), 0 10px 28px rgba(128, 102, 38, 0.1);
    overflow-x: auto;
}
.f-data-table { border-collapse: collapse; width: max-content; min-width: 100%; }
.f-data-table th, .f-data-table td {
    width: 140px;
    height: 36px;
    text-align: center;
    font-size: 11px;
    padding: 0 8px;
    white-space: nowrap;
}
.f-data-table thead tr { background: #f2f5fa; }
.f-data-table th { color: #4d5466; font-weight: 600; }
.f-data-table td { color: var(--f-navy); font-weight: 400; }
.f-data-table tbody tr:nth-child(even) { background: #fafafc; }
.f-data-table tbody tr:nth-child(odd) { background: #fff; }
.f-row-action {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    margin-inline-start: 4px;
    background: none;
    cursor: pointer;
}
.f-row-action.edit { color: #2480d9; }
.f-row-action.edit:hover { background: rgba(36, 128, 217, 0.1); }
.f-row-action.danger { color: #bf2626; }
.f-row-action.danger:hover { background: rgba(191, 38, 38, 0.1); }
.f-row-action-muted { color: #c3c8d4; font-size: 11px; }

.f-row-link { cursor: pointer; }
.f-row-link:hover { background: #fbf6ea !important; }
.f-cell-link { color: var(--f-navy); text-decoration: underline; text-decoration-color: transparent; }
.f-row-link:hover .f-cell-link { text-decoration-color: var(--f-gold); }

.f-data-table-empty {
    padding: 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #994d33;
    font-size: 12px;
}

/* Profile photo upload row */
.f-photo-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.f-photo-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(201, 164, 79, 0.12);
    border: 1px solid var(--f-gold);
    color: var(--f-gold);
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 900;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.f-photo-preview img { width: 100%; height: 100%; object-fit: cover; }

.f-photo-field { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: right; }
.f-photo-field label { font-size: 13px; font-weight: 600; color: var(--f-navy); }
.f-photo-field input[type="file"] { font-size: 12px; font-family: inherit; }
.f-photo-hint { font-size: 11px; color: #9098a8; }

/* Detail form rows: label above input box, used on support/profile/password pages */
.f-detail-row { display: flex; gap: 16px; flex-wrap: wrap; }
.f-detail-field { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; width: 220px; max-width: 100%; }
.f-detail-field label { color: #596173; font-size: 12px; font-weight: 500; }
.f-detail-field input, .f-detail-field select {
    width: 100%;
    height: 40px;
    border: 1px solid #dbe0eb;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13px;
    text-align: right;
    font-family: inherit;
}
.f-detail-field.wide { width: 700px; }
.f-detail-field textarea {
    width: 100%;
    height: 120px;
    border: 1px solid #dbe0eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    text-align: right;
    font-family: inherit;
    resize: vertical;
}

/* Subscription status card */
.f-status-card {
    background: #fff;
    border: 1px solid #e5e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(26, 26, 38, 0.05), 0 10px 28px rgba(128, 102, 38, 0.1);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
}
.f-status-row { display: flex; align-items: center; gap: 8px; }
.f-status-row .dot { width: 10px; height: 10px; border-radius: 50%; background: #23a26d; flex-shrink: 0; }
.f-status-row .dot.gold { background: var(--f-gold); }
.f-status-row .val { color: var(--f-navy); font-size: 13px; font-weight: 600; }
.f-status-row .lbl { color: #808594; font-size: 12px; }

/* Stats row */
.f-stats-row { display: flex; gap: 20px; flex-wrap: wrap; }

.f-stat-card {
    background: #fff;
    border: 1px solid var(--f-border);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(23, 28, 51, 0.04), 0 8px 24px rgba(23, 28, 51, 0.08);
    padding: 20px;
    width: 300px;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.f-stat-card .icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(201, 164, 79, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.f-stat-card .icon-badge .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--f-gold); }

.f-stat-card .text-col { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: right; }
.f-stat-card .label { color: #737a8c; font-size: 13px; font-weight: 500; }
.f-stat-card .value { color: var(--f-navy); font-size: 26px; font-weight: 700; }

/* Cards / panels */
.f-panel {
    background: #fff;
    border: 1px solid #ebedf2;
    border-radius: 14px;
    padding: 24px;
}

/* Table */
.f-table-wrap { overflow-x: auto; background: #fff; border: 1px solid #ebedf2; border-radius: 14px; }
.f-table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 13px; }
.f-table th, .f-table td { padding: 12px 16px; text-align: right; white-space: nowrap; }
.f-table thead th { background: #f6f8fa; color: #596173; font-weight: 600; border-bottom: 1px solid #ebedf2; }
.f-table tbody tr { border-bottom: 1px solid #f1f2f6; }
.f-table tbody tr:last-child { border-bottom: none; }
.f-empty { padding: 40px; text-align: center; color: #9098a8; }

/* Forms */
.f-form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; text-align: right; }
.f-form-row label { font-size: 13px; font-weight: 600; color: var(--f-navy); }
.f-form-row input, .f-form-row select, .f-form-row textarea {
    border: 1px solid #dfe3ec;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-family: inherit;
    text-align: right;
}
.f-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
/* کارشناس ۱/۲/۳ + امضا row — used to be an inline style="grid-template-columns:
   repeat(4,1fr)" on file_new/file_edit's appraisal form, which (being inline)
   always overrode the ≤640px .f-form-grid → 1fr rule below and forced 4 fixed
   columns even on a phone screen. Moved to a class so the responsive rules
   below can actually reach it. */
.f-form-grid-4col { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .f-form-grid-4col { grid-template-columns: repeat(2, 1fr); } }

/*
 * Sidebar drawer (≤1024px), shared by /filing and /admin.
 * Above 1024px the sidebar stays the fixed, always-visible 300px column
 * defined above — nothing in this block applies there.
 * Below 1024px the sidebar becomes an off-canvas drawer that slides in
 * from the right edge (this is an RTL layout, and the sidebar already sits
 * visually on the right), toggled by the hamburger button in .f-topbar.
 */
@media (max-width: 1024px) {
    .f-hamburger { display: flex; }

    .f-body { position: relative; }

    .f-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        width: 85vw;
        max-width: 320px;
        height: 100vh;
        padding-top: 56px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        box-shadow: -8px 0 28px rgba(0, 0, 0, 0.35);
    }

    .f-sidebar-close { display: flex; }

    .f-drawer-backdrop { display: block; }

    body.f-sidebar-open { overflow: hidden; }
    body.f-sidebar-open .f-sidebar { transform: translateX(0); }
    body.f-sidebar-open .f-drawer-backdrop { opacity: 1; pointer-events: auto; }
}

@media (max-width: 640px) { .f-form-grid { grid-template-columns: 1fr; } .f-main { padding: 20px; } }

.f-btn {
    background: var(--f-gold);
    color: var(--f-navy-deep, #0d1429);
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}

.f-alert { padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; text-align: right; }
.f-alert.error { background: #fdecec; color: #b3261e; }
.f-alert.success { background: #eaf7ee; color: #1e7a3a; }

.f-badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; background: #f5f7fa; color: #596173; white-space: nowrap; }
/* Same color pairs already used for .f-alert.error/.success and the pending notice boxes elsewhere. */
.f-badge.status-pending { background: #fbf6ea; color: #6b5a26; }
.f-badge.status-approved { background: #eaf7ee; color: #1e7a3a; }
.f-badge.status-rejected { background: #fdecec; color: #b3261e; }
.f-badge-note { font-size: 10px; color: #b3261e; margin-top: 3px; white-space: normal; max-width: 160px; }

/* اعلان‌ها — notifications list */
.f-notification-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #ebedf2;
    border-radius: 10px;
    text-decoration: none;
    color: var(--f-navy);
    font-size: 13px;
    flex-wrap: wrap;
}
.f-notification-row:hover { background: #f6f8fa; }
.f-notification-time { color: #9098a8; font-size: 11px; white-space: nowrap; }

/* Ticket thread */
.f-thread-msg {
    border-radius: 12px;
    padding: 14px 16px;
    max-width: 640px;
}
.f-thread-msg.agent { background: #f6f8fa; align-self: flex-start; }
.f-thread-msg.support { background: #e3f2fc; align-self: flex-start; }
.f-thread-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.f-thread-sender { font-size: 12px; font-weight: 700; color: var(--f-navy); }
.f-thread-msg.support .f-thread-sender { color: #1a598c; }
.f-thread-date { font-size: 11px; color: #9098a8; }
.f-thread-body { font-size: 13px; color: #3c4257; margin: 0; line-height: 1.9; }

/* Auth pages */
.f-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #14213d, #0d1429);
    padding: 20px;
}

.f-auth-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 32px;
    width: 380px;
    max-width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Unlike the navbar/footer/topbar crests, this one sits inside a WHITE card
   (.f-auth-card has background:#fff) rather than directly on the navy page
   background — a box-free white-on-transparent mark would be fully invisible
   here, so it keeps a plain navy circle backdrop (no border/gold tint). */
.f-auth-crest {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--f-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.f-auth-crest img {
    width: 60px;
    height: 60px;
}

.f-auth-card h1 { font-size: 18px; color: var(--f-navy); margin: 0 0 6px; }
.f-auth-card p.sub { color: #808594; font-size: 13px; margin: 0 0 24px; }

.f-auth-card input {
    width: 100%;
    border: 1px solid #dfe3ec;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    text-align: center;
    margin-bottom: 16px;
    direction: ltr;
    font-family: inherit;
}

.f-auth-card button.f-btn { width: 100%; padding: 12px; font-size: 14px; }

.f-dev-code {
    margin-top: 16px;
    padding: 10px;
    background: #fbf6ea;
    border: 1px dashed var(--f-gold);
    border-radius: 10px;
    font-size: 12px;
    color: #6b5a26;
}

/* فرم کارشناسی — appraisal section reused on file_new/file_edit (fillable) and
   file_show/appraisal_show (read-only). Themed with the existing f-navy/f-gold
   tokens and .f-form-row's border/radius/font-size, not a separate look. */
.f-ap-section-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--f-gold);
    margin: 4px 0 0;
    text-align: right;
}
.f-ap-required-legend { font-size: 11px; color: #9098a8; margin: 2px 0 10px; text-align: right; }
.f-required-mark { color: #b3261e; font-weight: 700; }
.f-cross-link-note { font-size: 12px; color: #596173; background: #f6f8fa; border: 1px solid #ebedf2; border-radius: 8px; padding: 8px 12px; margin: 0 0 14px; text-align: right; }
.f-cross-link-note a { color: var(--f-gold); font-weight: 600; }

.f-ap-grid { display: flex; gap: 10px; flex-wrap: wrap; overflow-x: auto; padding-bottom: 4px; }
.f-ap-col {
    border: 1px solid #dfe3ec;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 112px;
    flex: 1 1 112px;
    background: #fff;
}
.f-ap-col-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--f-navy);
    text-align: center;
    border-bottom: 1px solid #eef0f5;
    padding-bottom: 6px;
}
.f-ap-col input, .f-ap-col select, .f-ap-col textarea {
    text-align: center;
    font-size: 12px;
    border: 1px solid #dfe3ec;
    border-radius: 8px;
    padding: 6px 8px;
    font-family: inherit;
    width: 100%;
}
.f-ap-radio-col { min-width: 140px; flex-basis: 140px; }
.f-ap-radio-list { display: flex; flex-direction: column; gap: 6px; }
.f-ap-radio-item, .f-ap-check-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--f-navy); }
.f-ap-radio-item input, .f-ap-check-item input { width: auto; }
.f-ap-direction-col { min-width: 120px; flex-basis: 120px; }
.f-ap-direction-sub { display: flex; gap: 6px; }
.f-ap-direction-sub .mini { flex: 1; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.f-ap-direction-sub .mini label { font-size: 10px; color: #9098a8; }
.f-ap-direction-sub input { text-align: center; }

.f-ap-amenities { display: flex; flex-direction: column; gap: 8px; }
.f-ap-amenity-row { display: flex; gap: 8px; flex-wrap: wrap; border: 1px solid #dfe3ec; border-radius: 10px; padding: 10px 12px; }
.f-ap-chip { display: flex; align-items: center; gap: 6px; font-size: 12px; border: 1px solid #dfe3ec; border-radius: 16px; padding: 6px 12px; color: var(--f-navy); }
.f-ap-chip input { width: auto; }

.f-ap-quality { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 1px solid #dfe3ec; border-radius: 10px; padding: 10px 12px; }
.f-ap-quality .title-sm { font-size: 12px; font-weight: 700; color: var(--f-navy); flex: none; }

.f-ap-error { color: #b3261e; font-size: 11px; margin-top: 2px; }

/* Read-only variant used on file_show.php / appraisal_show.php */
.f-ap-view-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.f-ap-view-col {
    border: 1px solid #ebedf2;
    border-radius: 10px;
    padding: 8px 12px;
    background: #f9fafb;
    min-width: 120px;
    flex: 1 1 120px;
    text-align: center;
}
.f-ap-view-col .lbl { display: block; font-size: 11px; color: #9098a8; margin-bottom: 4px; }
.f-ap-view-col .val { font-size: 13px; font-weight: 600; color: var(--f-navy); }

@media (max-width: 640px) {
    /* Was flex-wrap:nowrap + fixed 108px columns, which turned this whole
       row into a horizontally-scrolling strip on phones — every field was
       technically reachable but only by swiping sideways, easy to miss
       entirely, and each 108px box was too narrow to comfortably read/tap.
       Stack one field per row instead, like the rest of this form already
       does at this width (see .f-form-grid's own ≤640px rule above). */
    .f-ap-grid { overflow-x: visible; flex-direction: column; }
    .f-ap-col { flex: 1 1 auto; min-width: 0; width: 100%; }
    .f-ap-direction-sub { max-width: 220px; }
}
