/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    color: #1a1a1a;
    background-color: #f4f4f4;
}

a {
    color: #F26522;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #d4541a;
}

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #1a1a1a;
}

.login-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: #fff;
    border-radius: 10px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #F26522;
}

.login-logo h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.login-logo p {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

.login-logo .still-bar {
    width: 48px;
    height: 4px;
    background: #F26522;
    margin: 8px auto 0;
    border-radius: 2px;
}

/* =============================================
   FORM ELEMENTS
   ============================================= */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #1a1a1a;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #F26522;
    box-shadow: 0 0 0 3px rgba(242,101,34,0.1);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-login {
    width: 100%;
    padding: 11px;
    margin-top: 1.2rem;
    background: #F26522;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: background 0.2s;
}

.btn-login:hover {
    background: #d4541a;
}

.btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: #F26522;
    color: #fff;
    border-color: #F26522;
}

.btn-primary:hover {
    background: #d4541a;
    text-decoration: none;
    color: #fff;
}

.btn-secondary {
    background: #fff;
    color: #333;
    border-color: #ccc;
}

.btn-secondary:hover {
    background: #f5f5f5;
    text-decoration: none;
}

.btn-danger {
    background: #cc0000;
    color: #fff;
    border-color: #cc0000;
}

.btn-danger:hover {
    background: #990000;
    text-decoration: none;
    color: #fff;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 13px;
}

/* =============================================
   MESSAGGI ERRORE / SUCCESSO
   ============================================= */
.error-box {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    border-left: 4px solid #cc0000;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: #cc0000;
    margin-bottom: 1rem;
}

.success-box {
    background: #fff8f0;
    border: 1px solid #ffd4a8;
    border-left: 4px solid #F26522;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: #d4541a;
    margin-bottom: 1rem;
}

/* =============================================
   LAYOUT APP
   ============================================= */
.bo-wrapper {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.bo-sidebar {
    width: 250px;
    background: #1a1a1a;
    color: #ccc;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.bo-sidebar-header {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: #111;
}

.bo-sidebar-header h2 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.bo-sidebar-header .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.bo-sidebar-header .brand-bar {
    width: 4px;
    height: 32px;
    background: #F26522;
    border-radius: 2px;
}

.bo-sidebar-header p {
    font-size: 12px;
    color: #888;
    margin-top: 3px;
}

.bo-nav {
    flex: 1;
    padding: 1rem 0;
}

.bo-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 1.25rem;
    font-size: 14px;
    color: #bbb;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.bo-nav a:hover {
    background: rgba(242,101,34,0.1);
    color: #fff;
    text-decoration: none;
}

.bo-nav a.active {
    background: rgba(242,101,34,0.15);
    color: #F26522;
    border-left-color: #F26522;
}

.bo-nav .nav-section {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #444;
    padding: 1rem 1.25rem 0.4rem;
}

.bo-sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    font-size: 13px;
}

.bo-sidebar-footer a {
    color: #888;
    text-decoration: none;
}

.bo-sidebar-footer a:hover {
    color: #F26522;
}

/* CONTENUTO PRINCIPALE */
.bo-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bo-topbar {
    background: #fff;
    border-bottom: 3px solid #F26522;
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bo-topbar h1 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bo-topbar .topbar-user {
    font-size: 13px;
    color: #666;
}

.bo-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #f4f4f4;
}

/* =============================================
   TABELLE
   ============================================= */
.table-wrap {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.table-toolbar {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.table-toolbar input[type="text"] {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
    width: 220px;
    outline: none;
}

.table-toolbar input[type="text"]:focus {
    border-color: #F26522;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table thead th {
    background: #1a1a1a;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    border-bottom: 2px solid #F26522;
}

table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.1s;
}

table tbody tr:hover {
    background: #fff8f0;
}

table tbody td {
    padding: 10px 14px;
    color: #333;
}

table tbody tr:last-child {
    border-bottom: none;
}

/* =============================================
   BADGE STATO
   ============================================= */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #f0fff4;
    color: #0f6e56;
    border: 1px solid #9fe1cb;
}

.badge-danger {
    background: #fff0f0;
    color: #cc0000;
    border: 1px solid #ffcccc;
}

.badge-info {
    background: #fff8f0;
    color: #F26522;
    border: 1px solid #ffd4a8;
}

.badge-warning {
    background: #fffbe6;
    color: #b8860b;
    border: 1px solid #ffe58f;
}

/* =============================================
   FOOTER NOTE LOGIN
   ============================================= */
.footer-note {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 12px;
    color: #aaa;
}