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

:root {
    --primary: #e65c00; /* Laranja Junino */
    --primary-light: #ff9e4f;
    --primary-dark: #b33600;
    --secondary: #f5af19; /* Amarelo Quente */
    --accent: #d32f2f; /* Vermelho Terracota */
    --bg-main: #fcf8f2; /* Creme Claro Festivo */
    --bg-card: #ffffff;
    --text-main: #2b1f1d; /* Castanho Escuro */
    --text-muted: #6e5e5b;
    --border-color: #ebdcd7;
    --shadow-soft: 0 8px 30px rgba(230, 92, 0, 0.06);
    --shadow-hover: 0 14px 40px rgba(230, 92, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s 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', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    padding-bottom: 80px; /* Espaço para menu fixo em mobile */
}

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

/* Header Temático */
.app-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 24px 16px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 4px 20px rgba(230, 92, 0, 0.15);
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

/* Efeito de bandeirinhas estilizadas */
.app-header::after {
    content: "▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲";
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--bg-main);
    opacity: 0.9;
    text-shadow: 0 -2px 4px rgba(0,0,0,0.05);
}

.app-logo {
    font-size: 28px;
    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: 1px 1px 2px rgba(0,0,0,0.15);
}

.app-subtitle {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
}

/* Cards de Ingredientes */
.ingredient-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.ingredient-card:active, .ingredient-card:focus-within {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.ingredient-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.ingredient-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

.ingredient-badge {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--primary-dark);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

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

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

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

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

.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.2) 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 20px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    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:active {
    background-color: var(--primary-dark);
}

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

.btn-secondary:active {
    background-color: var(--border-color);
}

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

.btn-outline:active {
    background-color: rgba(230, 92, 0, 0.05);
}

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

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

.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: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Á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(-10px); }
    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: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 15px;
    color: var(--text-main);
    background-color: #faf8f7;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
}

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

.input-suffix {
    position: absolute;
    right: 12px;
    font-size: 14px;
    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.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    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.03);
}

.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: 25%;
    height: 100%;
    transition: var(--transition);
    gap: 2px;
}

.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: 30px 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 20px 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: #4285f4;
    border: 1px solid #dadce0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.btn-google:active {
    background-color: #f8f9fa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}

/* Minhas Doações List */
.my-donation-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
}

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

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

.admin-tab {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    font-size: 14px;
    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.05);
}

.admin-panel {
    display: none;
}

.admin-panel.active {
    display: block;
    animation: fadeIn 0.3s 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);
}

.donation-row-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* User Info Badge */
.user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    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;
}
