* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    background-color: black;
}
h1 {
    color: white;
    font-size: clamp(32px, 5vw, 48px);
    text-align: center;
}
 .boxes-container {
            display: flex;
            gap: 30px;
            padding: 30px;
            transition: opacity 0.5s ease-out;
        }
        .box {
            flex: 1;
            min-width: 0;
            cursor: pointer;
            transition: opacity 0.5s ease-out;
            border-radius: 12px;
            overflow: visible;
            background: transparent;
        }
        .box img {
            display: block;
            width: 100%;
            height: auto;
            max-width: 100%;
            object-fit: contain;
            background: transparent;
            border-radius: 12px;
        }
        .boxes-container.fade-out {
            opacity: 0;
            pointer-events: none;
        }
        .box.hidden {
            opacity: 0;
            pointer-events: none;
        }

        #contactForm {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: grey;
            padding: 40px;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            z-index: 1000;
            animation: slideIn 0.5s ease-out;
            max-width: 500px;
            width: 90%;
            color: white;
        }
        #contactForm.show {
            display: block;
        }
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translate(-50%, -60%);
            }
            to {
                opacity: 1;
                transform: translate(-50%, -50%);
            }
        }
        #contactForm h2 {
            margin-top: 0;
            color: white;
        }
        #contactForm label {
            color: white;
        }
        .form-group {
            margin-bottom: 20px;
        }
        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
            color: white;
        }
        .form-group input,
        .form-group select {
            width: 100%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 14px;
            box-sizing: border-box;
            background-color: #ffffff;
            color: #111111;
            caret-color: #111111;
        }
        .form-group input::placeholder {
            color: #666666;
        }
        .form-group select option {
            background-color: #ffffff;
            color: #111111;
        }
        .form-group input:focus,
        .form-group select:focus {
            outline: none;
            border-color: #007bff;
            box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
        }
        #submitBtn {
            background-color: black;
            color: white;
            padding: 12px 30px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
            font-weight: bold;
            width: 100%;
        }
        #submitBtn:hover {
            background-color: black;
        }
        #closeBtn {
            background-color: black;
            color: white;
            padding: 10px 15px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            float: right;
        }
        #closeBtn:hover {
            background-color: black;
        }
        .form-buttons {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }
        .form-buttons button {
            flex: 1;
        }

/* ── Dashboard styles ── */
body {
    font-family: Arial, sans-serif;
    color: white;
    padding: 30px;
}

.dashboard-header {
    background: linear-gradient(135deg, #0d47a1, #6a1b9a, #00838f);
    border-radius: 12px;
    padding: 30px 20px 24px;
    text-align: center;
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 38px;
    margin-bottom: 6px;
    background: none;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.subtitle {
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    background: none;
    margin-bottom: 0;
}

.stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.stat-card {
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-top: 4px solid #007bff;
    border-radius: 10px;
    padding: 20px 30px;
    text-align: center;
    min-width: 140px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

/* Accent colour variants */
.accent-blue   { border-top-color: #2196f3; }
.accent-purple { border-top-color: #ab47bc; }
.accent-orange { border-top-color: #ff7043; }
.accent-teal   { border-top-color: #26c6da; }
.accent-amber  { border-top-color: #f5a623; }
.accent-green  { border-top-color: #5bf57a; }
.accent-grey   { border-top-color: #777; }

.stat-card .number {
    font-size: 40px;
    font-weight: bold;
    color: #fff;
    background: none;
}

.stat-card .label {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: none;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar input {
    padding: 9px 14px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #1a1a1a;
    color: white;
    font-size: 14px;
    width: 260px;
}

.toolbar input:focus {
    outline: none;
    border-color: #ab47bc;
    box-shadow: 0 0 0 2px rgba(171,71,188,0.25);
}

.btn-clear {
    padding: 8px 18px;
    background: #c0392b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-clear:hover { background: #e74c3c; }

.table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #2a2a2a;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: none;
}

thead {
    background: linear-gradient(90deg, #0d47a1, #6a1b9a);
}

th {
    padding: 13px 16px;
    text-align: left;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    border-bottom: 2px solid #333;
    background: none;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

th:hover { color: white; }

th .sort-arrow {
    margin-left: 4px;
    font-size: 11px;
    background: none;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid #1e1e1e;
    background: none;
    color: #ddd;
}

tr:nth-child(even) td { background-color: #0e0e0e; }

tr:hover td {
    background-color: #1a2a3a;
    color: white;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    background: none;
    letter-spacing: 0.3px;
}

.badge-design { background-color: #1a4a7a; color: #5ba3f5; }
.badge-repair { background-color: #4a1a1a; color: #f55b5b; }
.badge-photo  { background-color: #1a4a2a; color: #5bf57a; }

#noData {
    text-align: center;
    color: #555;
    padding: 60px 0;
    font-size: 16px;
    background: none;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    background: none;
}

.back-link:hover { text-decoration: underline; }

.email-link {
    color: #5ba3f5;
    background: none;
}

/* Status stat numbers */
.status-pending { color: #f5a623; }
.status-open    { color: #5bf57a; }
.status-closed  { color: #aaa; }

/* Status dropdown in table */
.status-select {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #444;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    background: #1a1a1a;
    color: white;
}

.status-select.status-pending { border-color: #f5a623; color: #f5a623; }
.status-select.status-open    { border-color: #5bf57a; color: #5bf57a; }
.status-select.status-closed  { border-color: #aaa;    color: #aaa; }

/* Per-row delete button */
.btn-delete {
    padding: 4px 10px;
    background: none;
    color: #c0392b;
    border: 1px solid #c0392b;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.btn-delete:hover {
    background: #c0392b;
    color: white;
}

/* Ticket button */
.btn-ticket {
    padding: 4px 10px;
    background: none;
    color: #ab47bc;
    border: 1px solid #ab47bc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.btn-ticket:hover {
    background: #ab47bc;
    color: white;
}

/* Ticket modal overlay */
.ticket-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.ticket-overlay.active {
    display: flex;
}

.ticket-modal {
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    width: 90%;
    max-width: 580px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.7);
    animation: ticketSlideIn 0.2s ease-out;
}

@keyframes ticketSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ticket-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px 16px;
    background: linear-gradient(135deg, #0d47a1, #6a1b9a);
    flex-shrink: 0;
}

.ticket-modal-header h2 {
    font-size: 22px;
    color: white;
    margin-bottom: 6px;
    background: none;
}

.ticket-meta {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    background: none;
}

.ticket-close-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 12px;
}

.ticket-close-btn:hover {
    background: rgba(255,255,255,0.3);
}

.ticket-customer-info {
    padding: 16px 24px;
    border-bottom: 1px solid #2a2a2a;
    flex-shrink: 0;
    background: #0e0e0e;
}

.ticket-info-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    background: none;
}

.ticket-info-grid > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: none;
}

.info-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: none;
}

.ticket-notes-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    padding: 0;
    background: none;
}

.ticket-notes-heading {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 24px 8px;
    border-bottom: 1px solid #1e1e1e;
    background: none;
    flex-shrink: 0;
}

.ticket-notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: none;
}

.no-notes {
    color: #555;
    font-size: 14px;
    text-align: center;
    margin-top: 20px;
    background: none;
}

.note-item {
    background: #1a1a1a;
    border-left: 3px solid #ab47bc;
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
}

.note-timestamp {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
    background: none;
}

.note-text {
    font-size: 14px;
    color: #ddd;
    line-height: 1.5;
    white-space: pre-wrap;
    background: none;
}

.ticket-add-note {
    padding: 12px 24px 20px;
    border-top: 1px solid #2a2a2a;
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-shrink: 0;
    background: #0e0e0e;
}

.note-input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    padding: 10px 12px;
    resize: none;
    font-family: inherit;
}

.note-input:focus {
    outline: none;
    border-color: #ab47bc;
    box-shadow: 0 0 0 2px rgba(171,71,188,0.25);
}

.btn-add-note {
    padding: 10px 18px;
    background: linear-gradient(135deg, #0d47a1, #6a1b9a);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
}

.btn-add-note:hover {
    opacity: 0.85;
}

/* Footer */
#siteFooter {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid #222;
}

#adminLink {
    color: #444;
    text-decoration: none;
    font-size: 12px;
}

#adminLink:hover {
    color: #888;
}