/* Estilo geral - Cardápio */
:root {
    --primary: #e67e22;
    --primary-dark: #d35400;
    --secondary: #2c3e50;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #333;
    --muted: #6c757d;
    --success: #27ae60;
    --danger: #e74c3c;
    --border: #dee2e6;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--secondary), #1a252f);
    color: white;
    padding: 1.2rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--primary);
}

.header-actions a {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.header-actions a:hover {
    background: var(--primary-dark);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Títulos de seção */
.section-title {
    font-size: 1.8rem;
    color: var(--secondary);
    margin: 2.5rem 0 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

.section-title:first-of-type {
    margin-top: 0.5rem;
}

/* Grid de produtos */
.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.produto-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.produto-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.produto-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #eee;
}

.produto-img-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #f0f0f0, #ddd);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 3rem;
}

.produto-body {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.produto-nome {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--secondary);
}

.produto-desc {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.8rem;
    flex: 1;
}

.produto-preco {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.empty-msg {
    color: var(--muted);
    font-style: italic;
    padding: 1rem 0;
}

/* ===== ADMIN ===== */
.admin-body {
    background: #f0f2f5;
}

.admin-header {
    background: var(--secondary);
    color: white;
    padding: 1rem 0;
}

.admin-header .header-inner {
    max-width: 1100px;
}

.admin-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.admin-nav a, .admin-nav span {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
}

.admin-nav a:hover {
    color: white;
}

.admin-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

.card h2 {
    margin-bottom: 1.2rem;
    color: var(--secondary);
    font-size: 1.4rem;
}

/* Formulários */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--secondary);
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

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

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

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

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
}

/* Alertas */
.alert {
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Tabela admin */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.9rem;
}

td img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

/* Login page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c3e50, #1a252f);
    padding: 1.5rem;
}

.login-box {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 0.3rem;
    color: var(--secondary);
}

.login-box .subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.login-box .btn {
    width: 100%;
    margin-top: 0.5rem;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--primary);
}

/* Preview da imagem no formulário */
.img-preview {
    max-width: 200px;
    max-height: 150px;
    margin-top: 0.8rem;
    border-radius: 8px;
    display: none;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 2rem;
}

/* Responsivo */
@media (max-width: 600px) {
    .produtos-grid {
        grid-template-columns: 1fr;
    }
    .header-inner {
        flex-direction: column;
        gap: 0.8rem;
    }
    .section-title {
        font-size: 1.4rem;
    }
}
