/* RESET BASE */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: system-ui, sans-serif;
    background: #0f172a;
    color: #e5e7eb;
    margin: 0;
    padding-top: 70px; /* spazio per navbar */
}

/* BOX GENERICO */
.box, .login-box, .admin-box {
    text-align: center;
    padding: 20px;
}

h1, h2, h3 {
    margin-bottom: .5rem;
}

/* NAVBAR MODERNA FISSA */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    height: 70px;
    background: rgba(255,255,255,0.95);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    backdrop-filter: blur(5px);
}

.navbar .logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: #0f172a;
    text-decoration: none;
}

.navbar .menu {
    display: flex;
    gap: 30px;
}

.navbar .menu a {
    position: relative;
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.navbar .menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: #38bdf8;
    transition: width 0.3s;
}

.navbar .menu a:hover::after {
    width: 100%;
}

.navbar .menu a:hover {
    color: #38bdf8;
}

/* LOGIN / ADMIN BOX */
.login-box, .admin-box {
    background: #1e293b;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    margin: 80px auto;
    color: #e5e7eb;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.login-box input, .admin-box input, .admin-box select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 6px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #e5e7eb;
}

.login-box input[type="submit"], .admin-box input[type="submit"], .admin-box button {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border-radius: 6px;
    border: none;
    background: #38bdf8;
    color: #020617;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.login-box input[type="submit"]:hover,
.admin-box input[type="submit"]:hover,
.admin-box button:hover {
    background: #0ea5e9;
}

/* USER TABLE */
.admin-box table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-box table th, .admin-box table td {
    padding: 10px;
    border: 1px solid #334155;
    text-align: left;
}

.admin-box table th {
    background: #0f172a;
}

.admin-box table td {
    background: #1e293b;
}

.admin-box a.edit, .admin-box a.delete {
    color: #38bdf8;
    text-decoration: none;
}

.admin-box a.edit:hover, .admin-box a.delete:hover {
    text-decoration: underline;
}

/* Responsive semplice */
@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 10px 15px;
    }
    .navbar .menu {
        flex-direction: column;
        gap: 10px;
        margin-top: 5px;
        width: 100%;
    }
    .navbar .menu a {
        text-align: center;
    }
}
/* BOX DASHBOARD / CHANGE PASSWORD */
.box {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    color: #e5e7eb;
    text-align: center;
}

.box h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #38bdf8;
}

.box input[type="password"], .box input[type="submit"] {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #e5e7eb;
    font-size: 1rem;
}

.box input[type="submit"] {
    background: #38bdf8;
    color: #020617;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.box input[type="submit"]:hover {
    background: #0ea5e9;
}

.box p a {
    color: #38bdf8;
    text-decoration: none;
}

.box p a:hover {
    text-decoration: underline;
}
