@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #2563eb; /* Azul Royal / Missão */
    --primary-light: #60a5fa;
    --primary-dark: #1d4ed8;
    --secondary: #3b82f6; 
    --accent: #dc2626; /* Vermelho alerta */
    --accent-gold: #f59e0b; /* Dourado / Ênfase */
    --bg-main: #f8fafc; /* Slate Claro Limpo */
    --bg-card: #ffffff;
    --text-main: #0f172a; /* Slate Escuro */
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-soft: 0 4px 20px rgba(37, 99, 235, 0.06);
    --shadow-hover: 0 10px 30px rgba(37, 99, 235, 0.12);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    padding-bottom: 85px; /* Espaço para menu fixo em mobile */
}

/* Container Responsivo para Mobile */
.app-container {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    padding: 16px;
}

/* Header Temático Bota-Fora */
.app-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #38bdf8 100%);
    color: white;
    padding: 26px 20px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.app-header::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.app-logo {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.app-logo span {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.app-subtitle {
    font-size: 13px;
    opacity: 0.92;
    font-weight: 400;
    line-height: 1.4;
    max-width: 380px;
    margin: 0 auto;
}

/* Barra de Filtro de Categorias */
.category-filter-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.category-filter-bar::-webkit-scrollbar {
    display: none;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}

.category-chip:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.category-chip.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* Cards de Itens */
.item-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    position: relative;
}

.item-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: #cbd5e1;
}

.item-card.completed {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 40%);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 10px;
}

.item-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
}

.item-badge {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: var(--primary-dark);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.tag-pill {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tag-category {
    background-color: #f1f5f9;
    color: #475569;
}

.tag-size {
    background-color: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    font-weight: 600;
}

.item-description {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Barras de Progresso */
.progress-container {
    margin-bottom: 14px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.progress-bar-bg {
    background-color: #e2e8f0;
    height: 10px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar-fill.complete {
    background: linear-gradient(90deg, #10b981, #059669);
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Botões do Sistema */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover, .btn-primary:active {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover, .btn-secondary:active {
    background-color: #e2e8f0;
}

.btn-outline {
    background: transparent;
    border: 2px dashed var(--primary);
    color: var(--primary);
}

.btn-outline:active {
    background-color: rgba(37, 99, 235, 0.05);
}

.btn-danger {
    background-color: #fee2e2;
    color: var(--accent);
}

.btn-danger:active {
    background-color: #fecaca;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    width: auto;
}

/* Sessões / Alertas */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Área de Doação Expandida (Accordion) */
.donation-form-container {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-color);
    display: none;
}

.donation-form-container.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-main);
    background-color: #ffffff;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.input-suffix-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-suffix {
    position: absolute;
    right: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

/* Menu Inferior Fixo Mobile */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    width: 33.33%;
    height: 100%;
    transition: var(--transition);
    gap: 3px;
}

.nav-item.active {
    color: var(--primary);
    font-weight: 700;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Login Layout */
.login-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 26px 22px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 18px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.login-divider::before, .login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.login-divider span {
    padding: 0 10px;
}

/* Google Sign-In Button */
.btn-google {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.btn-google:hover, .btn-google:active {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

/* Minhas Doações List */
.my-donation-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.my-donation-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

/* Admin Dashboard Tab */
.admin-tab-container {
    display: flex;
    background-color: #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 20px;
}

.admin-tab {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.admin-tab.active {
    background-color: white;
    color: var(--primary-dark);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.admin-panel {
    display: none;
}

.admin-panel.active {
    display: block;
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.admin-item-row {
    background-color: white;
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-item-info h4 {
    font-size: 15px;
    font-weight: 600;
}

.admin-item-info p {
    font-size: 12px;
    color: var(--text-muted);
}

.admin-actions {
    display: flex;
    gap: 8px;
}

.donation-row {
    background-color: white;
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary);
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

/* User Info Badge */
.user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--primary);
}

.user-name {
    font-size: 14px;
    font-weight: 600;
}

.btn-logout-small {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Estatísticas Rápidas no Topo */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.stat-card {
    background: white;
    padding: 12px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}
