:root {
    /* Login Page Specifics */
    --login-bg-overlay: rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);

    /* Brand Colors */
    --primary: #00773e;
    --primary-hover: #00992e;
    --secondary: #007bff;
    --secondary-hover: #0056b3;

    /* Backgrounds/Surfaces */
    --bg-gradient-start: #245018;
    --bg-gradient-end: #1a3a11;
    --surface-main: #ffffff;
    --surface-card: #ffffff;
    --surface-header: #ffffff;
    --surface-sidebar: #ffffff;
    --surface-subtle: #f9fafb;
    --surface-muted: #f0f2f5;

    /* Text Colors */
    --text-primary: #2d2d2d;
    --text-secondary: #6c757d;
    --text-on-primary: #ffffff;
    --heading-color: #222222;

    /* Borders & Dividers */
    --border-base: #e0e0e0;
    --border-subtle: #eeeeee;
    --hr-color: rgba(0, 0, 0, 0.1);

    /* Status Colors */
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;

    /* Specific Components */
    --chat-bubble-left-bg: #33af4e;
    --chat-bubble-left-text: #ffffff;
    --chat-bubble-right-bg: #f0f2f5;
    --chat-bubble-right-text: #2d2d2d;
    --header-shadow: rgba(0, 0, 0, 0.08);
    --sidebar-shadow: rgba(0, 0, 0, 0.15);
    --overlay-bg: rgba(0, 0, 0, 0.4);
    --nav-hover-bg: #f3f3f3;
    --success-subtle: #d4edda;
    --warning-subtle: #fff3cd;
    --danger-subtle: #f8d7da;
    --success-text: #155724;
    --warning-text: #856404;
    --danger-text: #721c24;
}

[data-theme='dark'] {
    /* Brand Colors */
    --primary: #33af4e;
    --primary-hover: #3fc75c;
    --secondary: #3793ff;
    --secondary-hover: #007bff;

    /* Backgrounds/Surfaces */
    --bg-gradient-start: #121212;
    --bg-gradient-end: #000000;
    --surface-main: #1e1e1e;
    --surface-card: #252525;
    --surface-header: #181818;
    --surface-sidebar: #181818;
    --surface-subtle: #2d2d2d;
    --surface-muted: #333333;

    /* Text Colors */
    --text-primary: #e0e0e0;
    --text-secondary: #adb5bd;
    --text-on-primary: #ffffff;
    --heading-color: #ffffff;

    /* Borders & Dividers */
    --border-base: #3d3d3d;
    --border-subtle: #333333;
    --hr-color: rgba(255, 255, 255, 0.1);

    /* Status Colors */
    --success: #1e7e34;
    --warning: #d39e00;
    --danger: #bd2130;
    --info: #117a8b;

    /* Specific Components */
    --chat-bubble-left-bg: #28a745;
    --chat-bubble-left-text: #ffffff;
    --chat-bubble-right-bg: #2d2d2d;
    --chat-bubble-right-text: #e0e0e0;
    --header-shadow: rgba(0, 0, 0, 0.5);
    --sidebar-shadow: rgba(0, 0, 0, 0.6);
    --overlay-bg: rgba(0, 0, 0, 0.7);
    --nav-hover-bg: #2d2d2d;
    --success-subtle: #c3e6cb;
    --warning-subtle: #ffeeba;
    --danger-subtle: #f5c6cb;
    --success-text: #155724;
    --warning-text: #856404;
    --danger-text: #721c24;
}

* {
    box-sizing: border-box;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

body {
    background: var(--bg-body, linear-gradient(to bottom, var(--bg-gradient-start), var(--bg-gradient-end)));
    min-height: 85vh;
    background-attachment: fixed;
    color: var(--text-primary);
}

.container {
    max-width: 100%;
    position: relative;
    margin: 90px 0px 0px 0px;
    background: var(--surface-main);
    border-radius: 6px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.procedure-container {
    background: var(--surface-main);
    padding: 25px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

h1 {
    text-align: center;
    margin-bottom: 25px;
    font-weight: bold;
    color: var(--heading-color);
}

h2 {
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    color: var(--heading-color);
}

.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ticket-table {
    width: 100%;
    border-collapse: collapse;
}

.ticket-table th {
    background: var(--surface-muted);
    text-align: left;
    padding: 12px;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid var(--border-base);
    color: var(--heading-color);
}

.ticket-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 14px;
    color: var(--text-primary);
}

.ticket-table tr:hover {
    background: var(--surface-subtle);
}

/* Priorità */
.badge {
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
}

/* Righe della tabella con background in base alla priorità */
.priority-alta {
    background-color: var(--danger-subtle);
    color: var(--danger-text);
}

.priority-media {
    background-color: var(--warning-subtle);
    color: var(--warning-text);
}

.priority-bassa {
    background-color: var(--success-subtle);
    color: var(--success-text);
}

.badge.bassa {
    background: var(--success);
    color: white;
}

.badge.media {
    background: var(--warning);
    color: #333;
}

.badge.alta {
    background: var(--danger);
    color: white;
}

/* Paginazione */
.pagination {
    margin-top: 20px;
    text-align: center;
}

.page-btn {
    display: inline-block;
    margin: 0 4px;
    padding: 8px 14px;
    background: var(--surface-muted);
    border-radius: 2px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.1s ease;
}

.page-btn:hover {
    background: var(--secondary);
    color: white;
}

.page-btn.active {
    background: var(--secondary);
    color: white;
    pointer-events: none;
}

.no-tickets {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 30px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
}

input,
select {
    padding: 8px 10px;
    border-radius: 3px;
    border: 1px solid var(--border-base);
    background-color: var(--surface-main);
    color: var(--text-primary);
    font-size: 14px;
}

.btn {
    padding: 10px 20px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-weight: normal;
    font-size: 16px;
    transition: all 0.1s ease;
}

.btn:hover {
    background: var(--secondary-hover);
}

.alert {
    background: var(--surface-card);
    color: var(--text-primary);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid var(--border-base);
}

/* TICKET DETAILS */
.chat-container {
    max-width: 100%;
    margin: 90px 0px 0px 0px;
    background: var(--surface-main);
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.ticket-info {
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
}

.box-details-ticket {
    display: grid;
    grid-template-columns: repeat(4, 4fr);
    gap: 0px;
}

.chat-messages {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 10px;
}

.chat-message {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.chat-message .bubble {
    max-width: 100%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 18px;
}

.chat-left {
    justify-content: left;
}

.chat-left .bubble {
    background: var(--chat-bubble-left-bg);
    color: var(--chat-bubble-left-text);
    border-top-left-radius: 0;
}

.chat-right {
    justify-content: right;
}

.chat-right .bubble {
    background: var(--chat-bubble-right-bg);
    color: var(--chat-bubble-right-text);
    border-top-right-radius: 0;
}

.chat-date-left {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 3px;
}

.chat-date-right {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 3px;
}

.chat-read-details {
    text-align: right;
    font-size: 12px;
    opacity: 0.8;
}

.ticket-form-container {
    margin: 20px 0;
    gap: 10px;
    width: 100%;
}

.ticket-form-container button {
    padding: 10px 20px;
    border-radius: 2px;
    border: none;
    background: var(--secondary);
    color: white;
    cursor: pointer;
    transition: all 0.1s ease;
}

.form-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.ticket-form-container button:hover {
    background: var(--btn-primary-hover);
}

.ticket-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-bottom: 20px;
}

.ticket-actions button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.1s ease;
}

.ticket-actions button:hover {
    background: var(--primary-hover);
}

.ticket-actions .close {
    background: var(--danger);
    border: none;
    padding: 10px 20px;
    border-radius: 2px;
    cursor: pointer;
    margin-right: -4px;
    transition: all 0.1s ease;
}

.ticket-actions .close:hover {
    opacity: 0.8;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}



/* Hamburger allineato a sinistra */
.hamburger {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    width: 35px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1200;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* animazione X */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Logo centrato */
.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: #00773e;
    text-align: center;
    margin: 0;
    letter-spacing: 0.5px;
    width: 200px;
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    overflow-y: auto;
    background: rgba(12, 12, 14, 0.90) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
    transition: left 0.3s ease;
    z-index: 1050;
    padding: 100px 30px 30px;
}

.sidebar.open {
    left: 0;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin-bottom: 25px;
    transform: translateX(-20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.sidebar.open ul li {
    transform: translateX(0);
    opacity: 1;
}

/* Staggered delay for menu items - Snappier version */
.sidebar.open ul li:nth-child(1) {
    transition-delay: 0.05s;
}

.sidebar.open ul li:nth-child(2) {
    transition-delay: 0.08s;
}

.sidebar.open ul li:nth-child(3) {
    transition-delay: 0.11s;
}

.sidebar.open ul li:nth-child(4) {
    transition-delay: 0.14s;
}

.sidebar ul li a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    border-radius: 12px;
}

.sidebar ul li a i {
    font-size: 20px;
    width: 25px;
    text-align: center;
    color: #3fc75c;
    /* Vibrant brighter green */
    filter: drop-shadow(0 0 8px rgba(63, 199, 92, 0.3));
}

.sidebar ul li a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- Overlay --- */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-bg);
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.text-message {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border-base);
    background-color: var(--surface-main);
    color: var(--text-primary);
    font-size: 16px;
    resize: vertical;
}

.under-header-menu {
    text-align: center;
    display: grid;
    grid-template-columns: repeat(4, 4fr);
    gap: 0px;
}

.under-header-menu a {
    text-decoration: none;
    display: inline;
    color: var(--text-primary);
    font-size: 18px;
}

.under-header-menu a:hover {
    color: var(--btn-primary-bg);
    background-color: var(--nav-hover-bg);
}

/* --- SCEHDA CLIENTE --- */
.container-details {
    max-width: 100%;
    position: relative;
    margin: 90px 0px 0px 0px;
    background: var(--surface-main);
    border-radius: 6px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.row-inline {
    display: flex;
    align-items: start;
    justify-content: flex-start;
    gap: 20px;
    width: 100%;
}

.left-column {
    margin: auto;
    flex: 0 0 25%;
    max-width: 25%;
    display: grid;
    grid-template-rows: auto auto;
    row-gap: 10px;
    align-items: center;
    padding: 10px 15px;
}

.right-column {
    margin: auto;
    flex: 0 0 75%;
    max-width: 75%;
    border-left: 1px solid var(--border-base);
    gap: 15px;
    padding: 10px 20px;
    align-items: left;
}

.left-items {
    text-align: center;
}

.right-items {
    text-align: left;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 0px;
}

.right-items-2 {
    text-align: left;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 15px;
    margin-top: 0px;
}

.item {
    font-weight: normal;
}

.item .btn {
    display: block;
    padding: 10px;
    border-radius: 2px;
    transition: all 0.1s ease;
}

.item .btn-blue {
    background-color: #007bff;
    color: white;
}

.item .btn:hover {
    background-color: var(--btn-primary-hover);
}

.label-title {
    font-weight: bold;
    color: var(--text-secondary);
}

.label-text {
    font-weight: normal;
    font-size: 18px;
}

.big-label {
    font-weight: normal;
    font-size: 36px;
    color: var(--text-primary);
}

hr {
    opacity: 0.6;
    border: 0.2px solid var(--hr-color);
    margin-top: 25px;
    margin-bottom: 25px;
}

a {
    text-decoration: none;
    color: var(--secondary);
}

/* --- STATO SERVIZIO --- */
.service-status-container h3,
.contact-container h3,
.notes-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--heading-color);
    font-size: 20px;
}

.status-card {
    background: var(--surface-card);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--border-base);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 15px;
}

.status-badge .status-icon {
    font-size: 20px;
}

.status-active {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.status-suspended {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffc107;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
}

.status-unknown {
    background: #e2e3e5;
    color: #383d41;
    border: 2px solid #6c757d;
}

.status-details p {
    margin: 8px 0;
    font-size: 14px;
    color: var(--text-primary);
}

/* --- CONTATTI CLIENTE --- */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--surface-card);
    border-radius: 6px;
    border: 1px solid var(--border-base);
}

.contact-icon {
    font-size: 28px;
    min-width: 40px;
    text-align: center;
}

.contact-details {
    flex: 1;
}

.contact-details a {
    color: #007bff;
    text-decoration: underline;
}

.contact-details a:hover {
    color: var(--btn-primary-hover);
}

.contact-additional {
    background: var(--surface-muted);
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
}

.contact-additional p {
    margin: 5px 0;
    font-size: 14px;
}

/* --- NOTE INTERNE --- */
.notes-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.notes-header h3 {
    margin: 0;
}

.btn-add-note {
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    line-height: 1;
}

.btn-add-note:hover {
    background: var(--secondary-hover);
}

.note-form {
    background: var(--surface-card);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid var(--border-base);
    margin-bottom: 15px;
}

.note-form .form-group {
    margin-bottom: 10px;
}

.note-form .btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-cancel {
    background: var(--danger) !important;
}

.btn-cancel:hover {
    opacity: 0.8 !important;
}

.notes-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Righe note con colori alternati */
.note-row {
    border: 1px solid var(--border-base);
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.note-row:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.note-row-even {
    background: var(--surface-card);
}

.note-row-odd {
    background: var(--surface-muted);
}

/* Header della nota - 3 colonne */
.note-row-header {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-base);
    font-size: 14px;
}

.note-date-left {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: left;
}

.note-title-center {
    font-weight: 600;
    color: var(--heading-color);
    font-size: 15px;
    text-align: center;
}

.note-author-right {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: right;
    font-style: italic;
}

/* Contenuto della nota */
.note-row-content {
    padding: 12px 15px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    background: rgba(var(--primary-rgb, 0, 0, 0), 0.03);
}

.no-notes {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    font-style: italic;
}


/* --- Responsive --- */
@media (max-width: 768px) {
    .header {
        height: 70px;
    }

    .logo {
        font-size: 1.3rem;
    }

    .ticket-actions {
        position: fixed;
        display: flex;
        margin: 0px auto;
        gap: 10px;
        bottom: 20px;
        right: -12.4%;
        transform: translateX(-50%);
    }

    .row-inline {
        flex-direction: column;
        align-items: flex-start;
        align-items: center;
    }

    .left-column {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .right-column {
        flex: 0 0 100%;
        border-left: 0px solid var(--border-base);
        max-width: 100%;
        grid-template-columns: 1fr;
    }

    .right-items {
        grid-template-columns: auto;
        text-align: center;
        margin-top: 0px;
    }
}

/* --- FATTURE --- */
.invoice-paid {
    background-color: var(--success) !important;
    color: white;
}

.invoice-unpaid {
    background-color: var(--danger) !important;
    color: white;
}

.invoice-paid:hover,
.invoice-unpaid:hover {
    opacity: 0.9;
}

/* --- DASHBOARD --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dashboard-card {
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    color: #fff;
    transition: transform 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.card-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
    opacity: 0.9;
}

.card-number {
    font-size: 48px;
    font-weight: bold;
}

/* Colori specifici dashboard */
.card-active {
    background: linear-gradient(135deg, var(--success), #218838);
}

.card-suspended {
    background: linear-gradient(135deg, var(--warning), #e0a800);
    color: #333;
}

/* --- KNOWLEDGE BASE --- */
.kb-section {
    margin-top: 40px;
}

.kb-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--heading-color);
    border-bottom: 2px solid var(--border-base);
    padding-bottom: 10px;
}

.kb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.kb-card {
    background: var(--surface-main);
    border: 1px solid var(--border-base);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.kb-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.kb-icon {
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--secondary);
}

.kb-text {
    font-weight: 600;
    font-size: 16px;
}

.card-inactive {
    background: linear-gradient(135deg, var(--danger), #c82333);
}

/* Button Outline Style */
.btn-outline {
    background: transparent;
    border: 1px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background: var(--secondary);
    color: #fff;
}

/* --- Theme Toggle --- */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-base);
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 44px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.theme-icon {
    font-size: 1.2rem;
}

/* ==========================================================================
   CINEMATIC LAYOUT & GLOBAL GLASSMORPHISM
   ========================================================================== */
.layout-cinematic {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(60, 60, 60, 0.5) 100%), url('img/login-bg.png') no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

/* Override global container for cinematic layout */
.layout-cinematic .container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    color: var(--text-primary);
    max-height: calc(100vh - 160px);
    /* 80 header + 40 top gap + 40 bottom gap */
    overflow-y: auto;
    margin-top: 120px;
    /* 80 header + 40 gap */
    width: calc(100% - 80px);
    /* 40 gap left + 40 gap right */
    margin-left: auto;
    margin-right: auto;
    padding: 35px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.layout-cinematic .container::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.layout-cinematic .container {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* ==========================================================================
   DASHBOARD REFACTOR
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.dashboard-card {
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    text-align: left;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.card-icon-bg {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 80px;
    opacity: 0.15;
    transform: rotate(-15deg);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    opacity: 0.9;
}

.card-number {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.card-active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.card-suspended {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
}

.card-inactive {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* ==========================================================================
   KNOWLEDGE BASE REFACTOR
   ========================================================================== */
.kb-section {
    margin-top: 50px;
}

.kb-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 12px;
    display: inline-block;
}

.kb-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.kb-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.kb-card:hover {
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.kb-icon-fa {
    font-size: 32px;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.kb-card:hover .kb-icon-fa {
    transform: scale(1.1);
}

.kb-text {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
}

/* ==========================================================================
   PROCEDURE PAGES REFACTOR
   ========================================================================== */
.procedure-container {
    background: transparent;
    padding: 0;
    box-shadow: none;
    margin-top: 20px;
}

.step-box {
    background: rgba(255, 255, 255, 0.45);
    /* Light Glass */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.step-box:hover {
    background: rgba(255, 255, 255, 0.65);
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.step-title {
    color: #000000 !important;
    /* Black text */
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
}

.step-title i {
    font-size: 1.2rem;
    color: var(--primary);
    /* Green icons */
    opacity: 1;
}

.step-box p,
.step-box li {
    color: #1a1a1a;
    /* Dark text for content */
    font-size: 15px;
    line-height: 1.6;
}

.code-box {
    background: #1e1e1e !important;
    /* Dark background for code */
    padding: 20px;
    border-left: 4px solid var(--primary) !important;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 15px;
    border-radius: 8px;
    margin-top: 15px;
    color: #e0e0e0;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.premium-alert {
    background: #ffc107;
    /* Solid Vibrant Amber */
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1a1a1a !important;
    padding: 20px;
    border-radius: 12px;
    margin-top: 35px;
    display: flex;
    gap: 15px;
    align-items: center;
    box-shadow: none;
    /* Removed the yellow shadow as requested */
}

.danger-alert {
    background: #dc3545;
    /* Solid Vibrant Red */
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #ffffff !important;
    /* Pure white for maximum contrast */
    padding: 20px;
    border-radius: 12px;
    margin-top: 25px;
    display: flex;
    gap: 15px;
    align-items: center;
    box-shadow: none;
}

.danger-alert i {
    font-size: 28px;
    color: #ffffff !important;
}

.danger-alert p,
.danger-alert strong {
    color: #ffffff !important;
    margin: 0;
}

/* Document Grid Styles */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.doc-card {
    background: rgba(255, 255, 255, 0.45);
    /* Increased opacity for black text legibility */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.15s ease;
    /* Faster animation as requested */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
}

.doc-card:hover {
    background: rgba(255, 255, 255, 0.65);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.doc-icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.05);
    /* Darker icon background for contrast */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.doc-icon-wrapper i {
    font-size: 24px;
    color: var(--primary);
}

.doc-title {
    color: #000000;
    /* Black text */
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: none;
    /* Removed shadow */
}

.doc-desc {
    color: #1a1a1a;
    /* Dark gray for description */
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 25px;
    flex-grow: 1;
    text-shadow: none;
    /* Removed shadow */
    font-weight: 500;
}

.btn-download {
    width: 100%;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
}

/* Pricing Grid & Cards */
.pricing-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 25px;
}

.pricing-card {
    flex: 1 1 400px;
    /* Responsive flex basis */
    background: rgba(255, 255, 255, 0.45);
    /* Light Glass for Black Text */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pricing-card:hover {
    background: rgba(255, 255, 255, 0.65);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.pricing-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    /* Darker border */
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.pricing-header i {
    font-size: 24px;
    color: var(--primary) !important;
    /* Force Green Icons */
}

.pricing-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    /* Black Text */
    text-shadow: none;
}

/* Glassmorphic Table for Pricing */
.glass-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    /* Spacing between rows */
}

.glass-table th {
    text-align: left;
    color: #1a1a1a;
    /* Dark Text */
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 15px 10px 15px;
    font-weight: 700;
}

.glass-table td {
    background: rgba(255, 255, 255, 0.5);
    /* Semi-transparent white rows */
    padding: 15px;
    color: #000000;
    /* Black Text */
    font-size: 15px;
    border: none;
}

.glass-table tr td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    font-weight: 600;
}

.glass-table tr td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    text-align: right;
    font-weight: 800;
    color: var(--primary);
    /* Highlight price in Green */
}

/* Specific pricing tweaks */
.price-tag {
    color: #fff !important;
    background: var(--primary);
    /* Green tag */
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

/* Contact Cards (Mirrors Pricing Style) */
.contact-card {
    flex: 1 1 300px;
    background: rgba(255, 255, 255, 0.45);
    /* Light Glass */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.65);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.contact-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-header i {
    font-size: 24px;
    color: var(--primary) !important;
    /* Force Green Icons */
}

.contact-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    /* Black Text */
    text-shadow: none;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    margin-bottom: 15px;
    font-size: 15px;
    color: #1a1a1a;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 10px;
}

.contact-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.contact-list strong {
    color: #000;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.contact-list a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.contact-list a:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* Table Action Buttons */
.btn-table-action {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.6);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.15s ease;
}

.btn-table-action:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 119, 62, 0.3);
    transform: translateY(-1px);
    text-decoration: none;
}

/* Profile / Scheda Cliente Layout */
.profile-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 992px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

.profile-sidebar {
    position: sticky;
    top: 20px;
}

.info-card {
    background: rgba(255, 255, 255, 0.45);
    /* Light Glass */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 15px;
}

.info-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.info-card-header i {
    font-size: 20px;
    color: var(--primary);
}

.data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.data-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.data-label {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
}

.data-value {
    color: #000;
    font-weight: 500;
    text-align: right;
    font-size: 15px;
}

.action-btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Specific overrides for Quick Actions sidebar */
.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.quick-action-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 119, 62, 0.2);
}

.quick-action-btn:hover i {
    color: #fff;
}

.quick-action-btn i {
    color: var(--primary);
    font-size: 18px;
    transition: color 0.2s;
}

.status-badge-lg {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 800;
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.login-glass-container {
    width: 100%;
    max-width: 440px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--glass-shadow);
    animation: fadeInScale 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo {
    max-width: 160px;
    margin-bottom: 25px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
}

.highlight-green {
    color: var(--primary);
    font-weight: 600;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
}

.login-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-secondary);
    font-size: 18px;
    pointer-events: none;
}

.login-form input {
    width: 100%;
    padding: 14px 14px 14px 45px !important;
    border-radius: 10px !important;
    border: 2px solid var(--border-base) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--text-primary) !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
}

.login-form input:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(0, 119, 62, 0.1) !important;
}

.login-btn-premium {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 119, 62, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn-premium:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 119, 62, 0.3);
}

.login-btn-premium:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 13px;
    color: var(--text-secondary);
}

.login-alert {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Dedicated Circle Add Button */
/* Dedicated Circle Add Button */
.btn-add-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    border-radius: 50% !important;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    padding: 0 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-add-circle:hover {
    background: var(--primary-hover, #005f31);
    /* Use darker green on hover */
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-add-circle:active {
    transform: scale(0.95);
}

/* ==========================================================================
   LOGIN PAGE PREMIUM REFACTOR
   ========================================================================== */
.login-body {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(60, 60, 60, 0.5) 100%), url('img/login-bg.png') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
}

.login-glass-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.login-header {
    margin-bottom: 30px;
}

.login-logo {
    width: 220px !important;
    /* Forces larger logo */
    max-width: 100%;
    margin-bottom: 25px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.login-title {
    font-size: 32px;
    /* Slightly larger title */
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    color: #fff;
    text-transform: uppercase;
}

.login-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

.login-alert {
    background: rgba(220, 53, 69, 0.2) !important;
    color: #ff8fa3 !important;
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
    backdrop-filter: blur(5px);
}

.login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    margin-left: 5px;
}

.login-input-wrapper {
    position: relative;
}

.login-input-icon {
    position: absolute;
    left: 10px !important;
    /* Closer to edge */
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    pointer-events: none;
    z-index: 2;
}

.login-form input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 14px 14px 35px !important;
    /* Reduced padding-left significantly */
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
}

.login-form input:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 255, 127, 0.15);
    outline: none;
}

.login-form input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.login-btn-premium {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #00C853 0%, #009624 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    /* Removed vertical transform to prevent flickering */
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.1s ease;
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
    text-decoration: none;
}

.login-btn-premium:hover {
    /* Only scale slightly, no translation */
    background: linear-gradient(135deg, #00E676 0%, #00C853 100%);
    box-shadow: 0 6px 25px rgba(0, 200, 83, 0.5);
    transform: scale(1.02);
}

.login-btn-premium:active {
    transform: scale(0.98);
}

.login-footer {
    margin-top: 30px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

/* Text Utility */
.text-premium-green {
    color: #00C853 !important;
}

/* --- MODAL EDIT --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    animation: fadeInModal 0.3s ease-out;
}

.modal-content {
    background: var(--glass-bg);
    margin: 10% auto;
    padding: 30px;
    border: 1px solid var(--glass-border);
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    position: relative;
    animation: slideInDown 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    color: var(--text-primary);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 700;
    letter-spacing: -0.5px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 15px;
}

.close-modal {
    color: var(--text-secondary);
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-modal:hover {
    color: var(--danger);
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.editable-field {
    cursor: pointer;
    position: relative;
    padding: 2px 4px;
    /* Space for hover bg */
    border-radius: 4px;
    transition: all 0.2s ease;
    border-bottom: 1px dashed transparent;
    /* Only show on hover or always subtle? */
}

/* Show dashed line by default to indicate editability, or only on hover? 
   User asked for "visual system". Let's make it subtle default, visible hover. */
.editable-field {
    border-bottom: none;
    position: relative;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.editable-field:hover {
    background-color: rgba(0, 119, 62, 0.1);
    /* Primary color low opacity */
    color: var(--primary);
}

.editable-field::before {
    content: '\f303';
    /* fa-pencil */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    margin-right: 8px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--primary);
    display: inline-block;
}

.editable-field:hover::before {
    opacity: 1;
    transform: scale(1.2);
}

/* Modal Form Styles */
.modal-content input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-base);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
}

.modal-content input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 119, 62, 0.2);
}

.modal-content .btn {
    width: 100%;
    padding: 12px;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 10px;
    background: var(--primary);
    color: white;
    transition: transform 0.1s;
}

.modal-content .btn:active {
    transform: scale(0.98);
}

/* Copy Icon Hover Scale */
.copy-icon {
    cursor: pointer;
    margin-right: 8px;
    opacity: 0.6;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

.copy-icon:hover {
    transform: scale(1.3);
    opacity: 1;
    color: var(--primary);
}

.copy-icon:active {
    transform: scale(0.95);
}