/* Explain: App-specific component classes for styling UI elements. */
/* ===== Header ===== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 11, 15, 0.86);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 12px;
    background: var(--primary-color);
    color: #0a0b0f;
    font-size: 1.05rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.8rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(242, 255, 0, 0.08);
}

/* ===== Buttons ===== */
.app-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 48px;
    padding: 0 1.2rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.25s ease, color 0.2s ease, border-color 0.2s ease;
}

.app-btn-lg {
    min-height: 56px;
    padding: 0 1.6rem;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

.app-btn-primary {
    background: var(--primary-color);
    color: #0a0b0f;
}

.app-btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 12px 30px -10px rgba(242, 255, 0, 0.6);
    transform: translateY(-2px);
}

.app-btn-wa {
    background: var(--wa-color);
    color: #04220f;
}

.app-btn-wa:hover {
    background: #1fbe5a;
    box-shadow: 0 12px 30px -10px rgba(37, 211, 102, 0.6);
    transform: translateY(-2px);
}

.app-btn-ghost {
    background: var(--surface-2);
    color: var(--text-color);
    border-color: var(--border-color);
}

.app-btn-ghost:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.app-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.app-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    background: rgba(242, 255, 0, 0.1);
    border: 1px solid rgba(242, 255, 0, 0.35);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.hero-media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.35;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 11, 15, 0.72) 0%, rgba(10, 11, 15, 0.92) 62%, var(--background-color) 100%);
}

.hero-stat {
    background: rgba(20, 22, 29, 0.75);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.85rem;
    backdrop-filter: blur(6px);
}

.hero-stat-num {
    display: block;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--primary-color);
}

.hero-stat-label {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ===== Action tiles ===== */
.action-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 1.15rem;
    border-radius: var(--radius-lg);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.action-tile:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 16px 40px -22px rgba(242, 255, 0, 0.7);
}

.action-tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    color: var(--primary-color);
    font-size: 1.15rem;
}

.action-tile-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
}

.action-tile-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
}

.action-tile-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #0a0b0f;
}

.action-tile-primary .action-tile-desc,
.action-tile-primary .action-tile-icon {
    color: #0a0b0f;
}

.action-tile-primary .action-tile-icon {
    background: rgba(10, 11, 15, 0.12);
}

.action-tile-wa {
    background: var(--wa-color);
    border-color: var(--wa-color);
    color: #04220f;
}

.action-tile-wa .action-tile-desc,
.action-tile-wa .action-tile-icon {
    color: #04220f;
}

.action-tile-wa .action-tile-icon {
    background: rgba(4, 34, 15, 0.12);
}

/* ===== Cards & forms ===== */
.app-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.app-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.app-input {
    width: 100%;
    min-height: 50px;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-input::placeholder {
    color: #6b7280;
}

.app-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(242, 255, 0, 0.15);
}

textarea.app-input {
    min-height: 92px;
    resize: vertical;
}

.order-status {
    min-height: 1.2rem;
    font-size: 0.9rem;
}

.order-status.is-ok {
    color: var(--primary-color);
}

.order-status.is-err {
    color: #ff6b6b;
}

/* ===== Pricing ===== */
.tariff-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.15rem;
}

.tariff-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 0.6rem;
    border-radius: var(--radius-sm);
    background: rgba(242, 255, 0, 0.1);
    color: var(--primary-color);
}

.tariff-val {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--text-color);
}

.tariff-title {
    margin-top: 0.35rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.tariff-desc {
    margin-top: 0.15rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

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

.price-row-head {
    background: var(--surface-2);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.price-val {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

/* ===== Live map ===== */
.map-shell {
    position: relative;
    height: 360px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #0d1017;
    border: 1px solid var(--border-color);
}

.map-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 46px 46px;
}

.map-layer {
    position: absolute;
    inset: 0;
}

.map-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    transition: left 3s ease, top 3s ease;
}

.map-dot {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(242, 255, 0, 0.18), 0 0 16px rgba(242, 255, 0, 0.85);
    animation: pulse 2.4s infinite;
}

.map-label {
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translate(-50%, -6px);
    padding: 1px 5px;
    border-radius: 6px;
    background: rgba(10, 11, 15, 0.85);
    border: 1px solid rgba(242, 255, 0, 0.3);
    color: var(--primary-color);
    font-size: 0.62rem;
    font-weight: 700;
    white-space: nowrap;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(242, 255, 0, 0.18), 0 0 16px rgba(242, 255, 0, 0.85);
    }
    50% {
        box-shadow: 0 0 0 9px rgba(242, 255, 0, 0), 0 0 22px rgba(242, 255, 0, 0.95);
    }
}

.map-label-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(10, 11, 15, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.map-legend {
    position: absolute;
    left: 0.85rem;
    bottom: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(10, 11, 15, 0.78);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.74rem;
}

.map-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--primary-color);
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
    padding: 1.1rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.stat-card i {
    color: var(--primary-color);
}

.stat-num {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.7rem;
    line-height: 1;
    color: var(--text-color);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Footer ===== */
.app-footer {
    border-top: 1px solid var(--border-color);
    background: #08090d;
}

.footer-link {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--primary-color);
}