/* =============================================
   Catálogo - Inventário Doméstico
   Premium Dark Theme Stylesheet
   ============================================= */

:root {
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.6);
    --border-glass: rgba(51, 65, 85, 0.5);
    --accent-amber: #f59e0b;
    --accent-amber-light: #fbbf24;
    --accent-amber-dark: #d97706;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}

/* ---- Base Typography ---- */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

h1, h2, h3 {
    font-family: 'Outfit', 'Inter', sans-serif;
}

/* ---- Animations ---- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes pulse-amber {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ---- Glassmorphism ---- */
.glass {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(51, 65, 85, 0.5);
}

.glass-strong {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(51, 65, 85, 0.6);
}

/* ---- Card Hover ---- */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ---- Skeleton Loading ---- */
.skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

/* ---- FAB ---- */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 30;
    animation: pulse-amber 2s infinite;
}

.fab:hover {
    animation: none;
    transform: scale(1.1);
}

/* ---- Summary Bar ---- */
.summary-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
}

/* ---- Toast ---- */
.toast-enter {
    animation: slideInRight 0.3s ease-out;
}

.toast-exit {
    animation: slideOutRight 0.3s ease-out forwards;
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #334155 #0f172a;
}

/* ---- Input Focus ---- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-amber) !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* ---- Button Active State ---- */
button:active:not(:disabled) {
    transform: scale(0.97);
}

/* ---- Gradient Text ---- */
.gradient-text-amber {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Tab Indicator ---- */
.tab-active {
    color: #fbbf24;
    border-bottom: 2px solid #f59e0b;
    font-weight: 600;
}

.tab-inactive {
    color: #94a3b8;
    border-bottom: 2px solid transparent;
}

.tab-inactive:hover {
    color: #ffffff;
}

/* ---- Photo Placeholder ---- */
.photo-placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Checkbox Custom ---- */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #475569;
    border-radius: 0.375rem;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.custom-checkbox:checked {
    background: #f59e0b;
    border-color: #f59e0b;
}

.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox:hover {
    border-color: #f59e0b;
}

/* ---- Toggle Switch ---- */
.toggle-btn {
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.5);
}

/* ---- Responsive fixes ---- */
@media (max-width: 640px) {
    .fab {
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .summary-bar {
        padding: 0.75rem;
    }
}

/* ---- Badge Pulse ---- */
.badge-pulse {
    position: relative;
}

.badge-pulse::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #f59e0b;
    border-radius: 50%;
    animation: pulse-amber 2s infinite;
}

/* ---- Image Upload Preview ---- */
.upload-area {
    border: 2px dashed #475569;
    border-radius: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.upload-area.has-preview {
    border-style: solid;
    border-color: rgba(245, 158, 11, 0.3);
}
