:root {
    --primary: #e8567f;
    --primary-dark: #c9405f;
}

body {
    background: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.navbar { background: var(--primary) !important; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.text-primary { color: var(--primary) !important; }

/* Stats cards */
.stats-card { border-radius: 12px; border: none; }

/* Box grid */
.box-container {
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.box-header {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: #555;
}
.slot-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}
.slot {
    aspect-ratio: 1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
    position: relative;
}
.slot:active { transform: scale(0.95); }
.slot-free {
    background: #e9ecef;
    color: #adb5bd;
}
.slot-occupied {
    background: var(--primary);
    color: white;
}
.slot-occupied:hover {
    background: var(--primary-dark);
}
.slot-photo {
    background-color: #333;
}
.slot-photo:hover {
    opacity: 0.85;
}
.slot-num {
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Wizard */
.wizard-step {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    background: #e9ecef;
    color: #888;
}
.wizard-step.active {
    background: var(--primary);
    color: white;
}
.wizard-step.done {
    background: #28a745;
    color: white;
}

.category-btn {
    padding: 16px;
    font-size: 1.1rem;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    background: white;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}
.category-btn:hover, .category-btn:focus {
    border-color: var(--primary);
    background: #fff5f7;
}

/* Measure background diagram */
.measure-fields-inner {
    position: relative;
    min-height: 200px;
    padding: 8px 0;
}
.measure-fields-inner .measure-row {
    position: relative;
    z-index: 1;
}

/* Measure input */
.measure-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.measure-label {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
}
.measure-letter {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.measure-input {
    width: 90px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Inventory cards */
.item-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: box-shadow 0.15s;
    display: flex;
    align-items: center;
    gap: 12px;
}
.item-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.item-slot-badge {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
}
.item-info { flex: 1; min-width: 0; }
.item-info .brand { font-weight: 700; font-size: 1rem; }
.item-info .meta { color: #888; font-size: 0.85rem; }

/* Category list */
.cat-card {
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.cat-card .cat-name { font-weight: 700; font-size: 1.05rem; }
.cat-card .cat-measures { color: #888; font-size: 0.85rem; }

/* Detail page */
.detail-header {
    background: var(--primary);
    color: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
}
.detail-slot { font-size: 3rem; font-weight: 800; }
.detail-box { font-size: 1.1rem; opacity: 0.9; }
.detail-section {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}
.detail-row:last-child { border-bottom: none; }
.detail-row .label { color: #888; }
.detail-row .value { font-weight: 600; }

/* Login */
.login-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, #f7a5b8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-container {
    max-width: 360px;
    width: 100%;
    padding: 40px 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    text-align: center;
}
.login-container h2 { color: var(--primary); }
