/* --------------------------------------------------
   RESET
-------------------------------------------------- */
html, body {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f5f5f7;
    color: #333;
    display: flex;
    flex-direction: column;
}

a {
    color: #007aff;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------
   CONTAINER
-------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    flex: 1;
}

/* --------------------------------------------------
   TOPBAR – stile Mac
-------------------------------------------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: 78px;
    background: #0060d4;
    border-bottom: 1px solid rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    box-sizing: border-box;
}

/* --------------------------------------------------
   LOGO RS A TUTTA ALTEZZA
-------------------------------------------------- */
.topbar-brand {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.topbar-logo {
    height: 100px;
    margin-bottom: -22px;
    margin-top: -10px;
    opacity: 0.95;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25));
}

.topbar-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
    margin-bottom: 4px;
}

.topbar-title {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.topbar-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
}

/* --------------------------------------------------
   BUTTONS
-------------------------------------------------- */
.btn, .btn-small, .btn-secondary, .admin-button {
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.btn {
    background: #0060d4;
    color: white;
}
.btn:hover {
    background: #006be6;
}

.btn-small {
    background: #e5e5ea;
    color: #333;
}
.btn-small:hover {
    background: #d5d5da;
}

.btn-secondary {
    background: rgba(255,255,255,0.22);
    color: white;
    border: 1px solid rgba(255,255,255,0.35);
    backdrop-filter: blur(6px);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.32);
    border-color: rgba(255,255,255,0.45);
}

/* --------------------------------------------------
   ADMIN BUTTON
-------------------------------------------------- */
.admin-button {
    background: rgba(255,255,255,0.28);
    border: 1px solid rgba(255,255,255,0.35);
    color: white;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(6px);
}
.admin-button:hover {
    background: rgba(255,255,255,0.38);
    border-color: rgba(255,255,255,0.45);
}

.admin-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    min-width: 180px;
    display: none;
    overflow: hidden;
}
.admin-menu:hover .admin-dropdown {
    display: block;
}

.admin-dropdown a {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    color: #333;
}
.admin-dropdown a:hover {
    background: #f2f2f2;
}

/* --------------------------------------------------
   TABLE (macOS Sonoma)
-------------------------------------------------- */
.tabella-mac {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    overflow: hidden;
}

.tabella-mac th {
    text-align: center;
    font-weight: 600;
    padding: 8px 12px;
    background: rgba(245,245,245,0.85);
    border-bottom: 1px solid rgba(0,0,0,0.10);
    font-size: 13px;
}

.tabella-mac td {
    text-align: center;
    padding: 6px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    height: 32px;
}

.tabella-mac tr:hover td {
    background: rgba(0,0,0,0.04);
}

.tabella-mac td:first-child,
.tabella-mac th:first-child {
    text-align: left !important;
}

/* --------------------------------------------------
   FOOTER BAR
-------------------------------------------------- */
.footer-bar {
    width: 100%;
    height: 40px;
    background: #0060d4;
    border-top: 1px solid rgba(0,0,0,0.15);
    margin-top: 40px;
}

/* --------------------------------------------------
   FORM SONOMA
-------------------------------------------------- */
.form-card {
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    background: rgba(255, 255, 255, 0.65);
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    padding: 35px 40px;
    max-width: 650px;
    margin-top: 25px;
}

.form-sonoma {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-sonoma label {
    font-size: 13px;
    font-weight: 500;
    color: #444;
    letter-spacing: 0.2px;
}

.form-sonoma input,
.form-sonoma select {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.18);
    background: rgba(255,255,255,0.75);
    font-size: 15px;
    transition: all 0.18s ease;
}

.form-sonoma input:focus,
.form-sonoma select:focus {
    outline: none;
    border-color: #0A84FF;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(10,132,255,0.25);
}

/* --------------------------------------------------
   SONOMA COMPACT MODE
-------------------------------------------------- */
.form-card {
    padding: 22px 26px;
    border-radius: 14px;
    box-shadow: 0 8px 26px rgba(0,0,0,0.08);
    max-width: 600px;
}

.form-sonoma {
    gap: 14px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-row input,
.form-row select {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
}

.form-row input:focus,
.form-row select:focus {
    box-shadow: 0 0 0 3px rgba(10,132,255,0.22);
}

/* --------------------------------------------------
   LOGIN PAGE SONOMA
-------------------------------------------------- */
.login-page {
    background: #f5f5f7;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-card {
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    background: rgba(255, 255, 255, 0.65);
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    padding: 35px 40px;
    width: 360px;
}

.login-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1c1c1e;
}

.login-error {
    background: #ff3b30;
    color: white;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    text-align: center;
}

.login-form .form-row {
    margin-bottom: 14px;
}

.login-form input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.18);
    background: rgba(255,255,255,0.75);
    font-size: 15px;
}

.login-form input:focus {
    outline: none;
    border-color: #0A84FF;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(10,132,255,0.25);
}

/* --------------------------------------------------
   LOGIN BANNER CON LOGO RS
-------------------------------------------------- */
.login-banner {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.login-banner img {
    height: 120px;
    opacity: 0.95;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25));
}

