/* === Base === */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: #f8f6f3;
    color: #2d2d2d;
    display: flex;
    min-height: 100vh;
}

/* === Sidebar === */
.sidebar {
    width: 220px;
    background: #fff;
    border-right: 1px solid #e8e4df;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 10;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    padding: 0 8px;
}
.logo-icon { font-size: 28px; }
.logo-text { font-size: 18px; font-weight: 600; color: #2d2d2d; }
.nav-links { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.15s;
}
.nav-link:hover { background: #f5f2ef; color: #2d2d2d; }
.nav-link.active { background: #f0ebe5; color: #2d2d2d; font-weight: 500; }
.nav-icon { font-size: 18px; }

/* === Content === */
.content {
    margin-left: 220px;
    padding: 32px 40px;
    flex: 1;
    max-width: 1200px;
}

/* === Page Header === */
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 28px; font-weight: 600; color: #1a1a1a; }
.subtitle { color: #888; font-size: 14px; margin-top: 4px; }

/* === Stats Grid === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #e8e4df;
}
.stat-card.accent {
    background: linear-gradient(135deg, #f5e6ee, #efe0e8);
    border-color: #e8cdd8;
}
.stat-number { font-size: 36px; font-weight: 600; color: #1a1a1a; }
.stat-label { font-size: 13px; color: #888; margin-top: 4px; }

/* === Cards === */
.card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #e8e4df;
    margin-bottom: 20px;
}

/* === Filters === */
.filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}
.filter-select, .filter-input {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #e0dbd5;
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    color: #2d2d2d;
}
.results-count { font-size: 13px; color: #888; margin-left: auto; }

/* === Grid === */
.inspo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 12px;
}
.inspo-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: opacity 0.3s, transform 0.15s;
    position: relative;
}
.inspo-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }
.inspo-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.inspo-actions {
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.inspo-delete {
    width: 28px; height: 28px;
    border-radius: 50%; border: none;
    background: #f5f2ef; color: #999;
    font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.inspo-delete:hover { background: #fee2e2; color: #c44040; }

/* === Buttons === */
.btn-primary {
    padding: 8px 20px; border-radius: 8px; border: none;
    background: #d4a9b8; color: white;
    font-size: 13px; font-family: inherit; font-weight: 500;
    cursor: pointer; transition: background 0.15s;
}
.btn-primary:hover { background: #c49aa8; }
.btn-secondary {
    padding: 8px 20px; border-radius: 8px;
    border: 1px solid #e0dbd5; background: #fff;
    color: #555; font-size: 13px; font-family: inherit; font-weight: 500;
    cursor: pointer;
}
.btn-secondary:hover { background: #f5f2ef; }
.action-btn {
    width: 28px; height: 28px;
    border-radius: 50%; border: none;
    background: #f5f2ef; font-size: 14px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.15s; text-decoration: none; color: inherit;
}
.action-btn:hover { background: #e8e4df; }

/* === Placeholder === */
.garment-img-container {
    width: 100%; aspect-ratio: 3/4; overflow: hidden;
    background: #fff; display: flex; align-items: center; justify-content: center;
}
.garment-placeholder { font-size: 40px; color: #ccc; }

/* === Loading & Empty === */
.loading-spinner {
    width: 40px; height: 40px; margin: 0 auto;
    border: 3px solid #e8e4df; border-top-color: #d4a9b8;
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-text { font-size: 13px; color: #aaa; font-style: italic; }

/* === Novita === */
.novita-info { padding: 10px 12px; }
.novita-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.novita-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.novita-price { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.store-badge {
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; padding: 2px 8px; border-radius: 10px; color: #fff;
}
.store-zara { background: #1a1a1a; }
.store-hm { background: #cc0000; }
.store-mango { background: #b8860b; }
.store-zalando { background: #ff6900; }
.store-manual { background: #888; }
.section-badge {
    font-size: 10px; padding: 2px 8px; border-radius: 10px;
    background: #f0ebe5; color: #888;
}
.bookmark-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px; margin-bottom: 16px;
    background: #f5e6ee; border-radius: 12px;
    font-size: 14px; font-weight: 500; color: #8b5a6b;
}
.toggle-label { font-size: 13px; display: flex; align-items: center; gap: 6px; cursor: pointer; color: #555; }
.toggle-label input { accent-color: #d4a9b8; }

/* === Wishlist === */
.wishlist-info { padding: 10px 12px; }
.wishlist-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wishlist-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wishlist-price { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.wishlist-cat { font-size: 11px; color: #888; margin-top: 4px; }
.wishlist-notes { font-size: 11px; color: #aaa; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-trend { font-size: 11px; margin-top: 4px; font-weight: 500; }
.price-down { color: #16a34a; }
.price-up { color: #dc2626; }
.style-tag {
    font-size: 10px; padding: 2px 8px; border-radius: 10px;
    background: #f0ebe5; color: #888;
}
.style-tag.highlight { background: #f5e6ee; color: #8b5a6b; }
.style-tag.accent { background: #fef3c7; color: #92400e; }
.style-tag.searching { background: #e0f2fe; color: #0369a1; animation: pulse-search 1.5s ease-in-out infinite; }
@keyframes pulse-search { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* === Modal === */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4); z-index: 100;
    display: flex; align-items: center; justify-content: center;
}
.modal-content {
    background: #fff; border-radius: 16px; padding: 28px;
    width: 480px; max-width: 90vw; max-height: 85vh;
    overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-content h2 { font-size: 20px; font-weight: 600; margin-bottom: 20px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12px; font-weight: 500; color: #888; margin-bottom: 4px; }
.form-row-inline { display: flex; gap: 12px; margin-bottom: 14px; }
.form-row-inline > div { flex: 1; }
.form-row-inline label { display: block; font-size: 12px; font-weight: 500; color: #888; margin-bottom: 4px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* === Dashboard === */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.bar-chart { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-label { width: 140px; font-size: 13px; color: #555; text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; height: 22px; background: #f0ebe5; border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #d4a9b8, #e8b4c8); border-radius: 6px; transition: width 0.5s ease; }
.bar-value { width: 30px; font-size: 13px; font-weight: 500; color: #555; }
.color-palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 12px; }
.color-chip { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.color-swatch { width: 48px; height: 48px; border-radius: 50%; border: 2px solid #e8e4df; }
.color-name { font-size: 11px; color: #888; }
.color-count { font-size: 12px; font-weight: 600; color: #555; }
.style-profile-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.style-formula { margin-top: 16px; }
.formula-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.formula-step { padding: 8px 16px; background: #f5f2ef; border-radius: 8px; font-size: 13px; font-weight: 500; }
.formula-arrow { color: #ccc; font-size: 18px; }
.gap-list { display: flex; flex-direction: column; gap: 8px; }
.gap-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; }
.gap-item.urgent { background: #fef2f2; }
.gap-item.medium { background: #fefce8; }
.gap-item.low { background: #f0fdf4; }
.card-subtitle { color: #888; font-size: 13px; margin-bottom: 16px; margin-top: -8px; }

/* === Guardaroba === */
.garments-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.garment-card { background: #fff; border-radius: 12px; overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.garment-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }
.garment-card .garment-img-container { aspect-ratio: 1; }
.garment-card img { width: 100%; height: 100%; object-fit: contain; }
.garment-info { padding: 10px 12px; }
.garment-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.garment-details { font-size: 11px; color: #888; display: flex; align-items: center; gap: 4px; }
.color-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid #ddd; flex-shrink: 0; }
.garment-category { font-size: 11px; color: #aaa; margin-top: 4px; }
.filter-input { padding: 8px 14px; border-radius: 8px; border: 1px solid #e0dbd5; background: #fff; font-size: 13px; font-family: inherit; color: #2d2d2d; width: 200px; }

/* === Profilo === */
.dual-personality { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; }
.personality-side { padding: 20px; border-radius: 12px; text-align: center; }
.personality-side.understated { background: #f5f2ef; }
.personality-side.expressive { background: #f5e6ee; }
.personality-side h3 { margin-bottom: 6px; }
.personality-side p { font-size: 13px; color: #666; }
.personality-colors { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.p-color { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.personality-divider { font-size: 16px; color: #ccc; font-weight: 300; }
.rules-list { display: flex; flex-direction: column; gap: 6px; }
.rule { padding: 8px 14px; background: #f5f2ef; border-radius: 6px; font-size: 13px; border-left: 3px solid #d4a9b8; }
.avoid-list { display: flex; flex-direction: column; gap: 6px; }
.avoid-item { padding: 8px 14px; background: #fef8f8; border-radius: 6px; font-size: 13px; border-left: 3px solid #e0a0a0; }
.materials-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.material-group { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.material-group h3 { width: 100%; margin-bottom: 10px; }
.material-tag { padding: 5px 12px; background: #f0fdf4; border-radius: 16px; font-size: 12px; color: #3a6b3a; }
.material-tag.banned { background: #fef2f2; color: #8b3a3a; }
.brands-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.brand-group { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.brand-group h3 { width: 100%; margin-bottom: 8px; }
.brand-tag { padding: 5px 12px; background: #f5f2ef; border-radius: 16px; font-size: 12px; color: #555; }
.brand-tag.aspirational { background: #f5e6ee; color: #8b5a6b; }
.influences-list { display: flex; flex-direction: column; gap: 8px; }
.influence-tag { padding: 8px 14px; background: #f5f2ef; border-radius: 8px; font-size: 13px; }

/* === Drop Zone === */
.drop-zone {
    background: #fff;
    border: 2px dashed #d4cfc8;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 20px;
}
.drop-zone.dragover {
    border-color: #8b6f5e;
    background: #faf6f2;
    transform: scale(1.01);
}
.drop-zone-content { pointer-events: none; }
.drop-icon { font-size: 48px; display: block; margin-bottom: 8px; }
.drop-text { font-size: 15px; font-weight: 500; color: #2d2d2d; margin-bottom: 4px; }
.drop-subtext { font-size: 13px; color: #888; }
.drop-hint { font-size: 12px; color: #aaa; margin-top: 8px; }
.drop-subtext .drop-link { color: #8b6f5e; cursor: pointer; text-decoration: underline; pointer-events: all; }
.drop-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}
.drop-preview:empty { margin-top: 0; }
.drop-thumb {
    position: relative;
    width: 100px;
    height: 130px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.drop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.drop-thumb .thumb-status {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px;
    font-size: 11px;
    text-align: center;
    background: rgba(0,0,0,0.6);
    color: #fff;
}
.drop-thumb .thumb-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 12px;
    line-height: 20px;
}
.drop-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}

/* === Card Placeholder === */
.card-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 160px;
    background: #f5f2ef;
    border-radius: 12px 12px 0 0;
    gap: 6px;
}
.placeholder-icon { font-size: 36px; opacity: 0.5; }
.placeholder-text { font-size: 12px; color: #aaa; }

/* === Mobile === */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .content { margin-left: 0; padding: 16px; }
    .stats-grid { grid-template-columns: 1fr; }
    .inspo-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .garments-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .dual-personality { grid-template-columns: 1fr; }
    .personality-divider { text-align: center; }
    .materials-grid { grid-template-columns: 1fr; }
    .brands-grid { grid-template-columns: 1fr; }
}
