:root {
    --brand-yellow: #fadb28;
    --black: #000000;
    --white: #ffffff;
    --border-thin: 1px solid var(--black);
    --border-thick: 2px solid var(--black);
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 20px;
    --space-xl: 28px;
}

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

html, body {
    width: 100%;
    min-height: 100%;
    background-color: var(--brand-yellow);
    font-family: 'Cabinet Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    color: var(--black);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

/* App Layout Structure */
.app-layout {
    min-height: 100dvh;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 28px;
}

/* Brand Header */
.brand-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0 14px;
}

.logo-wrapper {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-meta {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--black);
    line-height: 1.1;
}

.brand-sub {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #444;
    margin-top: 2px;
}

/* Card Container */
.card-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.modal-wrapper {
    background-color: var(--white);
    border: var(--border-thick);
    width: 100%;
    position: relative;
    box-shadow: 4px 4px 0px var(--black);
}

/* State Panel */
.state-panel {
    padding: var(--space-lg);
}

@media (min-width: 420px) {
    .state-panel {
        padding: var(--space-xl);
    }
}

.state-panel.hidden {
    display: none;
}

/* Typography */
.headline {
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
}

@media (min-width: 400px) {
    .headline {
        font-size: 26px;
    }
}

.sub-text {
    font-size: 13.5px;
    line-height: 1.45;
    color: #444;
}

.location-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #222;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
}

.location-tag i {
    font-size: 13px;
    color: var(--black);
}

/* Mobile-First Rating List */
.rating-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: var(--space-md);
}

.rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 11px 12px;
    background-color: #fafafa;
    border: 1.5px solid var(--black);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.rating-row:active {
    transform: scale(0.98);
}

.rating-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-num {
    font-size: 14px;
    font-weight: 800;
    background: var(--black);
    color: var(--white);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.rating-stars {
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--black);
    transition: color 0.15s ease;
}

.rating-text {
    font-size: 12.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--black);
    flex: 1;
    text-align: left;
    margin-left: 10px;
    transition: color 0.15s ease;
}

.rating-arrow {
    font-size: 16px;
    color: #777;
    transition: transform 0.15s ease, color 0.15s ease;
}

/* Hover & Active states */
.rating-row:hover, .rating-row.active {
    background-color: var(--black);
    color: var(--brand-yellow);
    border-color: var(--black);
}

.rating-row:hover .rating-num, .rating-row.active .rating-num {
    background-color: var(--brand-yellow);
    color: var(--black);
}

.rating-row:hover .rating-stars, .rating-row.active .rating-stars {
    color: var(--brand-yellow);
}

.rating-row:hover .rating-text, .rating-row.active .rating-text {
    color: var(--brand-yellow);
}

.rating-row:hover .rating-arrow, .rating-row.active .rating-arrow {
    color: var(--brand-yellow);
    transform: translateX(3px);
}

/* Top Navigation & Back Button */
.panel-top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid #e5e5e5;
}

.back-btn {
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--black);
    padding: 4px 0;
    transition: opacity 0.15s ease;
}

.back-btn i {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.back-btn:hover i {
    transform: translateX(-3px);
}

.rating-pill-badge {
    background: var(--brand-yellow);
    color: var(--black);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border: var(--border-thin);
    display: flex;
    align-items: center;
    gap: 3px;
    letter-spacing: 0.05em;
}

.star-icon {
    font-size: 12px;
}

.incident-badge {
    display: inline-block;
    background: var(--black);
    color: var(--white);
    padding: 3px 7px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

/* Google Review Card */
.review-feature-card {
    border: var(--border-thick);
    background-color: #fafafa;
    padding: var(--space-md);
    margin-top: var(--space-md);
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.google-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: var(--black);
    color: var(--white);
    padding: 3px 6px;
}

.verified-tag {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #666;
}

.store-info-block {
    margin-bottom: var(--space-sm);
}

.store-avatar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.store-thumb {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--black);
    background: var(--brand-yellow);
    object-fit: contain;
    flex-shrink: 0;
}

.store-title {
    font-size: 14.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin-bottom: 2px;
}

.stars-row {
    display: flex;
    align-items: center;
    gap: 2px;
}

.stars-row i {
    font-size: 16px;
    color: #e5a900;
}

.stars-label {
    font-size: 11px;
    font-weight: 700;
    color: #444;
    margin-left: 6px;
}

.review-callout {
    font-size: 12.5px;
    line-height: 1.45;
    color: #333;
    margin-bottom: var(--space-md);
    border-top: 1px dashed #ccc;
    padding-top: var(--space-sm);
}

.perks-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.perk-item {
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #333;
}

/* Primary Action Buttons */
.action-footer {
    margin-top: var(--space-lg);
}

.btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 13px var(--space-md);
    font-family: inherit;
    font-weight: 800;
    font-size: 14.5px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-decoration: none;
    border: var(--border-thick);
    cursor: pointer;
    background: transparent;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.15s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--brand-yellow);
    color: var(--black);
}

.btn-primary:hover {
    background-color: #ffd800;
}

.btn-dark {
    background-color: var(--black);
    color: var(--white);
}

.btn i {
    font-size: 18px;
}

/* Forms */
.industrial-form {
    border-top: var(--border-thick);
    padding-top: var(--space-md);
}

.form-row {
    margin-bottom: var(--space-md);
}

.util-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.label-with-counter {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 6px;
}

.label-with-counter .util-label {
    margin-bottom: 0;
}

.char-counter {
    font-size: 10px;
    font-family: monospace;
    color: #666;
}

.util-input {
    width: 100%;
    padding: 11px 12px;
    font-family: inherit;
    font-size: 14px;
    border: var(--border-thin);
    background-color: #fafafa;
    border-radius: 0;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.util-input:focus {
    border: var(--border-thick);
    background-color: var(--white);
    padding: 10px 11px;
}

.util-textarea {
    resize: vertical;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: var(--space-xs) 0;
}

.custom-checkbox {
    position: relative;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.util-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.checkbox-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: var(--border-thin);
    background: #fafafa;
    transition: all 0.15s;
}

.util-checkbox:checked ~ .checkbox-box {
    background: var(--black);
    border: var(--border-thick);
}

.util-checkbox:checked ~ .checkbox-box::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.util-label-inline {
    font-size: 13px;
    line-height: 1.35;
    cursor: pointer;
}

/* Loader */
.loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) 0;
    text-align: center;
}

.industrial-spinner {
    width: 36px;
    height: 36px;
    border: var(--border-thick);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.small-loader-sub {
    font-size: 11.5px;
    margin-top: 4px;
    color: #666;
}

.loading-text {
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* Receipt */
.receipt {
    font-family: 'Courier New', Courier, monospace;
    background: #fdfdfd;
    padding: var(--space-md);
    border: var(--border-thin);
}

.receipt-header {
    text-align: center;
    margin-bottom: var(--space-md);
}

.receipt-logo {
    width: 36px;
    height: 36px;
    margin: 0 auto 6px;
    display: block;
    object-fit: contain;
}

.receipt-header h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 2px;
}

.receipt-header p {
    font-size: 11px;
    color: #333;
}

.receipt-divider {
    border-top: 1px dashed var(--black);
    margin: var(--space-md) 0;
}

.receipt-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: bold;
}

.receipt-footer {
    text-align: center;
    font-size: 11px;
    line-height: 1.45;
    color: #555;
}

#ref-id {
    background: var(--brand-yellow);
    padding: 0 4px;
}
