
/* ============================================================
   MACKAYE BARBER SHOP & SALON
   REAL-TIME QUEUE STATUS
   PREMIUM PINK / ROSE DESIGN
   ============================================================ */

   :root {
    --pink: #F9CDC4;
    --pink-light: #FFE4DE;
    --pink-bright: #F28FA3;
    --pink-dark: #D96F88;

    --rose: #A94F6B;
    --rose-dark: #7D354F;

    --champagne: #F6D6B8;

    --cream: #FFF9F7;
    --cream-soft: #FFF1EE;

    --plum: #351D28;
    --plum-soft: #563642;

    --white: #FFFFFF;

    --muted: #806872;

    --border:
        rgba(169, 79, 107, 0.14);

    --pink-shadow:
        rgba(242, 143, 163, 0.25);

    --rose-shadow:
        rgba(169, 79, 107, 0.18);
}


/* ============================================================
   RESET
   ============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family:
        "Segoe UI",
        Arial,
        sans-serif;

    color: var(--plum);

    overflow-x: hidden;

    background:
        radial-gradient(
            circle at 8% 18%,
            rgba(249, 205, 196, 0.44),
            transparent 28%
        ),
        radial-gradient(
            circle at 92% 25%,
            rgba(246, 214, 184, 0.30),
            transparent 30%
        ),
        radial-gradient(
            circle at 50% 100%,
            rgba(242, 143, 163, 0.16),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            #FFF9F7,
            #FFF3F0
        );
}


/* ============================================================
   LIGHT BACKGROUND ANIMATION
   ============================================================ */

body::before,
body::after {
    content: "";

    position: fixed;

    border-radius: 50%;

    pointer-events: none;

    z-index: -1;
}

body::before {
    width: 330px;
    height: 330px;

    left: -160px;
    top: 170px;

    background:
        radial-gradient(
            circle,
            rgba(242, 143, 163, 0.12),
            transparent 70%
        );

    animation:
        floatLeft 11s ease-in-out infinite alternate;
}

body::after {
    width: 360px;
    height: 360px;

    right: -180px;
    bottom: -80px;

    background:
        radial-gradient(
            circle,
            rgba(246, 214, 184, 0.18),
            transparent 70%
        );

    animation:
        floatRight 13s ease-in-out infinite alternate;
}

@keyframes floatLeft {
    from {
        transform:
            translate3d(0, 0, 0);
    }

    to {
        transform:
            translate3d(30px, 35px, 0);
    }
}

@keyframes floatRight {
    from {
        transform:
            translate3d(0, 0, 0);
    }

    to {
        transform:
            translate3d(-30px, -30px, 0);
    }
}


/* ============================================================
   NAVBAR
   ============================================================ */

header {
    position: sticky;
    top: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;

    width: 100%;

    padding:
        15px 5%;

    background:
        linear-gradient(
            135deg,
            rgba(255, 249, 247, 0.98),
            rgba(249, 205, 196, 0.94)
        );

    border-bottom:
        1px solid rgba(169, 79, 107, 0.18);

    box-shadow:
        0 8px 30px rgba(169, 79, 107, 0.12);
}


/* ============================================================
   LOGO
   ============================================================ */

.logo-container {
    display: flex;
    align-items: center;

    gap: 12px;

    min-width: max-content;

    color: var(--plum);

    text-decoration: none;
}

.logo-icon {
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 17px;

    font-size: 25px;

    background:
        linear-gradient(
            135deg,
            var(--pink),
            var(--pink-bright)
        );

    box-shadow:
        0 8px 22px rgba(242, 143, 163, 0.32);

    transform:
        rotate(-5deg);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.logo-container:hover .logo-icon {
    transform:
        rotate(5deg)
        scale(1.07);

    box-shadow:
        0 12px 28px rgba(242, 143, 163, 0.45);
}

.logo-title {
    display: block;

    font-size: 22px;
    font-weight: 900;

    letter-spacing: 4px;

    color: var(--rose-dark);
}

.logo-subtitle {
    display: block;

    margin-top: 5px;

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 2px;

    text-transform: uppercase;

    color: var(--rose);
}


/* ============================================================
   NAVIGATION
   ============================================================ */

nav {
    display: flex;
    align-items: center;

    gap: 5px;

    padding: 6px;

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.58);

    border:
        1px solid rgba(169, 79, 107, 0.12);

    box-shadow:
        0 7px 20px rgba(169, 79, 107, 0.08);

    overflow-x: auto;

    scrollbar-width: none;
}

nav::-webkit-scrollbar {
    display: none;
}

nav a {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding:
        11px 15px;

    border-radius: 13px;

    color: var(--plum-soft);

    text-decoration: none;

    font-size: 13px;
    font-weight: 700;

    white-space: nowrap;

    transition:
        color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


/* ============================================================
   ACTIVE NAVIGATION
   ============================================================ */

nav a.active {
    color: var(--white) !important;

    background:
        linear-gradient(
            135deg,
            var(--pink-bright),
            var(--rose)
        ) !important;

    box-shadow:
        0 7px 18px rgba(169, 79, 107, 0.30) !important;
}

nav a.active::after {
    content: "";

    position: absolute;

    left: 14px;
    right: 14px;
    bottom: 4px;

    height: 2px;

    border-radius: 10px;

}


/* ============================================================
   NAV HOVER
   ============================================================ */

nav a:not(.active):hover {
    color: var(--rose-dark);

    background:
        rgba(249, 205, 196, 0.62);

    transform:
        translateY(-2px);
}


/* ============================================================
   LOGIN / SIGNUP BUTTON
   ------------------------------------------------------------
   Only applies to .btn-action.
   Does NOT affect Book Appointment.
   ============================================================ */

nav a.btn-action {
    color: var(--white);

    background:
        linear-gradient(
            135deg,
            var(--pink-bright),
            var(--rose)
        );

    box-shadow:
        0 6px 16px rgba(169, 79, 107, 0.22);
}

nav a.btn-action:hover {
    color: var(--white);

    background:
        linear-gradient(
            135deg,
            var(--pink-dark),
            var(--rose-dark)
        );

    transform:
        translateY(-2px);

    box-shadow:
        0 9px 20px rgba(169, 79, 107, 0.28);
}


/* ============================================================
   MAIN CONTAINER
   ============================================================ */

.container {
    width:
        min(
            calc(100% - 32px),
            1180px
        );

    margin:
        55px auto 90px;
}


/* ============================================================
   QUEUE CARD
   ============================================================ */

.queue-card {
    position: relative;

    width: 100%;

    padding:
        36px;

    border-radius: 30px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.98),
            rgba(255, 249, 247, 0.96)
        );

    border:
        1px solid rgba(169, 79, 107, 0.13);

    box-shadow:
        0 25px 65px rgba(213, 119, 149, 0.576);

    overflow: hidden;

    animation:
        cardAppear 0.65s ease both;
}


/* TOP ACCENT */

.queue-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 7%;

    width: 86%;
    height: 4px;

    border-radius:
        0 0 12px 12px;

    background:
        linear-gradient(
            90deg,
            var(--pink),
            var(--pink-bright),
            var(--rose),
            var(--champagne)
        );
}


/* CORNER GLOW */

.queue-card::after {
    content: "";

    position: absolute;

    width: 320px;
    height: 320px;

    right: -190px;
    top: -190px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(249, 205, 196, 0.35),
            transparent 70%
        );

    pointer-events: none;

    animation:
        cardGlow 8s ease-in-out infinite alternate;
}

@keyframes cardAppear {
    from {
        opacity: 0;

        transform:
            translateY(22px)
            scale(0.985);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}

@keyframes cardGlow {
    from {
        transform:
            translate3d(0, 0, 0);
    }

    to {
        transform:
            translate3d(-20px, 25px, 0);
    }
}


/* ============================================================
   QUEUE HEADER
   ============================================================ */

.queue-header {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 28px;

    padding:
        4px 2px 24px;

    border-bottom:
        1px solid rgba(169, 79, 107, 0.10);
}

.queue-header h2 {
    color: var(--rose-dark);

    font-size:
        clamp(
            25px,
            4vw,
            34px
        );

    font-weight: 900;

    letter-spacing: -0.4px;
}


/* ============================================================
   LIVE INDICATOR
   ============================================================ */

.live-indicator {
    display: inline-flex;
    align-items: center;

    gap: 9px;

    padding:
        9px 14px;

    border-radius: 999px;

    color: var(--rose-dark);

    background:
        rgba(249, 205, 196, 0.38);

    border:
        1px solid rgba(169, 79, 107, 0.12);

    font-size: 11px;
    font-weight: 900;

    letter-spacing: 0.8px;

    white-space: nowrap;
}


/* LIVE DOT */

.dot {
    position: relative;

    width: 9px;
    height: 9px;

    display: inline-block;

    border-radius: 50%;

    background:
        #E75C72;

    box-shadow:
        0 0 0 0 rgba(231, 92, 114, 0.45);

    animation:
        livePulse 1.7s ease-out infinite;
}

@keyframes livePulse {
    0% {
        box-shadow:
            0 0 0 0 rgba(231, 92, 114, 0.45);
    }

    70% {
        box-shadow:
            0 0 0 7px rgba(231, 92, 114, 0);
    }

    100% {
        box-shadow:
            0 0 0 0 rgba(231, 92, 114, 0);
    }
}


/* ============================================================
   TABLE
   ============================================================ */

table {
    position: relative;
    z-index: 2;

    width: 100%;

    border-collapse: separate;

    border-spacing: 0 9px;

    table-layout: fixed;
}


/* ============================================================
   TABLE HEADER
   ============================================================ */

   thead th:first-child {
    width: 12%;
    border-left: 1px solid rgba(169, 79, 107, 0.10);
    border-radius: 14px 0 0 14px;
}
thead th:nth-child(2) {
    width: 25%;
}
thead th:nth-child(3) {
    width: 28%;
}
thead th:nth-child(4) {
    width: 18%;
}
thead th:last-child {
    width: 17%;
    border-right: 1px solid rgba(169, 79, 107, 0.10);
    border-radius: 0 14px 14px 0;
}


/* ============================================================
   TABLE BODY
   ============================================================ */

tbody tr {
    animation:
        rowAppear 0.35s ease both;
}

tbody td {
    position: relative;

    padding:
        17px 16px;

    color: var(--plum-soft);

    background:
        rgba(255, 255, 255, 0.92);

    border-top:
        1px solid rgba(169, 79, 107, 0.08);

    border-bottom:
        1px solid rgba(169, 79, 107, 0.08);

    font-size: 13px;

    font-weight: 600;

    transition:
        background 0.20s ease,
        transform 0.20s ease,
        box-shadow 0.20s ease;
}

tbody td:first-child {
    border-left:
        1px solid rgba(169, 79, 107, 0.08);

    border-radius:
        14px 0 0 14px;

    color: var(--rose-dark);

    font-size: 15px;
}

tbody td:last-child {
    border-right:
        1px solid rgba(169, 79, 107, 0.08);

    border-radius:
        0 14px 14px 0;
}


/* ============================================================
   ROW HOVER
   ============================================================ */

tbody tr:hover td {
    background:
        linear-gradient(
            135deg,
            #FFFFFF,
            var(--cream-soft)
        );

    box-shadow:
        0 7px 18px rgba(169, 79, 107, 0.065);
}

tbody tr:hover td:first-child {
    transform:
        translateX(2px);
}


/* ============================================================
   ROW ENTRANCE
   ============================================================ */

@keyframes rowAppear {
    from {
        opacity: 0;

        transform:
            translateY(8px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


/* ============================================================
   QUEUE NUMBER
   ============================================================ */

tbody td strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 42px;
    min-height: 30px;

    padding:
        4px 8px;

    border-radius: 10px;

    color: var(--white);

    background:
        linear-gradient(
            135deg,
            var(--pink-bright),
            var(--rose)
        );

    box-shadow:
        0 5px 13px rgba(169, 79, 107, 0.18);
}


/* ============================================================
   STATUS BADGES
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 92px;

    padding:
        7px 13px;

    border-radius: 999px;

    font-size: 11px;

    font-weight: 900;

    letter-spacing: 0.3px;

    text-align: center;

    border:
        1px solid transparent;
}


/* ============================================================
   PENDING
   ============================================================ */

.badge-pending {
    color: #9A6572;

    background:
        rgba(249, 205, 196, 0.48);

    border-color:
        rgba(169, 79, 107, 0.13);
}


/* ============================================================
   CONFIRMED
   ============================================================ */

.badge-confirmed {
    color: #6C6A32;

    background:
        rgba(246, 235, 177, 0.52);

    border-color:
        rgba(155, 142, 62, 0.16);
}


/* ============================================================
   COMPLETED
   ============================================================ */

.badge-completed {
    color: #417052;

    background:
        rgba(205, 239, 215, 0.70);

    border-color:
        rgba(72, 132, 91, 0.16);
}


/* ============================================================
   CANCELLED
   ============================================================ */

.badge-cancelled {
    color: #A14B57;

    background:
        rgba(255, 218, 221, 0.72);

    border-color:
        rgba(161, 75, 87, 0.16);
}


/* ============================================================
   OTHER STATUSES
   ============================================================ */

[class*="badge-"] {
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

[class*="badge-"]:hover {
    transform:
        translateY(-1px);

    box-shadow:
        0 5px 12px rgba(169, 79, 107, 0.10);
}


/* ============================================================
   LOADING / EMPTY STATE
   ============================================================ */

#queueData td[colspan="5"] {
    height: 145px;

    color: var(--muted) !important;

    background:
        linear-gradient(
            135deg,
            rgba(255, 249, 247, 0.96),
            rgba(255, 241, 238, 0.90)
        );

    border:
        1px dashed rgba(169, 79, 107, 0.18);

    border-radius: 16px;

    font-size: 13px;

    font-weight: 700;
}


/* ============================================================
   TABLE REFRESH FEEDBACK
   ------------------------------------------------------------
   Works with your existing 3-second fetch.
   ============================================================ */

#queueData {
    transition:
        opacity 0.18s ease;
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 1050px) {

    header {
        padding:
            14px 3%;
    }

    nav {
        max-width: 65vw;
    }

    nav a {
        padding:
            10px 11px;

        font-size: 12px;
    }

    .queue-card {
        padding:
            30px 25px;
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 760px) {

    header {
        position: relative;

        flex-direction: column;

        align-items: stretch;

        gap: 12px;

        padding:
            13px 18px;
    }

    .logo-container {
        justify-content: center;
    }

    nav {
        width: 100%;
        max-width: none;

        justify-content: flex-start;
    }

    nav a {
        padding:
            9px 11px;

        font-size: 11px;
    }

    .container {
        width:
            calc(100% - 24px);

        margin:
            28px auto 50px;
    }

    .queue-card {
        padding:
            25px 17px;

        border-radius: 24px;
    }

    .queue-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 14px;

        margin-bottom: 20px;

        padding-bottom: 19px;
    }

    .queue-header h2 {
        font-size: 26px;
    }

    .live-indicator {
        font-size: 10px;
    }


    /*
       Horizontal scrolling keeps the
       table readable on phones.
    */

    .queue-card {
        overflow-x: auto;
    }

    .queue-header {
        min-width: 650px;
    }

    table {
        min-width: 700px;
    }
}


/* ============================================================
   SMALL MOBILE
   ============================================================ */

@media (max-width: 480px) {

    .logo-title {
        font-size: 19px;

        letter-spacing: 3px;
    }

    .logo-subtitle {
        font-size: 8px;

        letter-spacing: 1.5px;
    }

    .logo-icon {
        width: 46px;
        height: 46px;

        font-size: 22px;
    }

    .container {
        width:
            calc(100% - 14px);
    }

    .queue-card {
        padding:
            22px 13px;

        border-radius: 20px;
    }

    .queue-header h2 {
        font-size: 23px;
    }

    .live-indicator {
        padding:
            8px 11px;
    }
}


/* ============================================================
   REDUCE MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;

        scroll-behavior: auto !important;
    }
}
