:root {
    --bg: #0f0f0f;
    --card: #1a1a1a;
    --primary: #e11d48;
    --primary-hover: #fb7185;
    --success: #10b981;
    --text: #ffffff;
    --text-dim: #a1a1aa;
    --border: #2e2e2e;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 560px;
}

header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 2rem;
}

h1, h2, h3 {
    margin: 0;
}

.logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.subtle {
    color: var(--text-dim);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.dashboard-grid {
    display: grid;
    gap: 0.85rem;
    margin-top: 1.2rem;
}

.tool-card {
    text-align: left;
    width: 100%;
    background: linear-gradient(135deg, #18181b, #27272a);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.tool-title {
    font-size: 1rem;
    font-weight: 700;
}

.tool-subtitle {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.card {
    background: var(--card);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.tool-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
}

.tent-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.tent-btn {
    background: #121214;
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 8px;
    color: var(--text-dim);
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.tent-btn.active {
    background: rgba(225, 29, 72, 0.2);
    border-color: var(--primary);
    color: var(--text);
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: wait;
}

.btn-reset {
    width: 100%;
    background: #1a1a1e;
    color: var(--text-dim);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000;
    padding: 0.5rem;
    border-radius: 8px;
}

.counter button {
    background: var(--border);
    color: var(--text);
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
}

.counter button:active {
    background: var(--primary);
}

label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    margin: 1rem 0 0.5rem;
}

.transport-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.7rem;
}

.transport-btn {
    border: 1px solid var(--border);
    background: #121214;
    color: var(--text-dim);
    border-radius: 8px;
    padding: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.transport-btn.active {
    color: var(--text);
    border-color: var(--primary);
    background: rgba(225, 29, 72, 0.2);
}

.origin-display {
    margin: 0;
    background: #000;
    border: 1px solid var(--border);
    padding: 0.85rem;
    border-radius: 8px;
}

.address-wrap {
    position: relative;
}

#destination-input {
    width: 100%;
    border: 1px solid var(--border);
    background: #000;
    color: var(--text);
    border-radius: 8px;
    padding: 0.85rem;
    font-size: 0.95rem;
}

#destination-input:focus {
    outline: 2px solid rgba(225, 29, 72, 0.35);
    border-color: var(--primary);
}

.suggestions {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    display: none;
    background: #0c0c0f;
    border: 1px solid var(--border);
    border-radius: 8px;
    z-index: 4;
}

.suggestions.show {
    display: block;
}

.suggestions li {
    border: none;
    padding: 0;
}

.suggestions button {
    width: 100%;
    text-align: left;
    background: transparent;
    color: var(--text);
    border: none;
    padding: 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.suggestions button:hover {
    background: rgba(225, 29, 72, 0.2);
}

.status-text {
    margin-top: 0.8rem;
    margin-bottom: 0;
    color: var(--text-dim);
    min-height: 1.2rem;
}

ul {
    list-style: none;
    padding: 0;
}

li {
    padding: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

#order-list li {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--primary);
    border-bottom: none;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.remove-btn {
    color: #f87171;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
}

#material-list li {
    padding: 1.2rem;
    font-size: 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.result-list li {
    padding: 0.95rem 0;
}

.result-list strong {
    color: var(--primary);
}

.route-map {
    margin-top: 1rem;
    height: 240px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

input[type="checkbox"] {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 1.2rem;
    cursor: pointer;
    accent-color: var(--primary);
}

li.done {
    background: rgba(0, 0, 0, 0.4);
    opacity: 0.4;
}

li.done span:not(.qty) {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    color: var(--text-dim);
}

li.done .qty {
    color: var(--text-dim);
}

.qty {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.4rem;
    margin-left: auto;
}

.empty-state {
    color: var(--text-dim);
    font-style: italic;
    text-align: center;
    justify-content: center !important;
    padding: 2rem !important;
    border: 1px dashed var(--border) !important;
    background: transparent !important;
    font-size: 1rem !important;
}

@media (max-width: 520px) {
    .tool-header-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-secondary {
        width: 100%;
    }
}