:root {
    --primary: #522b7a;
    --accent: #8e44ad;
    --highlight: #d81b60;
    --warning: #ffcc00;
    --bg-light: #fdfcfd;
    --dark: #2d132c;
    --text-main: #2d132c;
    --text-light: #fdfcfd;
}

/* --- Global Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* --- Navigation --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.menu-toggle {
    display: none;
}

.logo {
    font-weight: bold;
    font-size: 1.5rem;
    color: #bb5596;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #bb5596;
}

.nav-links a::after {
    content: "";
    width: 0%;
    height: 2px;
    background: #000;
    display: block;
    margin: auto;
    transition: 0.1s;
}

.nav-links a:hover:after {
    width: 100%
}

/* --- Hero Section --- */
.hero {
    display: flex;
    align-items: center;
    padding: 50px 10%;
    background: #2D132C;
    min-height: 80vh;
}

.hero-left,
.hero-right {
    flex: 1;
    padding: 20px;
}

.hero-left img {
    width: 60%;
    border-radius: 10px;
}

.hero-right h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #fff;
}

.hero-right p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #fff;
}

button {
    padding: 12px 30px;
    background: #bb5596;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

button:hover {
    background-color: #ae3db1;
}

/* Hero Section */
.hehe {
    padding: 100px 10%;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)),
        url('assets/herobg.jpg') no-repeat center center/cover;
    overflow: hidden;
}

.hehe-container {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    z-index: 2;
}

.hehe-images {
    flex: 1;
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-img {
    position: absolute;
    width: 220px;
    height: 320px;
    background: #e0e0e0;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #555;
    transform: rotate(-25deg) skewX(10deg);
    box-shadow: 15px 15px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.img-1 {
    z-index: 3;
    left: 20%;
    background-color: #d1d1d1;
}

.img-2 {
    z-index: 2;
    left: 0%;
    top: 10%;
    background-color: #e6e6e6;
}

.img-3 {
    z-index: 2;
    left: 45%;
    top: 30%;
    background-color: #efefef;
    width: 180px;
    height: 260px;
}

.floating-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.floating-img {
    background: none;
    border: none;
    overflow: hidden;
}

.hehe-content {
    flex: 1;
    text-align: left;
}

.hehe-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #2d132c;
}

.hehe-content p {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 2rem;
    max-width: 550px;
}

.cta-btn {
    background: var(--primary);
    color: var(--text-light);
    border: none;
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s, background 0.3s;
}

.cta-btn:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

/* --- Services (About) --- */
.services-container {
    padding: 80px 10%;
    background: #fff;
    text-align: center;
}

.section-title {
    margin-bottom: 40px;
    font-size: 2.5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.service-box {
    padding: 30px;
    background: #fdfcfd;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease;
}

.service-box:hover {
    transform: translateY(-5px);
}

.service-box h3 {
    font-size: 1.1rem;
    color: #bb5596;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

/* Dropdown */
.dropdown-btn {
    background: #f0f0f0;
    color: #555;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.dropdown-btn:hover {
    background: #ae3db1;
    color: #fff;
}

.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    text-align: left;
}

.dropdown-content.show {
    max-height: 500px;
    padding-top: 15px;
}

.dropdown-content ul {
    list-style: none;
}

.dropdown-content li {
    font-size: 0.9rem;
    padding: 5px 0;
    border-bottom: 1px solid #f9f9f9;
    color: #666;
}

/* --- 3D Brand Carousel --- */
.brands-section {
    text-align: center;
    padding: 80px 10%;
    background: #eee;
    perspective: 1200px;
    overflow: hidden;
}

/* --- Updated 3D Brand Carousel Navigation --- */
.brand-carousel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 2%;
    position: relative;
}

.brands-section h2 {
    font-size: 3rem;
    margin-bottom: 100px;
    font-weight: 650;
}

.nav-btn {
    background: #bb5596;
    color: white;
    border-radius: 50%;
    padding: 15px 20px;
    z-index: 10;
    cursor: pointer;
    position: relative;
}

.brand-viewport {
    width: 300px;
    margin: 0 40px;
    overflow: visible;
}

.brand-track {
    display: flex;
    align-items: center;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.brand-track img {
    width: 200px;
    margin: 0 50px;
    flex-shrink: 0;
    opacity: 0.4;
    filter: grayscale(100%);
    transition: all 0.6s ease;
    transform: rotateY(45deg) scale(0.8);
}

.brand-track img.active {
    opacity: 1;
    filter: grayscale(0%);
    transform: rotateY(0deg) scale(1.2);
    z-index: 10;
}

.brand-track img.active~img {
    transform: rotateY(-45deg) scale(0.8);
}

/* --- Brand Hover Detail Box --- */
.brand-details-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 100;
    opacity: 1;
    visibility: visible;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    pointer-events: auto;
    text-align: left;
}

.brand-track img:not(.active):hover {
    transform: rotateY(45deg) scale(0.8);
    cursor: default;
}

/* --- Updated 3D Brand Carousel Navigation --- */
.brand-carousel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 2%;
    position: relative;
}

.nav-btn {
    background: #bb5596;
    color: white;
    border-radius: 50%;
    padding: 15px 20px;
    z-index: 10;
    cursor: pointer;
    position: relative;
}

.brand-track img.active:hover~.brand-details-overlay,
.brand-viewport:hover .brand-details-overlay {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.details-content img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.details-text {
    padding: 20px;
}

.details-text h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.2;
}

.details-text #detail-category {
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.details-text #detail-description {
    font-size: 0.85rem;
    color: #444;
    line-height: 1.6;
    font-weight: 500;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.brand-viewport {
    position: relative;
    overflow: visible !important;
}

.contact-section {
    display: flex;
    padding: 80px 10%;
    gap: 50px;
    background: #fff;
    align-items: center;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.booking-btn {
    display: inline-block;
    padding: 15px 40px;
    background: #bb5596;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    align-self: flex-start;
    box-shadow: 0 4px 15px rgba(212, 20, 90, 0.3);
    transition: 0.3s;
}

.booking-btn:hover {
    background: #ae3db1;
    transform: scale(1.05);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links img {
    width: 35px;
    height: 35px;
    opacity: 0.8;
    transition: 0.3s;
}

.social-links img:hover {
    transform: translateY(-3px);
    opacity: 1;
    filter: brightness(1.2);
}

.map {
    flex: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.site-footer {
    background: #fff;
    border-top: 1px solid #eee;
    color: #333;
    padding-bottom: 20px;
}

.footer-cta {
    text-align: center;
    padding: 80px 10% 60px;
    background: #fff;
}

.footer-cta p {
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto 30px auto;
    color: #444;
    font-weight: 500;
}

.contact-number {
    display: inline-block;
    padding: 15px 45px;
    background: #d4145a;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 20, 90, 0.3);
}

.contact-number:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.footer-legal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 10% 10px;
    border-top: 1px solid #f5f5f5;
    font-size: 0.9rem;
    color: #888;
}

.footer-legal a {
    text-decoration: none;
    color: #888;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: #d4145a;
}

.footer-legal .left-section {
    flex: 1;
    display: flex;
    align-items: center;
}

.copyright-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1.5px solid #888;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.75rem;
}

.privacy-link {
    flex: 1;
    text-align: center;
}

.back-to-top {
    flex: 1;
    text-align: right;
    white-space: nowrap;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #bb5596;
}

.contact-form button {
    width: 100%;
    margin-top: 10px;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: #bb5596;
}

.booking-page {
    background-color: #f2f2f2;
}

.scrolling-text-container {
    background: #e0e0e0;
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid #ccc;
}

.scrolling-text {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left 25s linear infinite;
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

.booking-container {
    padding: 60px 10%;
    max-width: 1400px;
    margin: 0 auto;
}

.booking-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
}

.form-column h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #000;
}

.input-group,
.input-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.input-row {
    flex-direction: row;
}

.form-column input,
.form-column select,
.form-column textarea {
    background-color: #d9d9d9;
    border: none;
    border-radius: 20px;
    padding: 15px 25px;
    font-size: 1rem;
    width: 100%;
    outline: none;
}

.form-divider {
    border: 0;
    border-top: 1px solid #999;
    margin: 20px 0;
}

.submit-btn {
    background-color: #bb5596;
    color: white;
    padding: 18px;
    border-radius: 20px;
    width: 100%;
    font-size: 1.1rem;
    margin-top: 20px;
    transition: background 0.3s;
}

.upload-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.upload-header h2 {
    font-size: 1.8rem;
    color: #2d132c;
    margin-bottom: 10px;
}

.upload-header p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.4;
}

.preview-area {
    background-color: #e6e6e6;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.preview-item {
    background: #fff;
    border-radius: 12px;
    aspect-ratio: 1;
    position: relative;
    border: 1px solid #ccc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.remove-img-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #d81b60;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    border: 2px solid white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 5;
}

.upload-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.import-btn,
.remove-all-btn {
    background-color: #bb5596;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

.import-btn:hover,
.remove-all-btn:hover {
    background-color: #8e44ad;
    transform: translateY(-2px);
}

.remove-all-btn {
    background-color: rgb(198, 47, 47);
}

.remove-all-btn:hover {
    background-color: #333;
}

/* --- Submission Message Styles --- */
.submission-text {
    margin-top: 15px;
    padding: 15px;
    background-color: #d4edda;
    /* Light green background */
    color: #155724;
    /* Dark green text */
    border: 1px solid #c3e6cb;
    border-radius: 20px;
    text-align: center;
    font-weight: 600;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Admin Dashboard Styles --- */
.admin-page {
    background-color: #f8f9fa;
}

.admin-container {
    padding: 60px 10%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 80vh;
}

.admin-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 40px;
    border-left: 5px solid var(--primary);
    padding-left: 20px;
}

.admin-header h1 {
    font-size: 2.5rem;
    color: var(--dark);
}

/* Booking Table Styling */
.booking-table-wrapper {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

/* Admin bookings: full-width table layout */
.admin-bookings-wide .admin-container {
    max-width: none;
    width: 100%;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    box-sizing: border-box;
}

.admin-bookings-wide .booking-table-wrapper {
    overflow-x: visible;
    overflow-y: visible;
    padding: 14px 12px;
}

.admin-bookings-wide #bookingTable td:last-child {
    overflow: visible;
}

.admin-bookings-wide #bookingTable {
    width: 100%;
    table-layout: fixed;
    font-size: 0.875rem;
}

.admin-bookings-wide #bookingTable th,
.admin-bookings-wide #bookingTable td {
    padding: 10px 8px;
    font-size: 0.8125rem;
    line-height: 1.35;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.admin-bookings-wide #bookingTable th {
    font-size: 0.7rem;
    letter-spacing: 0.4px;
    white-space: normal;
}

.admin-bookings-wide #bookingTable .contract-pill,
.admin-bookings-wide #bookingTable .status-label {
    font-size: 0.68rem;
    padding: 4px 8px;
    white-space: normal;
    display: inline-block;
    max-width: 100%;
}

.admin-bookings-wide #bookingTable .payment-status-line {
    font-size: 0.75rem;
    line-height: 1.3;
    display: inline-block;
}

.admin-bookings-wide #bookingTable .btn-table-link {
    font-size: 0.75rem;
    padding: 0;
}

.admin-bookings-wide #bookingTable th:nth-child(1),
.admin-bookings-wide #bookingTable td:nth-child(1) {
    width: 7%;
}

.admin-bookings-wide #bookingTable th:nth-child(2),
.admin-bookings-wide #bookingTable td:nth-child(2) {
    width: 8%;
}

.admin-bookings-wide #bookingTable th:nth-child(3),
.admin-bookings-wide #bookingTable td:nth-child(3) {
    width: 11%;
}

.admin-bookings-wide #bookingTable th:nth-child(4),
.admin-bookings-wide #bookingTable td:nth-child(4) {
    width: 10%;
}

.admin-bookings-wide #bookingTable th:nth-child(5),
.admin-bookings-wide #bookingTable td:nth-child(5) {
    width: 12%;
}

.admin-bookings-wide #bookingTable th:nth-child(6),
.admin-bookings-wide #bookingTable td:nth-child(6) {
    width: 8%;
}

.admin-bookings-wide #bookingTable th:nth-child(7),
.admin-bookings-wide #bookingTable td:nth-child(7) {
    width: 11%;
}

.admin-bookings-wide #bookingTable th:nth-child(8),
.admin-bookings-wide #bookingTable td:nth-child(8) {
    width: 11%;
}

.admin-bookings-wide #bookingTable th:nth-child(9),
.admin-bookings-wide #bookingTable td:nth-child(9) {
    width: 14%;
}

.admin-bookings-wide #bookingTable th:nth-child(10),
.admin-bookings-wide #bookingTable td:nth-child(10) {
    width: 8%;
}

.admin-bookings-wide .admin-controls {
    flex-wrap: wrap;
}

.admin-bookings-wide .admin-header h1 {
    font-size: 2rem;
}

#bookingTable td:last-child {
    overflow: visible;
}

#bookingTable,
#workTable,
#financeTable {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

#bookingTable th,
#bookingTable td,
#workTable th,
#workTable td,
#financeTable th,
#financeTable td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

#bookingTable th,
#workTable th,
#financeTable th {
    background-color: #fdfcfd;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    white-space: normal;
}

#bookingTable tr:hover,
#workTable tr:hover,
#financeTable tr:hover {
    background-color: #f9f9f9;
}

#financeTable {
    min-width: 760px;
    table-layout: auto;
}

#financeTable td {
    word-break: break-word;
}

.no-data {
    text-align: center;
    padding: 50px;
    color: #888;
    font-style: italic;
}

/* Action Buttons */
.delete-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
}

.delete-btn:hover {
    background-color: #c0392b;
}

/* --- Auth Pages (Login & Register) --- */
.auth-page {
    background-color: var(--bg-light);
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-box h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 30px;
}

.auth-box .input-group {
    margin-bottom: 20px;
}

.auth-box input[type="text"],
.auth-box input[type="email"],
.auth-box input[type="password"] {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    width: 100%;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.auth-box input:focus {
    border-color: var(--primary);
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: #666;
    text-align: left;
}

.auth-btn {
    background-color: var(--primary);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 10px;
    width: 100%;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.auth-btn:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
}

.auth-footer {
    margin-top: 25px;
    font-size: 0.9rem;
    color: #555;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Specific styling for the Booking Table actions */
.action-menu {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.action-menu:has(.menu-dropdown.show) {
    z-index: 150;
}

#bookingTable td:last-child,
#workTable td:last-child {
    overflow: visible;
}

/* Hide admin-only controls if the element isn't rendered by PHP, 
   but this serves as a fallback for the UI */
.customer-view .admin-controls {
    display: none;
}

/* Status label colors */
.status-label {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-pending {
    background-color: #ffeaa7;
    color: #d6a312;
}

.status-archived {
    background-color: #55efc4;
    color: #00b894;
}

.status-cancelled {
    background-color: #ff7675;
    color: #d63031;
}

.status-complete {
    background-color: #d1f7ff;
    color: #008ba3;
}

/* Colored status dropdown — compact like original status pills */
.booking-status-select {
    display: inline-block;
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: 5px 22px 5px 12px;
    border-radius: 15px;
    border: none;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.2;
    cursor: pointer;
    vertical-align: middle;
    appearance: none;
    -webkit-appearance: none;
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 9px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
}

.admin-bookings-wide #bookingTable td:nth-child(6) {
    white-space: nowrap;
}

.admin-bookings-wide #bookingTable .booking-status-select {
    font-size: 0.68rem;
    padding: 4px 20px 4px 8px;
    background-position: right 6px center;
}

.worker-work-page #workTable td:nth-child(6) {
    white-space: nowrap;
}

.booking-status-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(187, 85, 150, 0.35);
}

.booking-status-select:disabled {
    opacity: 0.65;
    cursor: wait;
}

.booking-status-select.status-pending {
    background-color: #ffeaa7;
    color: #d6a312;
}

.booking-status-select.status-complete {
    background-color: #d1f7ff;
    color: #008ba3;
}

.booking-status-select.status-archived {
    background-color: #55efc4;
    color: #00b894;
}

.booking-status-select.status-cancelled {
    background-color: #ff7675;
    color: #d63031;
}

/* Ensure the table is scannable on smaller screens */
@media (max-width: 768px) {

    #bookingTable thead,
    #financeTable thead {
        display: none;
    }

    #bookingTable tr,
    #financeTable tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #eee;
        padding: 10px;
        border-radius: 10px;
        background: #fff;
    }

    #bookingTable td,
    #financeTable td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        padding: 8px 0;
        border: none;
    }

    /* Overrides high-specificity desktop column percentages for admin view on mobile viewports */
    .admin-bookings-wide #bookingTable,
    .admin-bookings-wide #bookingTable th,
    .admin-bookings-wide #bookingTable td {
        width: 100% !important;
        table-layout: auto;
    }

    .admin-bookings-wide .booking-table-wrapper {
        overflow-x: auto;
        padding: 12px;
    }

    #bookingTable td::before,
    #financeTable td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--primary);
        flex: 0 0 42%;
        max-width: 11rem;
        padding-right: 8px;
    }

    #financeTable {
        min-width: 0;
    }
}

/* Profile Icon and Dropdown Styles */
.profile-nav {
    position: relative;
    margin-left: 30px;
    list-style: none;
    display: flex;
    align-items: center;
}

.profile-icon {
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #bb5596;
    background: #fff;
    transition: transform 0.3s ease;
}

.profile-icon:hover {
    transform: scale(1.1);
}

.profile-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    width: 180px;
    display: none;
    /* Controlled by JS */
    flex-direction: column;
    padding: 8px 0;
    z-index: 2000;
    border: 1px solid #eee;
}

.auth-dropdown.show {
    display: flex;
}

.auth-dropdown a,
.auth-dropdown p {
    display: block;
    width: 100%;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
}

.auth-dropdown p {
    font-weight: bold;
    color: #bb5596;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 5px;
}

.auth-dropdown a:hover {
    background: #f8f9fa;
    color: #bb5596;
}

/* Optimized Admin Filter Bar */
.admin-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
}

.search-bar {
    flex: 2;
}

.search-bar input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid #ddd;
    outline: none;
}

.filter-system {
    flex: 1;
}

.filter-system select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
}

/* Admin bookings: multi-column checkbox filters */
.admin-controls--search {
    margin-top: 12px;
}

.admin-controls--search .search-bar {
    flex: 1 1 100%;
    max-width: 480px;
}

.booking-filter-panel {
    width: 100%;
    margin-top: 16px;
    margin-bottom: 8px;
    padding: 16px 18px 18px;
    background: #fff;
    border: 1px solid #dce3ea;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    display: block;
}

.booking-filter-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f6;
}

.booking-filter-panel__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark, #2d3436);
    letter-spacing: 0.02em;
}

.booking-filter-clear {
    padding: 6px 14px;
    font-size: 0.8rem;
    border: 1px solid #c5d0dc;
    border-radius: 6px;
    background: #f8fafc;
    color: #4a5568;
    cursor: pointer;
}

.booking-filter-clear:hover {
    background: #eef2f7;
    border-color: #a8b8c8;
}

.booking-filter-panel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 18px 22px;
    align-items: start;
    width: 100%;
}

.booking-filter-col__title {
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.booking-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 3px 0;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #2d3748;
    cursor: pointer;
    user-select: none;
}

.booking-filter-option--all {
    font-weight: 600;
    margin-bottom: 2px;
}

.booking-filter-option input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    flex-shrink: 0;
    accent-color: #bb5596;
    cursor: pointer;
}

/* Custom focus state indicator style targeting active checkboxes */
.booking-filter-option input[type="checkbox"]:focus-visible {
    outline: 2px solid #bb5596;
    outline-offset: 2px;
}

.admin-bookings-wide .booking-filter-panel {
    max-width: none;
}

/* Color for Complete/Replied status[cite: 6] */
.status-complete {
    background-color: #d1f7ff;
    color: #008ba3;
}

/* Toggle feature behavior overrides for filter panel grid collapse animation */
.booking-filter-panel__grid {
    transition: max-height 0.35s ease-in-out, opacity 0.25s ease-in-out, margin-top 0.35s ease-in-out;
    max-height: 1200px;
    /* Fully expanded threshold height limit */
    opacity: 1;
    overflow: hidden;
}

.booking-filter-panel__grid.filters-collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-top: 0 !important;
    pointer-events: none;
}

.booking-filter-panel {
    transition: padding 0.35s ease-in-out;
}

.booking-filter-panel.panel-collapsed-padding {
    padding-bottom: 16px !important;
    /* Reduces bottom whitespace when child inputs collapse */
}

/* Fix for the Action Dropdown appearing in image[cite: 7] */
.menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    min-width: 150px;
    flex-direction: column;
    /* Force vertical stacking */
}

.menu-dropdown.show {
    display: flex;
    z-index: 200;
}

.menu-dropdown button {
    width: 100%;
    padding: 10px 15px;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    color: #333;
    font-size: 0.85rem;
}

.menu-dropdown button:hover {
    background-color: #f8f9fa;
}

/* Status label for Complete/Replied[cite: 6] */
.status-complete {
    background-color: #d1f7ff;
    color: #008ba3;
}

/* Calendar Layout */
.calendar-column {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.calendar-wrapper {
    margin-top: 20px;
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 20px;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-controls button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 10px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    /* Ensures 7 columns for 7 days */
    gap: 8px;
    margin-top: 10px;
}

.calendar-days div {
    aspect-ratio: 1 / 1;
    /* Makes every day a perfect square */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.2s ease;
}


/* Availability Colors */
.day-empty {
    background-color: #d1f7ff !important;
    color: #008ba3;
    border: 1px solid #008ba3;
    cursor: pointer;
}

.day.available {
    background-color: #d1f7ff !important;
    color: #008ba3;
    border: 1px solid #008ba3;
}

.day.available:hover {
    transform: scale(1.1);
    background-color: #b3f0fc !important;
}

.day.booked {
    background-color: #ff7675 !important;
    color: white;
    cursor: not-allowed;
    position: relative;
}

.calendar-legend {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
}

.day.booked {
    background-color: #ff7675 !important;
    color: white;
    cursor: not-allowed;
    position: relative;
}

/* Optional: Add an "X" or tooltip style if needed */
.day.booked:hover::after {
    content: 'Full';
    position: absolute;
    font-size: 0.6rem;
    bottom: 2px;
}

/* --- Date Error Message Styles --- */
.error-text {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8d7da;
    /* Light red background */
    color: #721c24;
    /* Dark red text */
    border: 1px solid #f5c6cb;
    border-radius: 20px;
    text-align: center;
    font-weight: 600;
    animation: fadeIn 0.5s ease-in-out;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.box {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.box.available {
    background: #d1f7ff;
    border: 1px solid #008ba3;
}

.box.booked {
    background: #ff7675;
}

/* Date/Time Input Stack */
.input-stack {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.input-stack label {
    font-size: 0.8rem;
    margin-bottom: 5px;
    color: #666;
    padding-left: 10px;
}

@media (max-width: 768px) {

    /* 1. Show the hamburger button */
    .menu-toggle {
        display: block;
        cursor: pointer;
        width: 30px;
        height: 25px;
        z-index: 2001;
        position: relative;
    }

    .bar {
        display: block;
        width: 100%;
        height: 3px;
        margin: 5px auto;
        transition: all 0.3s ease-in-out;
        background-color: #bb5596;
        /* Matches your brand color */
        border-radius: 2px;
    }

    /* 2. Hide links by default and position them for the slide-in menu */
    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        /* Adjust this to match your exact navbar height */
        flex-direction: column;
        background: #fff;
        width: 100%;
        height: auto;
        /* Changed from 100vh to fit content only */
        justify-content: flex-start;
        /* Align links to the top */
        text-align: center;
        transition: 0.4s ease-in-out;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        z-index: 2000;
        padding: 20px 0;
        /* Add some spacing at the top/bottom */
    }

    .nav-links li {
        margin-left: 0;
        width: 100%;
        /* Make each link row full width */
    }

    /* Fix the Profile container on mobile */
    .profile-nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    /* Adjust the dropdown positioning for mobile */
    .auth-dropdown {
        position: static;
        /* Remove absolute positioning so it pushes content down */
        width: 100%;
        box-shadow: none;
        /* Clean up the look */
        background-color: #f9f9f9;
        display: none;
        /* JS will toggle '.show' which sets 'display: flex' */
    }

    .auth-dropdown.show {
        display: flex;
        /* Matches your existing .auth-dropdown.show logic */
    }

    /* Style the greeting and logout button for better mobile tapping */
    .auth-dropdown p,
    .auth-dropdown a {
        padding: 15px 0;
        border-bottom: 1px solid #eee;
    }

    .nav-links.active {
        right: 0;
    }

    /* 4. Hamburger to 'X' Animation Logic */
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* --- Hehe Section (Index.php) --- */
    .hehe {
        padding: 60px 5%;
        min-height: auto;
        display: flex !important;
        /* Restores visibility of the section on mobile */
    }

    .hehe-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .hehe-images {
        display: none !important;
        /* Hides the 3 floating images completely */
    }

    .hehe-content h1 {
        font-size: 2.2rem;
        /* Keeps the text sized appropriately for mobile viewports */
    }

    /* --- Hero Section (About) --- */
    .hero {
        flex-direction: column;
        padding: 40px 10%;
        text-align: center;
    }

    .hero-left img {
        width: 70%;
        margin-bottom: 20px;
    }

    .hero-right h1 {
        font-size: 2rem;
    }

    /* --- Brands Section --- */
    .brands-section h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .brand-carousel {
        flex-direction: column;
        gap: 20px;
    }

    .brand-viewport {
        width: 100%;
        /* Take up full width */
        margin: 0;
        overflow: hidden;
    }

    .brand-track img {
        width: 120px;
        /* Smaller logos */
        margin: 0 15px;
    }

    .brand-track img.active {
        transform: rotateY(0deg) scale(1.1);
        /* Less aggressive scaling */
    }

    /* Make the brand details readable on mobile */
    .brand-details-overlay {
        position: relative;
        /* Remove from absolute center */
        top: auto;
        left: auto;
        transform: none !important;
        /* Flatten it */
        width: 100%;
        /* Full width */
        margin-top: 30px;
        opacity: 1;
        /* Always visible on mobile if a brand is active */
        visibility: visible;
        box-shadow: none;
        border: 1px solid #eee;
    }

    .details-content {
        flex-direction: column;
    }

    .details-content img {
        height: 150px;
    }

    /* --- Contact Page --- */
    .contact-section {
        flex-direction: column-reverse;
        /* Put the map below the contact info */
        padding: 40px 5%;
        gap: 40px;
    }

    .contact-info {
        text-align: center;
        align-items: center;
    }

    .booking-btn {
        align-self: center;
        /* Center the button */
    }

    .map {
        width: 100%;
    }

    .map iframe {
        width: 100% !important;
        height: 300px;
        border-radius: 10px;
    }

    .calendar-wrapper {
        padding: 10px;
    }

    .calendar-days {
        gap: 4px;
        /* Tighter gap for smaller screens */
    }

    .calendar-days div {
        font-size: 0.75rem;
    }

    .calendar-weekdays {
        font-size: 0.7rem;
        margin-bottom: 5px;
    }

    /* --- Global Spacing & Footer --- */
    .footer-legal {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .left-section,
    .privacy-link,
    .back-to-top {
        text-align: center;
        justify-content: center;
    }

    .auth-container {
        padding: 20px;
    }

    .auth-box {
        padding: 30px 20px;
    }

    /* Admin + booking pages: reduce side padding to prevent overflow */
    nav {
        padding: 16px 5%;
    }

    .admin-container {
        padding: 40px 5%;
    }

    .booking-container {
        padding: 40px 5%;
    }

    /* Cards and modals: reduce padding on tablets */
    .contract-page-card {
        padding: 1.5rem 1.25rem;
    }

    .modal-panel {
        padding: 1.35rem 1.25rem;
    }

    /* Action dropdown: keep inside viewport */
    .menu-dropdown {
        max-width: min(320px, 92vw);
        overflow: hidden;
    }
    .menu-dropdown button {
        white-space: normal;
    }
}

/* --- Booking approval contract (client + admin) --- */
.contract-page-card {
    background: #fff;
    border-radius: 15px;
    padding: 2rem 2.5rem;
    max-width: 640px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.contract-page-card h1 {
    font-size: 1.65rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.contract-intro {
    color: #444;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.contract-form .input-stack {
    margin-bottom: 1.25rem;
}

.contract-form .input-stack label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

.contract-form input[type="text"],
.contract-form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 1rem;
    font-family: inherit;
}

.contract-foot {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.contract-foot a {
    color: var(--primary);
}

.contract-success-banner {
    background: #e8f8ef;
    color: #1e7e4e;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.contract-flash {
    background: #e3f2fd;
    color: #1565c0;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.contract-readonly {
    display: grid;
    grid-template-columns: minmax(120px, 180px) 1fr;
    gap: 0.5rem 1rem;
    margin: 1rem 0;
}

.contract-readonly dt {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contract-readonly dd {
    margin: 0;
    color: #333;
    line-height: 1.5;
    white-space: pre-wrap;
}

.btn-contract-primary {
    display: inline-block;
    margin-top: 1rem;
    padding: 12px 22px;
    background: var(--primary);
    color: #fff !important;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
}

.btn-contract-primary:hover {
    background: var(--accent);
}

.contract-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contract-pill.contract-na {
    background: #eee;
    color: #666;
}

button.contract-send-trigger {
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: background-color 0.15s ease, color 0.15s ease;
}

button.contract-send-trigger:hover,
button.contract-send-trigger:focus {
    background: #e8f5e9;
    outline: none;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.25);
}

button.contract-send-trigger:disabled {
    opacity: 0.65;
    cursor: wait;
}

.contract-send-label-hover {
    display: none;
    color: #2e7d32;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 700;
}

button.contract-send-trigger:hover .contract-send-label-default,
button.contract-send-trigger:focus .contract-send-label-default {
    display: none;
}

button.contract-send-trigger:hover .contract-send-label-hover,
button.contract-send-trigger:focus .contract-send-label-hover {
    display: inline;
}

.contract-pill.contract-wait {
    background: #fff3e0;
    color: #e65100;
}

.contract-muted {
    color: #aaa;
}

.btn-table-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    font-size: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

a.btn-table-link {
    text-decoration: underline;
}

.btn-table-link:hover {
    color: var(--accent);
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.45);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-panel {
    background: #fff;
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    padding: 1.75rem 2rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-panel h2 {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    color: var(--dark);
}

.modal-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.modal-pending {
    background: #fff8e1;
    color: #6d4c41;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: #888;
}

.modal-close:hover {
    color: #333;
}

.modal-panel-wide {
    max-width: 600px;
}

.modal-actions-row {
    margin-top: 1.25rem;
}

.app-confirm-overlay {
    z-index: 2500;
}

.app-confirm-panel {
    max-width: 440px;
}

.app-confirm-message {
    margin: 0;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.5;
}

.confirm-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.btn-confirm-cancel,
.btn-confirm-ok {
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.btn-confirm-cancel {
    background: #f0f0f0;
    color: #444;
}

.btn-confirm-cancel:hover {
    background: #e4e4e4;
}

.btn-confirm-ok {
    background: var(--primary);
    color: #fff;
}

.btn-confirm-ok:hover {
    background: var(--accent);
}

.pricing-input-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #444;
}

.pricing-price-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.deposit-summary-bar {
    margin-top: 1.25rem;
    padding: 14px 18px;
    background: linear-gradient(90deg, #fdf8fc 0%, #f3f8ff 100%);
    border-radius: 12px;
    border: 1px solid #e8e0eb;
    font-size: 0.95rem;
    color: #333;
}

.deposit-summary-meta {
    color: #666;
    font-weight: normal;
}

.deposit-amount {
    color: #1565c0;
    font-size: 1.05rem;
}

.contract-pill.contract-ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.contract-pill.contract-cancel {
    background: #ffebee;
    color: #c62828;
}

.text-ok {
    color: #2e7d32;
}

.text-warn {
    color: #c62828;
}

.pricing-card .pricing-ack {
    font-size: 1.05rem;
}

.pricing-amounts {
    background: #fafafa;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border: 1px solid #eee;
}

.pricing-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin: 0.5rem 0;
    font-size: 1rem;
}

.pricing-line.highlight {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #ddd;
    font-size: 1.1rem;
}

.pricing-line.highlight strong {
    color: var(--primary);
    font-size: 1.2rem;
}

.pricing-legal {
    font-size: 0.95rem;
    color: #555;
}

.pricing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1.25rem;
}

.btn-cancel-booking {
    background: #fff;
    color: #c62828;
    border: 2px solid #c62828;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
}

.btn-cancel-booking:hover {
    background: #ffebee;
}

.muted-small {
    font-size: 0.85rem;
    color: #888;
}

.job-snippet {
    font-size: 0.95rem;
    max-height: 8rem;
    overflow-y: auto;
}

/* Booking payment status + Finance dashboard */
.payment-status-line {
    display: inline-block;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.35;
}

.payment-status-line.paid-down {
    color: #1565c0;
}

.payment-status-line.paid-full {
    color: #2e7d32;
}

.finance-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.finance-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px 18px;
    border: 1px solid #eee;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.finance-card .fc-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin-bottom: 6px;
}

.finance-card strong {
    font-size: 1.15rem;
    color: var(--dark);
}

.finance-table-wrap {
    margin-top: 0;
}

.finance-detail-section-title {
    margin: 1.5rem 0 0.75rem;
    font-size: 1rem;
    color: var(--primary);
}

.finance-tx-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.finance-tx-list__item {
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 8px;
    background: #fafafa;
}

.finance-tx-list__item--highlight {
    border-color: var(--primary);
    background: #fdf8fc;
    box-shadow: 0 0 0 1px rgba(187, 85, 150, 0.2);
}

.record-pay-fieldset {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px 14px 8px;
    margin-bottom: 1rem;
}

.record-pay-fieldset legend {
    padding: 0 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.record-pay-radio {
    display: block;
    margin: 8px 0;
    cursor: pointer;
    font-size: 0.95rem;
}

.record-pay-radio input {
    margin-right: 8px;
}

/* Booking detail modal (worker + admin) */
.modal-contract-body {
    margin-top: 0.25rem;
}

.contract-detail-dl {
    display: grid;
    grid-template-columns: minmax(9rem, 32%) 1fr;
    gap: 0.35rem 1.5rem;
    margin: 0;
}

.contract-detail-dl dt {
    font-weight: 600;
    color: #666;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    padding-top: 0.15rem;
}

.contract-detail-dl dd {
    margin: 0 0 0.65rem;
    color: #222;
    font-size: 0.95rem;
    line-height: 1.45;
    word-break: break-word;
}

.contract-detail-dl dd:last-of-type {
    margin-bottom: 0;
}

/* Worker Work tab — same container width as default admin (not full-bleed) */
.worker-work-page .admin-header .modal-meta {
    margin-bottom: 0;
}

.worker-work-page #workDetailOverlay .modal-panel-wide {
    max-width: 600px;
}

.worker-forward-pill {
    background: #e3f2fd;
    color: #1565c0;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    margin-top: 4px;
    text-transform: none;
    letter-spacing: 0;
}

.work-payment-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.work-payment-cell .btn-table-link {
    font-size: 0.78rem;
    white-space: normal;
    text-align: left;
}

.work-detail-payment-actions {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.work-detail-payment-actions::before {
    content: 'Report payment to admin';
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.admin-bookings-wide #bookingTable .worker-forward-pill {
    font-size: 0.65rem;
    padding: 3px 8px;
}

@media (max-width: 768px) {
    #workTable thead {
        display: none;
    }

    #workTable tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #eee;
        padding: 10px;
        border-radius: 10px;
        background: #fff;
    }

    #workTable td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 8px 0;
        border: none;
    }

    #workTable td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--primary);
        flex: 0 0 42%;
        max-width: 11rem;
    }

    .contract-detail-dl {
        grid-template-columns: 1fr;
        gap: 0.15rem 0;
    }

    .contract-detail-dl dt {
        margin-top: 0.5rem;
    }
}

/* ==========================================================================
   7. EXTRA SMALL DEVICES RESPONSIVENESS (375px - e.g., iPhone 13)
   ========================================================================== */
@media (max-width: 375px) {

    /* --- General Sizing Adjustments --- */
    .admin-container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* --- Hero / Hehe Section Adjustments --- */
    .hehe-content h1 {
        font-size: 1.8rem;
        /* Scales text down slightly to prevent clipping and aggressive wrapping */
    }

    .hehe-content p {
        font-size: 0.95rem;
    }

    .cta-btn {
        width: 100%;
        /* Stretches button full-width for an easier mobile touch target */
        text-align: center;
        padding: 12px 24px;
    }

    /* --- Bookings & Admin Tables Stack Adjustments --- */
    #bookingTable td,
    #workTable td,
    #financeTable td {
        flex-direction: column;
        /* Stacks the field label on top of the dynamic content */
        align-items: flex-start;
        gap: 4px;
        padding: 10px 0;
    }

    #bookingTable td::before,
    #workTable td::before,
    #financeTable td::before {
        flex: none;
        max-width: 100%;
        margin-bottom: 2px;
    }

    /* Full-width interactive fields inside cards for better usability */
    .booking-status-select,
    #bookingTable .contract-pill,
    #bookingTable .status-label,
    .btn-table-link,
    .action-menu,
    .menu-btn {
        width: 100% !important;
        text-align: left;
        box-sizing: border-box;
    }

    /* Reposition action menu drops safely for full-width stacked rows */
    .menu-dropdown {
        right: auto;
        left: 0;
        width: 100%;
    }

    /* --- Filter Panel Top Alignment --- */
    .booking-filter-panel__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .booking-filter-panel__head>div {
        width: 100%;
        justify-content: space-between;
    }

    .booking-filter-clear {
        width: 100%;
        text-align: center;
    }

    /* --- Pricing Actions View Break --- */
    .pricing-actions {
        flex-direction: column;
        gap: 10px;
    }

    .pricing-actions button {
        width: 100%;
    }

    /* Extra small devices: tighter paddings + safer modal sizing */
    nav {
        padding: 14px 4%;
    }

    .admin-container,
    .booking-container {
        padding-left: 0.9rem !important;
        padding-right: 0.9rem !important;
    }

    .contract-page-card {
        padding: 1.25rem 1rem;
        border-radius: 12px;
    }

    .modal-overlay {
        padding: 12px;
    }

    .modal-panel {
        padding: 1.1rem 1rem;
        border-radius: 14px;
    }

    .confirm-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-confirm-cancel,
    .btn-confirm-ok {
        width: 100%;
    }
}

/* --- Admin Layout --- */
body.admin-page-layout {
    margin-left: 250px;
}

.admin-sidebar {
    position: fixed;
    top: 70px;
    /* height of top nav */
    left: 0;
    width: 250px;
    height: calc(100vh - 70px);
    background: #fff;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    z-index: 900;
}

.admin-sidebar a {
    display: block;
    padding: 15px 30px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: #fdf5f9;
    color: var(--primary);
    border-left: 4px solid var(--primary);
}

.admin-sidebar-bottom {
    margin-top: auto;
    padding: 20px;
}

.admin-sidebar-bottom .btn-view-site {
    display: block;
    text-align: center;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.admin-sidebar-bottom .btn-view-site:hover {
    background: var(--primary);
    color: #fff;
}


@media (max-width: 768px) {
    body.admin-page-layout {
        margin-left: 0 !important;
    }

    .admin-sidebar {
        z-index: 1050;
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.15);
        transform: translateX(-250px);
        transition: transform 0.3s ease;
    }

    body.admin-page-layout:not(.admin-sidebar-collapsed) .admin-sidebar {
        transform: translateX(0);
    }
}


/* --- Sidebar Toggle Styles --- */
body.admin-page-layout {
    transition: margin-left 0.3s ease;
}

.admin-sidebar {
    transition: transform 0.3s ease;
}

body.admin-sidebar-collapsed {
    margin-left: 0 !important;
}

body.admin-sidebar-collapsed .admin-sidebar {
    transform: translateX(-250px);
}

.sidebar-toggle-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle-btn:hover {
    color: var(--primary);
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-sidebar a img.sidebar-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: 0.2s;
}

.admin-sidebar a:hover img.sidebar-icon,
.admin-sidebar a.active img.sidebar-icon {
    opacity: 1;
    filter: sepia(1) hue-rotate(280deg) saturate(3);
    /* rough approximation of primary color */
}

/* --- Modern Hero Section --- */
.modern-hero {
    position: relative;
    padding: 100px 8%;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: #0f0c29;
    background: linear-gradient(135deg, #2d132c, #4a1c40, #2d132c);
    overflow: hidden;
    color: #fff;
}

.hero-bg-elements {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    border-radius: 50%;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    width: 400px; height: 400px;
    background: #bb5596;
    top: -100px; left: -100px;
}

.blob-2 {
    width: 500px; height: 500px;
    background: #d4145a;
    bottom: -150px; right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

.modern-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    gap: 50px;
}

.hero-text-side {
    flex: 1.2;
}

.glass-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
    color: #e2a8c9;
}

.hero-text-side h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
    letter-spacing: -1px;
}

.text-gradient {
    background: linear-gradient(90deg, #bb5596, #ff9a9e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text-side p {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #e0e0e0;
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-cta-group {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
}

.btn-glow {
    background: #bb5596;
    color: #fff;
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(187, 85, 150, 0.5);
    transition: all 0.3s ease;
}

.btn-glow:hover {
    background: #d4145a;
    box-shadow: 0 0 30px rgba(212, 20, 90, 0.8);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    color: #fff;
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline.glassmorphism {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    transform: translateY(-3px);
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 0.9rem;
    color: #bbb;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-visual-side {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
}

.panel-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e2a8c9;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.service-list-mini {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.service-item-mini {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.05rem;
    color: #e0e0e0;
}

.service-item-mini .dot {
    width: 10px;
    height: 10px;
    background: #bb5596;
    border-radius: 50%;
    box-shadow: 0 0 10px #bb5596;
}

.service-item-mini.more-link {
    margin-top: 10px;
    color: #bb5596;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.service-item-mini.more-link:hover {
    color: #ff9a9e;
}

.floating-panel {
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 80%;
    padding: 20px;
    background: rgba(45, 19, 44, 0.7);
}

.brands-panel p {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ccc;
    margin-bottom: 15px;
    text-align: center;
}

.mini-brand-scroll {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    overflow: hidden;
}

.mini-brand-scroll img {
    height: 35px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(0.8);
    transition: all 0.3s;
}

.mini-brand-scroll img:hover {
    filter: brightness(0) invert(1) opacity(1);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 992px) {
    .modern-hero-content {
        flex-direction: column;
        text-align: center;
    }
    .hero-text-side p { margin: 0 auto 40px auto; }
    .hero-cta-group { justify-content: center; }
    .hero-stats { justify-content: center; }
    .floating-panel {
        position: relative;
        bottom: 0; right: 0; width: 100%;
        margin-top: 20px;
    }
}
@media (max-width: 768px) {
    .hero-text-side h1 { font-size: 3rem; }
    .hero-cta-group { flex-direction: column; }
    .stat-item h3 { font-size: 1.5rem; }
}

/* --- Responsive Layout Fixes for 768px --- */
@media (max-width: 768px) {
    .booking-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .input-row {
        flex-direction: column;
        gap: 15px;
    }
    .booking-container {
        padding: 40px 5%;
    }
    .services-container {
        padding: 60px 5%;
    }
    .contact-section {
        padding: 40px 5%;
    }
}

/* --- Responsive Layout Fixes for 375px --- */
@media (max-width: 375px) {
    .hero-text-side h1 {
        font-size: 2.2rem;
    }
    .hero-text-side p {
        font-size: 1rem;
    }
    .hero-stats {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    .hero-stats .stat-item {
        text-align: center;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .service-box {
        padding: 20px;
    }
    .brand-track img {
        width: 90px;
        margin: 0 10px;
    }
    .cta-btn, .booking-btn, .submit-btn, .auth-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.95rem;
        text-align: center;
    }
    .contact-number {
        width: 100%;
        padding: 12px 20px;
        font-size: 1rem;
        text-align: center;
    }
    .booking-container {
        padding: 30px 4%;
    }
    .booking-grid {
        gap: 20px;
    }
    .calendar-wrapper {
        padding: 5px;
    }
    .calendar-days div {
        font-size: 0.7rem;
        padding: 5px 0;
    }
    .calendar-weekdays div {
        font-size: 0.65rem;
    }
    .form-column h2, .calendar-column h2, .auth-box h2, .section-title {
        font-size: 1.8rem;
    }
    nav {
        padding: 15px 5%;
    }
    .logo {
        font-size: 1.2rem;
    }
}

