/* style.css — Espressioni Popolari — CSS Condiviso */

:root {
    --brand-color: #d32f2f;
    --brand-dark: #b71c1c;
    --brand-yellow: #ffc107;
    --brand-green: #28a745;
    --brand-blue: #17a2b8;
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --bg-input: #2a2a2a;
    --text-light: #ffffff;
    --text-muted: #aaaaaa;
    --border-color: #333;
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* === RESET & BASE === */
* { box-sizing: border-box; }
body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

/* === NAVBAR === */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    background: rgba(0, 0, 0, 0.95); padding: 12px 30px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; border-bottom: 1px solid #222;
}
.nav-logo img { height: 45px; transition: transform 0.3s; }
.nav-logo:hover img { transform: scale(1.05); }
.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-link {
    font-family: 'Oswald', sans-serif; text-transform: uppercase; font-weight: bold;
    color: var(--text-light); font-size: 1.05rem; letter-spacing: 1px;
    transition: color 0.3s;
}
.nav-link:hover { color: var(--brand-yellow); }
.nav-link.active { color: var(--brand-yellow); }

/* === ADMIN NAV === */
.admin-nav {
    background: var(--bg-dark); padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
    color: white; border-bottom: 3px solid var(--brand-color);
    flex-wrap: wrap; gap: 10px;
}
.admin-nav h1 { margin: 0; font-size: 1.5rem; color: var(--brand-yellow); }
.admin-nav .nav-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-nav .nav-btns a {
    color: white; padding: 10px 18px; text-decoration: none;
    border-radius: 5px; font-weight: bold; font-size: 0.9rem;
    transition: opacity 0.2s;
}
.admin-nav .nav-btns a:hover { opacity: 0.85; }

/* === BUTTONS === */
.btn {
    display: inline-block; padding: 10px 20px; border: none;
    border-radius: 6px; font-weight: bold; cursor: pointer;
    text-decoration: none; font-size: 0.95rem; transition: all 0.3s;
    text-align: center; color: white;
}
.btn-primary { background: var(--brand-color); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-success { background: var(--brand-green); }
.btn-success:hover { background: #218838; }
.btn-info { background: var(--brand-blue); }
.btn-info:hover { background: #138496; }
.btn-warning { background: var(--brand-yellow); color: #000; }
.btn-danger { background: #dc3545; }
.btn-danger:hover { background: #c82333; }
.btn-secondary { background: #6c757d; }
.btn-secondary:hover { background: #5a6268; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-lg { padding: 14px 30px; font-size: 1.1rem; }
.btn-block { display: block; width: 100%; }
.btn-outline {
    background: transparent; border: 2px solid var(--brand-color);
    color: var(--brand-color);
}
.btn-outline:hover { background: var(--brand-color); color: white; }
.btn-hero {
    display: inline-block; background-color: var(--brand-color); color: white;
    padding: 15px 40px; border-radius: 30px; font-family: 'Oswald', sans-serif;
    font-weight: bold; text-transform: uppercase; font-size: 1.2rem;
    letter-spacing: 1px; transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
}
.btn-hero:hover { background-color: var(--brand-dark); transform: translateY(-2px); }

/* === CARDS === */
.card {
    background: var(--bg-card); border-radius: 12px; overflow: hidden;
    box-shadow: var(--shadow); transition: transform 0.3s;
    border: 1px solid var(--border-color);
}
.card:hover { transform: translateY(-3px); }
.card-body { padding: 20px; }

/* === ADMIN PAGES (sfondo chiaro) === */
body.admin-page {
    background: #f4f4f4;
    color: #333;
    padding-top: 0;
}
body.admin-page h1, body.admin-page h2, body.admin-page h3, body.admin-page h4 { color: #333; }
body.admin-page a { color: #333; }
body.admin-page label { color: #333; }
body.admin-page .form-group label { color: #333; }
body.admin-page .settings-card label { color: #333; }
body.admin-page .settings-card h3 { color: inherit; }

/* === FORMS (Admin) === */
.admin-container {
    max-width: 1200px; margin: 20px auto; background: white;
    padding: 25px; border-radius: 8px; box-shadow: 0 0 10px rgba(0,0,0,0.1);
    color: #333;
}
.admin-container h2, .admin-container h3, .admin-container h4 { color: #333; }
.admin-container label { color: #333; }
.admin-container a { color: #333; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; color: #333; }
.form-control {
    width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 5px;
    font-size: 15px; box-sizing: border-box; transition: border-color 0.3s;
}
.form-control:focus { outline: none; border-color: var(--brand-color); }

/* Dark form controls */
.form-control-dark {
    width: 100%; padding: 12px; background: var(--bg-input);
    border: 1px solid #444; border-radius: 6px; color: #fff;
    font-size: 16px; box-sizing: border-box; transition: border-color 0.3s;
}
.form-control-dark:focus { outline: none; border-color: var(--brand-color); }

/* === TABLES === */
.table {
    width: 100%; border-collapse: collapse; font-size: 0.95rem;
}
.table th, .table td {
    padding: 12px; border-bottom: 1px solid #ddd;
    text-align: left; vertical-align: middle;
}
.table th { background: #333; color: white; font-weight: 600; }
.table tbody tr:hover { background: #f8f8f8; }

/* === BADGES === */
.badge {
    display: inline-block; padding: 4px 10px; border-radius: 4px;
    font-size: 0.8rem; font-weight: bold; color: white;
}
.badge-success { background: var(--brand-green); }
.badge-warning { background: var(--brand-yellow); color: #000; }
.badge-danger { background: #dc3545; }
.badge-info { background: var(--brand-blue); }
.badge-secondary { background: #6c757d; }
.badge-dark { background: #333; }

/* === ALERTS === */
.alert {
    padding: 14px 18px; border-radius: 6px; margin-bottom: 15px;
    font-weight: 500; font-size: 0.95rem;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* === FOOTER === */
.footer {
    background: #000; padding: 50px 20px; text-align: center;
    margin-top: 60px; border-top: 1px solid #222;
}
.footer-logo { max-width: 150px; margin-bottom: 25px; }
.footer-info { color: var(--text-muted); line-height: 1.8; }
.footer-links { margin-top: 20px; display: flex; justify-content: center; gap: 20px; }
.footer-links a {
    color: var(--brand-yellow); font-weight: bold;
    font-family: 'Oswald', sans-serif; text-transform: uppercase; font-size: 1rem;
}
.footer-links a:hover { text-decoration: underline; }

/* === TOAST === */
.toast {
    position: fixed; top: 80px; right: 20px; background: var(--brand-green);
    color: white; padding: 12px 25px; border-radius: 8px; font-weight: bold;
    z-index: 2000; box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2s forwards;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-20px); } }

/* === GRID LAYOUTS === */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }

/* === STATS CARDS (Dashboard) === */
.stat-card {
    background: var(--bg-card); border-radius: 12px; padding: 25px;
    border-left: 4px solid var(--brand-color); text-align: center;
}
.stat-card .stat-value {
    font-family: 'Oswald', sans-serif; font-size: 2.5rem;
    font-weight: bold; color: var(--brand-yellow);
}
.stat-card .stat-label {
    font-size: 0.9rem; color: var(--text-muted);
    text-transform: uppercase; margin-top: 5px;
}
.stat-card.green { border-left-color: var(--brand-green); }
.stat-card.blue { border-left-color: var(--brand-blue); }
.stat-card.yellow { border-left-color: var(--brand-yellow); }

/* === TABS === */
.tabs { display: flex; border-bottom: 2px solid var(--border-color); margin-bottom: 20px; gap: 0; }
.tab {
    padding: 12px 25px; cursor: pointer; font-weight: 600;
    border-bottom: 3px solid transparent; transition: all 0.3s;
    color: var(--text-muted); font-size: 0.95rem;
}
.tab:hover { color: var(--text-light); }
.tab.active { color: var(--brand-yellow); border-bottom-color: var(--brand-yellow); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .nav-links { gap: 12px; }
    .nav-link { font-size: 0.85rem; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .admin-nav { flex-direction: column; align-items: flex-start; }
    .admin-nav .nav-btns { width: 100%; }
}
@media (max-width: 480px) {
    .navbar { padding: 10px 15px; }
    .nav-links { gap: 8px; }
    .nav-link { font-size: 0.8rem; }
}
