/* =========================
   CORE & RESET
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #0f172a;
    color: #e5e7eb;
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================
   NAVBAR (RE-DESIGNED)
========================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    z-index: 2000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: color 0.3s;
}

.logo:hover { color: #38bdf8; }

.menu { display: flex; gap: 25px; }

.menu a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.menu a:hover, .menu a.active { color: #38bdf8; }

/* Effetto underline desktop */
.menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #38bdf8;
    transition: width 0.3s ease;
}
.menu a:hover::after, .menu a.active::after { width: 100%; }

/* MOBILE MENU LOGIC */
.menu-toggle { display: none; }
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 6px; }
.hamburger span { width: 25px; height: 3px; background: #fff; border-radius: 2px; transition: 0.3s; }

/* =========================
   LAYOUT UTILS
========================= */
.page-content {
    padding-top: 100px;
    padding-bottom: 40px;
    min-height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.box, .login-box, .admin-box {
    background: #1e293b;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

h1 { font-size: 2.2rem; margin-bottom: 15px; color: #fff; }
p { color: #94a3b8; margin-bottom: 20px; }

/* FORMS & BUTTONS */
input[type="text"], input[type="password"], select {
    width: 100%;
    padding: 12px 16px;
    margin: 10px 0;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #fff;
}

input[type="submit"], button {
    background: #38bdf8;
    color: #0f172a;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    
    .menu {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #1e293b;
        flex-direction: column;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    .menu-toggle:checked ~ .menu {
        max-height: 600px;
        padding: 20px 0;
        border-bottom: 1px solid #334155;
    }

    .menu a { width: 100%; text-align: center; padding: 15px; }
    .menu a::after { display: none; }

    /* Hamburger Animation */
    .menu-toggle:checked + .hamburger span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
    .menu-toggle:checked + .hamburger span:nth-child(2) { opacity: 0; }
    .menu-toggle:checked + .hamburger span:nth-child(3) { transform: rotate(-45deg) translate(6px, -7px); }
}