/* ==========================================================================
   Admin Toolbar — Premium Floating Pill Dock
   ========================================================================== */

.admin-toolbar {
    position: fixed;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    pointer-events: none;
    transition: bottom 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
}

.admin-toolbar.active {
    bottom: 24px;
    pointer-events: auto;
}

/* The dock container */
.admin-dock {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(12, 12, 18, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    padding: 6px 8px;
    box-shadow:
        0 8px 32px rgba(0,0,0,0.6),
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 24px 64px rgba(229,29,101,0.08);
}

/* Status indicator pill on the left */
.admin-status-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px 7px 12px;
    margin-right: 4px;
    border-radius: 100px;
    background: rgba(0,230,118,0.08);
    border: 1px solid rgba(0,230,118,0.18);
    flex-shrink: 0;
}
.admin-status-dot {
    width: 7px;
    height: 7px;
    background: #00e676;
    border-radius: 50%;
    box-shadow: 0 0 8px #00e676;
    animation: adminPulse 2.5s ease-in-out infinite;
}
.admin-status-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: rgba(0,230,118,0.85);
    white-space: nowrap;
    text-transform: uppercase;
}
@keyframes adminPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px #00e676; }
    50%       { opacity: 0.6; box-shadow: 0 0 3px #00e676; }
}

/* Dividers between groups */
.admin-divider {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,0.09);
    margin: 0 6px;
    flex-shrink: 0;
}

/* Individual buttons */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 100px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(255,255,255,0.45);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.01em;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
    white-space: nowrap;
}
.admin-btn .btn-icon {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}
.admin-btn .btn-label {
    line-height: 1;
}
.admin-btn:hover {
    background: rgba(255,255,255,0.07);
    color: #fff;
    transform: translateY(-1px);
}
.admin-btn:active {
    transform: translateY(0);
}

/* Per-button accent colors on hover */
#admin-btn-bookings:hover  { background:rgba(99,179,237,0.15); color:#90cdf4; border-color:rgba(99,179,237,0.25); }
#admin-btn-settings:hover  { background:rgba(154,117,219,0.15); color:#b794f4; border-color:rgba(154,117,219,0.25); }
#admin-btn-clients:hover   { background:rgba(251,191,36,0.12); color:#fbbf24; border-color:rgba(251,191,36,0.2); }
#admin-btn-staff:hover     { background:rgba(72,187,120,0.12); color:#68d391; border-color:rgba(72,187,120,0.2); }
#admin-btn-analytics:hover { background:rgba(236,72,153,0.12); color:#f0abfc; border-color:rgba(236,72,153,0.2); }
#admin-btn-marketing:hover { background:rgba(251,146,60,0.12); color:#fb923c; border-color:rgba(251,146,60,0.2); }
#admin-btn-waitlist:hover  { background:rgba(252,211,77,0.10); color:#fcd34d; border-color:rgba(252,211,77,0.2); }

/* Save button — accent glow pill */
.admin-btn-save {
    background: linear-gradient(135deg, #E51D65, #ff6b9d) !important;
    color: #fff !important;
    border-color: transparent !important;
    padding: 8px 18px !important;
    box-shadow: 0 0 16px rgba(229,29,101,0.35);
}
.admin-btn-save:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 0 24px rgba(229,29,101,0.55) !important;
    filter: brightness(1.08);
}

/* Logout button */
.admin-btn-logout {
    color: rgba(255, 255, 255, 0.35) !important;
    padding: 8px 12px !important;
}
.admin-btn-logout:hover {
    background: rgba(239,68,68,0.12) !important;
    color: #f87171 !important;
    border-color: rgba(239,68,68,0.2) !important;
}

/* Responsive — hide labels on narrow screens */
@media (max-width: 900px) {
    .btn-label { display: none; }
    .admin-btn { padding: 8px 10px; }
    .admin-status-label { display: none; }
    .admin-status-pill { padding: 7px 10px; }
}
@media (max-width: 640px) {
    .admin-dock { padding: 5px 6px; gap: 0; }
    .admin-btn { padding: 8px 9px; }
    .admin-divider { margin: 0 3px; }
}

/* Editing State for Elements */
.is-editing [data-editable="true"] {
    outline: 2px dashed rgba(226, 185, 126, 0.5); /* Accent color dashed border */
    outline-offset: 4px;
    border-radius: 4px;
    cursor: text;
    transition: all 0.2s ease;
    position: relative;
}

.is-editing [data-editable="true"]:hover {
    outline-color: var(--accent);
    background: rgba(226, 185, 126, 0.05); /* Slight tint on hover */
}

.is-editing [data-editable="true"]:focus {
    outline: 2px solid var(--accent);
    background: rgba(226, 185, 126, 0.1);
    box-shadow: 0 0 15px rgba(226, 185, 126, 0.2);
}

/* Auth Modal Styles (Hidden by default) */
.admin-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.admin-auth-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.admin-auth-modal {
    background: var(--light-cream);
    padding: 40px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-dark);
}

.admin-auth-overlay.active .admin-auth-modal {
    transform: translateY(0);
}

.admin-auth-modal h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--elegant-dark);
}

.admin-auth-input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
}

.admin-auth-error {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: none;
}

/* ==========================================================================
   Admin Today Bar — Floating Dashboard Capsule
   ========================================================================== */

#admin-today-bar {
    position: fixed;
    top: 104px;
    left: 50%;
    transform: translateX(-50%) translateY(-14px);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    width: auto;
    max-width: 720px;
}

#admin-today-bar.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Outer glow wrapper with gradient border */
.today-bar-capsule {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 8px 16px;
    border-radius: 100px;
    background: rgba(12, 12, 18, 0.88);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 12px 40px rgba(229, 29, 101, 0.06);
}

/* Breathing gradient glow behind the capsule */
.today-bar-capsule::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 100px;
    background: linear-gradient(135deg, rgba(229,29,101,0.2), rgba(168,85,247,0.15), rgba(59,130,246,0.1));
    z-index: -1;
    opacity: 0.5;
    filter: blur(1px);
    animation: todayBarGlow 4s ease-in-out infinite alternate;
}

@keyframes todayBarGlow {
    0%   { opacity: 0.3; }
    100% { opacity: 0.6; }
}

/* "TODAY" label */
.today-bar-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    padding-right: 6px;
    white-space: nowrap;
}

/* Thin vertical line separator */
.today-bar-sep {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

/* Stat badges */
.today-bar-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.15s ease;
    cursor: default;
}
.today-bar-stat:hover {
    transform: scale(1.04);
}

.today-bar-stat .stat-num {
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.today-bar-stat .stat-label {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.7;
    letter-spacing: 0.02em;
}

/* Stat color variants */
.today-bar-stat--appts {
    background: rgba(229, 29, 101, 0.1);
    border: 1px solid rgba(229, 29, 101, 0.2);
    color: #f472b6;
}
.today-bar-stat--pending {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.18);
    color: #fbbf24;
}
.today-bar-stat--done {
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.18);
    color: #34d399;
}

/* "Next up" text */
.today-bar-next {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* View All button */
.today-bar-view-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    padding: 5px 14px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.today-bar-view-btn:hover {
    background: rgba(229, 29, 101, 0.12);
    border-color: rgba(229, 29, 101, 0.3);
    color: #f472b6;
    transform: translateY(-1px);
}
.today-bar-view-btn .arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
}
.today-bar-view-btn:hover .arrow {
    transform: translateX(2px);
}

/* Responsive */
@media (max-width: 720px) {
    #admin-today-bar {
        max-width: calc(100vw - 24px);
    }
    .today-bar-next {
        display: none;
    }
    .today-bar-label {
        display: none;
    }
}
@media (max-width: 480px) {
    .today-bar-stat .stat-label {
        display: none;
    }
    .today-bar-view-btn {
        padding: 5px 10px;
        font-size: 9px;
    }
}
