
/* =====================
   THEME VARIABLES
===================== */
:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --primary: #2563eb;
    --border: #e2e8f0;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --card: #1e293b;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --primary: #3b82f6;
    --border: #334155;
}

/* =====================
   LAYOUT
===================== */
.login-page {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
}

.login-container {
    display: flex;
    width: 100%;
}

/* LEFT */
.login-left {
    flex: 1;
    padding: 60px;
}

.login-left h1 {
    font-size: 40px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}

.login-left p {
    color: var(--muted);
    margin-bottom: 40px;
    max-width: 400px;
}

/* FEATURES */
.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.feature-card strong {
    display: block;
    color: var(--text);
}

.feature-card span {
    color: var(--muted);
    font-size: 14px;
}

/* RIGHT */
.login-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* BOX */
.login-box {
    background: var(--card);
    padding: 40px;
    border-radius: 16px;
    width: 400px;
    border: 1px solid var(--border);
}

.login-box h2 {
    margin-bottom: 5px;
}

.subtitle {
    color: var(--muted);
    margin-bottom: 25px;
}

/* FORM */
.login-form input {
    border-radius: 10px !important;
    padding: 12px;
    border: 1px solid var(--border);
}

.login-options {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 20px;
}

.login-options a {
    color: var(--primary);
    text-decoration: none;
}

/* BUTTON */
.btn-login {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    background: var(--primary);
    border: none;
}

/* DIVIDER */
.divider {
    text-align: center;
    margin: 20px 0;
    color: var(--muted);
}

/* SIGNUP */
.signup {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.signup a {
    color: var(--primary);
}

/* =====================
   NAVBAR
===================== */

.app-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.7);
    border-bottom: 1px solid var(--border);
}

/* dark mode */
[data-theme="dark"] .app-navbar {
    background: rgba(15, 23, 42, 0.7);
}

/* CONTAINER */
.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 30px;
}

/* BRAND */
.brand {
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    text-decoration: none;
}

/* MENU */
.nav-modern .nav-link {
    position: relative;

    font-size: 13px;        /* ⬆️ più grande */
    font-weight: 500;

    padding: 6px 8px;       /* ⬇️ meno padding */
    line-height: 1.2;

    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: var(--muted);
}

/* linea (invisibile di default) */
.nav-modern .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    height: 2px;                 /* ⬆️ più visibile */
    width: 0;              /* 🔥 QUESTO MANCA */
    border-radius: 2px;
    background: var(--primary);
    transition: width 0.25s ease;
}

.navbar-container i {
    font-size: 16px;  /* ⬆️ icone più grandi */
}

/* hover */
.nav-modern .nav-link:hover {
    color: var(--text);
}

.nav-modern .nav-link:hover::after {
    width: 100%;
}

/* ACTIVE (pagina corrente) */
.nav-modern .nav-link.active,
.nav-modern .active > .nav-link {
    color: var(--text);
}

.nav-modern .nav-link.active::after,
.nav-modern .active > .nav-link::after {
    width: 100%;
}

/* USER AREA */
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    font-weight: 500;
    font-size: 13px;        /* ⬆️ più grande */
    color: var(--text);
}

.btn-logout-icon {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    color: var(--muted);
    transition: all 0.2s ease;
}

.btn-logout-icon:hover {
    background: var(--card);
    color: var(--text);
}

/* MAIN FIX */
main {
    background: var(--bg) !important;
}

.app-navbar {
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.nav-modern {
    display: flex;
    gap: 25px;
}