* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', system-ui, sans-serif; }

.loading-spinner {
    width: 36px; height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: #F8D37C;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.animate-slide-in { animation: slideIn 0.25s ease-out; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.2s ease-out; }

.sidebar-link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.5rem 1rem; border-radius: 0.5rem;
    font-size: 0.875rem; font-weight: 500;
    transition: all 0.15s;
    color: #9ca3af; text-decoration: none;
}
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.sidebar-link.active { color: #F8D37C; background: rgba(248,211,124,0.1); }

.card {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}
.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.status-badge {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.25rem 0.75rem; border-radius: 9999px;
    font-size: 0.75rem; font-weight: 600;
}
.status-new { background: #dbeafe; color: #1d4ed8; }
.status-contacted { background: #fef3c7; color: #b45309; }
.status-accepted, .status-won { background: #d1fae5; color: #047857; }
.status-rejected, .status-lost { background: #fee2e2; color: #b91c1c; }
.status-pending { background: #fef3c7; color: #b45309; }
.status-proposal { background: #ede9fe; color: #6d28d9; }
.status-draft { background: #ffedd5; color: #c2410c; }

.btn-primary {
    background: #F8D37C; color: #1A1A1A;
    font-weight: 600; padding: 0.5rem 1rem;
    border-radius: 0.5rem; border: none; cursor: pointer;
    font-size: 0.875rem; transition: all 0.15s;
    display: inline-flex; align-items: center; gap: 0.375rem;
}
.btn-primary:hover { background: #e5c36e; }
.btn-secondary {
    background: #f3f4f6; color: #374151;
    font-weight: 600; padding: 0.5rem 1rem;
    border-radius: 0.5rem; border: none; cursor: pointer;
    font-size: 0.875rem; transition: all 0.15s;
    display: inline-flex; align-items: center; gap: 0.375rem;
}
.btn-secondary:hover { background: #e5e7eb; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8rem; }
.btn-danger {
    background: #fee2e2; color: #b91c1c;
    font-weight: 600; padding: 0.5rem 1rem;
    border-radius: 0.5rem; border: none; cursor: pointer;
    font-size: 0.875rem; transition: all 0.15s;
    display: inline-flex; align-items: center; gap: 0.375rem;
}
.btn-danger:hover { background: #fecaca; }

.detail-row {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 0.75rem 0; border-bottom: 1px solid #f9fafb;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { font-size: 0.875rem; color: #6b7280; min-width: 140px; flex-shrink: 0; }
.detail-value { font-size: 0.875rem; color: #1f2937; font-weight: 500; text-align: right; }

.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.svc-item {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.6rem 0.8rem; border: 1px solid #e5e7eb;
    border-radius: 10px; cursor: pointer; transition: all 0.15s;
    user-select: none; background: #fff; font-size: 0.82rem;
}
.svc-item:hover { border-color: #C9A962; background: #FFFDF5; }
.svc-item.active { border-color: #F8D37C; background: #FEF9EE; }
.svc-item input { display: none; }
.svc-ico {
    width: 28px; height: 28px; min-width: 28px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    background: #f3f4f6; transition: background 0.15s;
}
.svc-item.active .svc-ico { background: rgba(248,211,124,0.2); }
.svc-ico svg { width: 15px; height: 15px; stroke: #9ca3af; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svc-item.active .svc-ico svg { stroke: #C9A962; }
.svc-chk {
    margin-left: auto; width: 18px; height: 18px; min-width: 18px;
    border-radius: 5px; border: 2px solid #d1d5db;
    display: flex; align-items: center; justify-content: center;
}
.svc-item.active .svc-chk { border-color: #C9A962; background: #C9A962; }
.svc-item.active .svc-chk svg { opacity: 1; }
.svc-chk svg { width: 12px; height: 12px; stroke: #fff; fill: none; stroke-width: 3; opacity: 0; }

.toast {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 100;
    padding: 0.75rem 1.25rem; border-radius: 0.75rem;
    font-size: 0.875rem; font-weight: 500; color: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    animation: fadeIn 0.2s ease-out;
}
.toast-success { background: #22c55e; }
.toast-error { background: #ef4444; }

input:focus, textarea:focus, select:focus {
    outline: none; ring: 2px; border-color: #F8D37C;
    box-shadow: 0 0 0 2px rgba(248,211,124,0.3);
}

@media (max-width: 1024px) {
    .sidebar-desktop { display: none; }
    .main-content { margin-left: 0 !important; }
}
