/* style.css */
/* Tema di DEFAULT: bianco panna tenue (chiaro) */
:root, [data-theme="light"] {
    /* Backgrounds */
    --bg-color: #faf7f0;
    --bg-deep: #f4efe1;
    --bg-surface: #f7f3ea;
    --bg-panel: #fffdf8;
    --card-bg: rgba(255, 253, 248, 0.92);

    /* Text */
    --text-color: #2b2b2b;
    --text-muted: #6b7280;
    --text-dim: #8a8f98;
    --text-inverse: #ffffff;

    /* Borders */
    --glass-border: rgba(0, 0, 0, 0.08);
    --border-solid: #e6e0d2;

    /* Accents */
    --accent-color: #0969da;
    --accent-primary: #0284c7;
    --accent-success: #2da44e;
    --accent-danger: #cf222e;
    --accent-warning: #b08800;

    /* Layout */
    --nav-height: 70px;
}

[data-theme="dark"] {
    /* Backgrounds */
    --bg-color: #0d1117;
    --bg-deep: #05070f;
    --bg-surface: #0b0f1e;
    --bg-panel: #161b22;
    --card-bg: rgba(255, 255, 255, 0.05);

    /* Text */
    --text-color: #f0f6fc;
    --text-muted: #8b949e;
    --text-dim: #7a8fa6;
    --text-inverse: #000000;

    /* Borders */
    --glass-border: rgba(255, 255, 255, 0.1);
    --border-solid: #30363d;

    /* Accents */
    --accent-color: #58a6ff;
    --accent-primary: #4fc3f7;
    --accent-success: #3fb950;
    --accent-danger: #f85149;
    --accent-warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'DM Sans', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Auth Page Layout */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top right, #fffdf8, #f1ebdd);
}

.glass-container {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.12);
    animation: fadeIn 0.6s ease-out;
}

h1 {
    margin-bottom: 25px;
    font-weight: 600;
}

.input-group {
    margin-bottom: 15px;
}

input {
    width: 100%;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 16px;
    transition: all 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.04);
}

.btn-primary {
    background: var(--accent-color);
    color: #f0f6fc;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s, opacity 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--glass-border);
}

.notification {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(46, 160, 67, 0.1);
    color: #3fb950;
    font-size: 14px;
}

.notification.error {
    background: rgba(248, 81, 73, 0.1);
    color: #f85149;
}

.footer-text {
    margin-top: 20px;
    font-size: 14px;
    color: #8b949e;
}

.footer-text a {
    color: var(--accent-color);
    text-decoration: none;
}

/* Navbar */
.navbar {
    min-height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-item {
    color: var(--text-color);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
}

.nav-item:hover {
    color: var(--accent-color);
    background: rgba(88, 166, 255, 0.05);
    border-color: rgba(88, 166, 255, 0.2);
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    padding: 100px 5%;
    display: flex;
    justify-content: center;
    text-align: center;
}

.accent {
    color: var(--accent-color);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    color: #8b949e;
    margin-bottom: 40px;
}

.status-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    border-radius: 50px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.active .status-dot { background: #3fb950; box-shadow: 0 0 10px #3fb950; }
.inactive .status-dot { background: #f85149; box-shadow: 0 0 10px #f85149; }

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

/* Forza sfondo chiaro (bianco panna) per Gestione Progetti */
body.swegon-theme { background-color: #faf7f0 !important; color: #333 !important; }
.swegon-theme .card { background-color: #fffdf8 !important; color: #333 !important; border: 1px solid #ece6d8; }

/* Forza colori scuri per le tab/sotto-navbar Bootstrap, MA non per la navbar globale (.main-navbar) */
.swegon-theme .nav-link:not(.main-navbar .nav-link) { color: #333 !important; }
.swegon-theme .nav-link.active:not(.main-navbar .nav-link) { color: #0d6efd !important; background-color: #fff !important; border-color: #dee2e6 #dee2e6 #fff !important; }
