cat > /var/www/vhosts/averogroup.com.mt/projects.averogroup.com.mt/css/style.css <<'EOF'
/* =========================================================
   AVERO PROJECT CONTROL CENTER - CLEAN STYLE v2.2
========================================================= */

:root {
    --navy: #0f172a;
    --navy2: #1e293b;
    --gold: #c9a227;
    --blue: #2563eb;
    --green: #16a34a;
    --red: #dc2626;
    --orange: #f59e0b;
    --grey: #f3f4f6;
    --border: #e5e7eb;
    --text: #111827;
    --muted: #6b7280;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--grey);
    color: var(--text);
}

/* SIDEBAR */
.sidebar {
    width: 165px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--navy), var(--navy2));
    z-index: 9998;
}

.sidebar h2 {
    color: var(--gold);
    text-align: center;
    font-size: 16px;
    line-height: 1.1;
    padding: 14px 8px;
    margin: 0 0 8px 0;
}

.sidebar a {
    display: block;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;
    padding: 7px 9px;
    margin: 2px 6px;
    border-radius: 7px;
    cursor: pointer;
}

.sidebar a:hover {
    background: rgba(201, 162, 39, 0.2);
}

.content {
    margin-left: 165px;
    padding: 20px;
    max-width: calc(100% - 165px);
    overflow-x: hidden;
}

/* MOBILE MENU BUTTON */
#mobileMenuBtn,
#menuToggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 10000;
    background: var(--gold);
    color: #111827;
    border: 0;
    border-radius: 9px;
    padding: 8px 12px;
    font-weight: 900;
    cursor: pointer;
}

/* HEADINGS */
h2 {
    margin-top: 0;
    font-size: 24px;
}

h3 {
    font-size: 18px;
}

/* BUTTONS */
button,
.btn,
input[type="button"],
input[type="submit"] {
    border: 0;
    border-radius: 8px;
    padding: 8px 13px;
    min-height: 36px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    background: var(--blue);
    color: white;
    margin: 3px;
}

button:hover,
.btn:hover {
    opacity: 0.9;
}

.btn-primary {
    background: var(--blue);
}

.btn-success {
    background: var(--green);
}

.btn-danger {
    background: var(--red);
}

.btn-warning {
    background: var(--orange);
    color: #111827;
}

.btn-secondary {
    background: #6b7280;
}

.btn-small,
table button {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 13px;
}

/* PANELS */
.tab-content,
.form-box,
.modern-panel {
    background: white;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

/* FORMS */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    padding: 9px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

/* CARDS */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    width: 100%;
}

.card {
    background: white;
    border-radius: 14px;
    padding: 18px;
    min-width: 0;
    border: 1px solid var(--border);
    border-top: 4px solid var(--gold);
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.card h3 {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 8px 0;
    text-transform: uppercase;
}

.card span,
.card p {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
}

/* TABLES */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

table th,
table td {
    padding: 8px;
    border: 1px solid #ddd;
    vertical-align: top;
    font-size: 14px;
}

.responsive-table,
.boq-table-wrap,
.supplier-lines-wrap {
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: 12px;
}

.responsive-table table,
.boq-table-wrap table,
.supplier-lines-wrap table {
    min-width: 760px;
}

/* TABS */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 16px 0;
}

.tabs button {
    background: var(--navy);
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 13px;
    white-space: normal;
}

.tabs button:hover {
    background: var(--blue);
}

/* SITE VISITS / PHOTOS */
.visit-list {
    display: grid;
    gap: 16px;
}

.visit-card,
.client-visit-card {
    background: white;
    border-radius: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
}

.visit-header h3,
.client-visit-card h3 {
    margin: 0 0 6px 0;
}

.visit-header p {
    color: var(--muted);
    margin: 0;
}

.visit-actions {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.photo-grid,
.client-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.photo-card,
.client-photo-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.photo-card img,
.client-photo-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 9px;
    display: block;
}

/* CLIENT PORTAL */
.client-portal-header,
.client-view-header {
    background: linear-gradient(135deg, var(--navy), var(--navy2));
    color: white;
    padding: 22px;
    border-radius: 16px;
    margin-bottom: 18px;
    border-left: 6px solid var(--gold);
}

.client-portal-header h2,
.client-view-header h2 {
    color: white;
    margin-top: 0;
}

.client-visit-date {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state {
    background: #f9fafb;
    padding: 20px;
    border-radius: 12px;
    border: 1px dashed #d1d5db;
    color: var(--muted);
}

/* SETTINGS */
.settings-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-pill {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-disabled {
    background: #fee2e2;
    color: #991b1b;
}

/* LOGIN */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(201,162,39,0.22), transparent 30%),
        linear-gradient(135deg, var(--navy), var(--navy2));
}

.login-box {
    width: 420px;
    max-width: 92%;
    background: white;
    border-radius: 22px;
    padding: 34px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.28);
}

.login-box h1 {
    margin-top: 0;
    color: var(--navy);
}

.login-box input {
    width: 100%;
    margin-bottom: 12px;
    padding: 15px;
    font-size: 17px;
}

.login-box button {
    width: 100%;
}

/* MOBILE */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    #mobileMenuBtn,
    #menuToggle {
        display: block;
    }

    .sidebar {
        left: -230px;
        width: 220px;
        height: 100vh;
        transition: left .25s ease;
        padding-top: 55px;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar h2 {
        font-size: 17px;
        padding: 10px;
    }

    .sidebar a {
        font-size: 15px;
        padding: 10px 12px;
        margin: 3px 8px;
    }

    .content {
        margin-left: 0;
        max-width: 100%;
        width: 100%;
        padding: 65px 12px 14px 12px;
    }

    h2 {
        font-size: 22px;
    }

    h3 {
        font-size: 18px;
    }

    .cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card {
        padding: 16px;
    }

    .card span,
    .card p {
        font-size: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    input,
    select,
    textarea {
        min-height: 44px;
        font-size: 16px;
    }

    button,
    .btn {
        min-height: 42px;
        padding: 10px 14px;
        font-size: 15px;
    }

    .tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .tabs button {
        width: 100%;
        font-size: 14px;
        padding: 10px;
        border-radius: 10px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 14px;
    }

    .tab-content,
    .modern-panel,
    .form-box {
        padding: 14px;
    }

    .photo-grid,
    .client-photo-grid {
        grid-template-columns: 1fr 1fr;
    }

    .photo-card img,
    .client-photo-card img {
        height: 130px;
    }
}

@media (max-width: 480px) {
    .tabs {
        grid-template-columns: 1fr;
    }

    .photo-grid,
    .client-photo-grid {
        grid-template-columns: 1fr;
    }

    button,
    .btn {
        width: 100%;
    }
}

/* PRINT */
@media print {
    #mobileMenuBtn,
    #menuToggle,
    .sidebar,
    button,
    .tabs,
    input,
    select {
        display: none !important;
    }

    body {
        background: white;
        font-size: 12px;
    }

    .content {
        margin-left: 0;
        max-width: 100%;
        padding: 0;
    }

    .tab-content,
    .modern-panel,
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .cards {
        grid-template-columns: repeat(3, 1fr);
    }

    h2 {
        font-size: 22px;
        border-bottom: 3px solid var(--gold);
        padding-bottom: 8px;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        font-size: 11px;
    }

    th {
        background: var(--navy) !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    th,
    td {
        border: 1px solid #ccc;
        padding: 6px;
    }
}
EOF

/* AVERO DARK BACKGROUND RESTORE */

body {
    background: #eef1f6 !important;
}

.sidebar {
    background: linear-gradient(180deg, #0f172a, #1e293b) !important;
}

.sidebar h2 {
    color: #c9a227 !important;
}

.sidebar a {
    color: #ffffff !important;
}

.sidebar a:hover {
    background: rgba(201,162,39,0.22) !important;
}

.login-screen {
    background:
        radial-gradient(circle at top left, rgba(201,162,39,0.22), transparent 30%),
        linear-gradient(135deg, #0f172a, #1e293b) !important;
}

.client-portal-header,
.client-view-header {
    background: linear-gradient(135deg, #0f172a, #1e293b) !important;
    color: white !important;
}


/* AVERO BUTTON VISIBILITY FIX */

button,
.btn,
input[type="button"],
input[type="submit"] {
    background: #2563eb !important;
    color: #ffffff !important;
    border: 0 !important;
    box-shadow: 0 2px 6px rgba(37,99,235,0.25) !important;
}

button:hover,
.btn:hover {
    opacity: 0.9 !important;
}

.btn-primary {
    background: #2563eb !important;
    color: #ffffff !important;
}

.btn-success {
    background: #16a34a !important;
    color: #ffffff !important;
}

.btn-danger {
    background: #dc2626 !important;
    color: #ffffff !important;
}

.btn-warning {
    background: #f59e0b !important;
    color: #111827 !important;
}

.btn-secondary {
    background: #6b7280 !important;
    color: #ffffff !important;
}

.tabs button {
    background: #0f172a !important;
    color: #ffffff !important;
}

#mobileMenuBtn,
#menuToggle {
    background: #c9a227 !important;
    color: #111827 !important;
}


/* AVERO FINAL THEME FIX */

/* Login button */
.login-box button,
.login-screen button {
    background: #2563eb !important;
    color: #ffffff !important;
    border: 0 !important;
}

/* Dashboard tabs */
.tabs button {
    background: #0f172a !important;
    color: #ffffff !important;
    border: 1px solid #1e293b !important;
}

.tabs button:hover {
    background: #2563eb !important;
    color: #ffffff !important;
}

/* Active tab */
.tabs button.active {
    background: #c9a227 !important;
    color: #111827 !important;
}

/* Financial cards */
.card {
    background: #ffffff !important;
}

/* White panels */
.tab-content,
.form-box,
.modern-panel {
    background: #ffffff !important;
}

/* Main page background */
body {
    background: #eef2f7 !important;
}

/* Project header */
h2 {
    color: #0f172a !important;
}

/* Better tables */
table th {
    background: #0f172a !important;
    color: #ffffff !important;
}


/* AVERO FINAL MOBILE FORCE FIX */

@media only screen and (max-width: 900px) {
    html,
    body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        font-size: 17px !important;
    }

    #mobileMenuBtn {
        display: block !important;
        position: fixed !important;
        top: 10px !important;
        left: 10px !important;
        z-index: 99999 !important;
        width: auto !important;
        background: #c9a227 !important;
        color: #111827 !important;
        padding: 10px 14px !important;
        border-radius: 10px !important;
    }

    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -260px !important;
        width: 240px !important;
        height: 100vh !important;
        z-index: 99998 !important;
        padding-top: 58px !important;
        transition: left 0.25s ease !important;
        overflow-y: auto !important;
    }

    .sidebar.open {
        left: 0 !important;
    }

    .content {
        margin-left: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 68px 12px 16px 12px !important;
    }

    .cards {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .card {
        width: 100% !important;
        min-width: 0 !important;
        padding: 18px !important;
    }

    .form-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    input,
    select,
    textarea {
        width: 100% !important;
        min-height: 46px !important;
        font-size: 16px !important;
    }

    button,
    .btn {
        min-height: 44px !important;
        font-size: 15px !important;
        padding: 10px 14px !important;
    }

    .tabs {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .tabs button {
        width: 100% !important;
        white-space: normal !important;
        border-radius: 10px !important;
    }

    table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }

    .tab-content,
    .form-box,
    .modern-panel {
        padding: 14px !important;
        border-radius: 12px !important;
    }
}

@media only screen and (max-width: 480px) {
    .tabs {
        grid-template-columns: 1fr !important;
    }

    button,
    .btn {
        width: 100% !important;
    }
}


/* AVERO MOBILE BUTTON SIZE TWEAK */

@media only screen and (max-width: 900px) {

    button,
    .btn {
        min-height: 36px !important;
        padding: 8px 12px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
    }

    .btn-small,
    table button {
        min-height: 30px !important;
        padding: 6px 10px !important;
        font-size: 13px !important;
    }

    .tabs button {
        min-height: 36px !important;
        padding: 8px 10px !important;
        font-size: 13px !important;
    }

    #mobileMenuBtn {
        min-height: 34px !important;
        padding: 7px 10px !important;
        font-size: 13px !important;
    }
}


/* AVERO BOQ + SUPPLIER BUTTON SIZE FIX */

.boq-table-wrap button,
.supplier-lines-wrap button,
.responsive-table button {
    min-height: 28px !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
}

.boq-table-wrap .btn,
.supplier-lines-wrap .btn,
.responsive-table .btn {
    min-height: 28px !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
}

/* Mobile */
@media (max-width: 900px) {
    .boq-table-wrap button,
    .supplier-lines-wrap button,
    .responsive-table button {
        min-height: 30px !important;
        padding: 5px 8px !important;
        font-size: 12px !important;
    }
}


/* AVERO FINAL BUTTON COMPACT OVERRIDE */

/* Default all normal app buttons */
button,
.btn,
input[type="button"],
input[type="submit"] {
    min-height: 30px !important;
    height: auto !important;
    padding: 5px 10px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    border-radius: 6px !important;
}

/* Table/menu/action buttons even smaller */
table button,
.responsive-table button,
.boq-table-wrap button,
.supplier-lines-wrap button,
.visit-actions button,
.settings-filters button,
.btn-small {
    min-height: 26px !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
    border-radius: 5px !important;
}

/* Keep login button readable */
.login-box button {
    min-height: 38px !important;
    padding: 9px 12px !important;
    font-size: 14px !important;
}

/* Keep mobile menu button compact */
#mobileMenuBtn,
#menuToggle {
    min-height: 32px !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    width: auto !important;
}

/* Project tab buttons compact */
.tabs button {
    min-height: 30px !important;
    padding: 6px 9px !important;
    font-size: 12px !important;
}

/* On mobile keep usable, but not huge */
@media only screen and (max-width: 900px) {
    button,
    .btn {
        min-height: 34px !important;
        padding: 7px 10px !important;
        font-size: 13px !important;
    }

    table button,
    .responsive-table button,
    .boq-table-wrap button,
    .supplier-lines-wrap button,
    .btn-small {
        min-height: 28px !important;
        padding: 5px 7px !important;
        font-size: 12px !important;
    }

    .tabs button {
        min-height: 32px !important;
        padding: 7px 8px !important;
        font-size: 12px !important;
    }
}


/* Supplier bills compact inline editing */
.compact-table {
    font-size: 13px;
}

.compact-table th,
.compact-table td {
    padding: 6px 8px;
    vertical-align: top;
}

.compact-table .mini-input,
.compact-table select {
    height: 34px;
    padding: 4px 6px;
    font-size: 13px;
    min-width: 0;
}

.compact-table .supplier-select {
    width: 120px;
}

.compact-table .inv-no {
    width: 90px;
}

.compact-table .date-input {
    width: 135px;
}

.compact-table .money-input {
    width: 75px;
}

.compact-table .notes-input {
    width: 130px;
}

.compact-table .mini-file {
    width: 105px;
    font-size: 12px;
}

.compact-table .actions-cell button {
    display: block;
    margin-bottom: 5px;
    width: 70px;
    padding: 6px 8px;
}
