/* ==========================================================================
   1. GLOBAL RESET & BASE TYPOGRAPHY
   ========================================================================== */
* { box-sizing: border-box; }

html, body {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    background: #FFF5F7; /* Soft blush tint background */
    color: #2C2C2C; /* High contrast dark charcoal for primary text */
}

/* ==========================================================================
   2. SIDEBAR (Pinned Left - Bright/Modern Pink Theme)
   ========================================================================== */
.sidebar { 
    width: 309px; 
    background-color: #FF69B4; /* Vibrant Hot Pink */
    height: 100vh; 
    position: fixed; 
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: left 0.3s ease; 
}

.sidebar ul li a { 
    color: #FFFFFF; /* Crisp white text for maximum readability on pink */
    padding: 15px 20px; 
    display: block; 
    text-decoration: none;
    font-weight: 500;
}

.sidebar ul li a:hover { 
    background-color: #D81B60; /* Deep Magenta accent on hover */
    color: #FFFFFF;
}

/* --- Sub-menu Fixes for Sidebar --- */
.sidebar .nav-second-level {
    padding-left: 0 !important;
    list-style: none;
    background-color: rgba(0, 0, 0, 0.1);
}

.sidebar .nav-second-level li a {
    padding: 12px 15px 12px 40px !important;
    display: block;
    font-size: 0.9em;
    color: #FFF0F5;
    white-space: nowrap;
}

.sidebar .nav-second-level li a i {
    margin-right: 12px;
    width: 16px;
    text-align: center;
}

/* ==========================================================================
   3. HEADER (Sticky Top, Profile Right)
   ========================================================================== */
.header-section {
    position: fixed;
    top: 0;
    left: 309px;
    right: 0;
    height: 70px;
    z-index: 999;
    background: #FFFFFF;
    box-shadow: 0 1px 4px rgba(255, 105, 180, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    transition: left 0.3s ease, width 0.3s ease;
    color: #2C2C2C;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.header-right-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile_details_left, .profile_details {
    display: flex;
    align-items: center;
    color: #2C2C2C;
}

.profile_img {
    display: flex;
    align-items: center;
    gap: 10px;
}

button#showLeftPlan,
button#showLeftPush { 
    position: relative;
    z-index: 1100;
    pointer-events: auto;
    border: none; 
    background: none; 
    font-size: 1.5em; 
    color: #D81B60; /* Deep Magenta */
    cursor: pointer; 
}

button#showLeftPush * {
    pointer-events: none;
}

.logo h1 { 
    font-size: 1.2em; 
    margin: 0; 
    color: #D81B60; /* Deep Magenta */
    font-weight: 600;
}

.logo span { 
    font-size: 0.8em; 
    display: block; 
    color: #7A7A7A; 
}

/* ==========================================================================
   4. CONTENT WRAPPER (Interior Salon Background)
   ========================================================================== */
#page-wrapper {
    margin-left: 309px;
    margin-top: 70px;
    margin-bottom: 60px;
    min-height: calc(100vh - 130px);
    background: url('../images/bg.jpg') no-repeat center center fixed;
    background-size: cover;
    padding: 20px;
    color: #2C2C2C;
    transition: margin-left 0.3s ease;
}

/* Base text styling inside wrapper headings */
#page-wrapper h1, 
#page-wrapper h2, 
#page-wrapper h3, 
#page-wrapper h4, 
#page-wrapper h5 {
    color: #880E4F; /* Dark Rich Magenta */
    font-weight: 600;
}

/* Cards & Content containers overlaying background */
#page-wrapper .card,
#page-wrapper .panel,
#page-wrapper .content-block {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 20px;
    color: #2C2C2C;
    box-shadow: 0 4px 15px rgba(216, 27, 96, 0.1);
}

/* ==========================================================================
   5. FOOTER (Sticky Bottom)
   ========================================================================== */
.footer {
    position: fixed;
    bottom: 0;
    left: 309px;
    right: 0;
    height: 60px;
    background: #FFFFFF;
    color: #5A5A5A;
    font-size: 0.9em;
    box-shadow: 0 -1px 4px rgba(255, 105, 180, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: left 0.3s ease;
}

/* ==========================================================================
   6. UI COMPONENTS & LOGIN / REGISTER FULL-SCREEN COVER
   ========================================================================== */
.user-name { 
    display: block; 
    color: #2C2C2C; 
    font-weight: 500;
}

/* Toggled state rules */
body.sidebar-is-closed .sidebar {
    left: -309px !important;
}

body.sidebar-is-closed .header-section,
body.sidebar-is-closed .footer {
    left: 0 !important;
}

body.sidebar-is-closed #page-wrapper {
    margin-left: 0 !important;
}

/* Force full viewport coverage and break out of parent wrappers */
#adminlog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 20px;
    background: url('../images/bg.jpg') no-repeat center center fixed;
    background-size: cover !important;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow-y: auto;
}

/* Centered Form Card styling */
#adminlog .login-page,
#adminlog .signup-page,
.login-page,
.signup-page { 
    width: 450px; 
    max-width: 95%; 
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px); /* Modern frosted glass effect */
    padding: 35px;
    border-radius: 12px;
    color: #2C2C2C;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin: auto;
}

/* --- Table & Data Grid Robustness --- */
.table-responsive {
    background: #FFFFFF;
    padding: 10px;
    border-radius: 8px;
}

.table thead tr th {
    background-color: #FFF0F5; /* Lavender Blush header background */
    color: #D81B60; /* Deep Magenta */
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    padding: 15px !important;
    border-bottom: 2px solid #FFCCE5;
}

.table tbody tr td {
    padding: 15px !important;
    vertical-align: middle !important;
    color: #333333;
}

.label {
    padding: 5px 10px;
    font-size: 85%;
    border-radius: 3px;
    font-weight: 500;
    color: #FFFFFF;
}

.label-success { background-color: #6B9E78; }
.label-warning { background-color: #D9822B; }

@media (max-width: 768px) {
    .btn-xs {
        padding: 5px 10px;
        font-size: 12px;
    }
}