/* ==========================================================================
   BEAUTY SALON MANAGER — CSS DESIGN SYSTEM & LAYOUTS
   ========================================================================== */

/* Color Palette & Custom Tokens */
:root {
    --bg-main: #0f1013;
    --bg-card: rgba(26, 27, 35, 0.7);
    --bg-card-solid: #1a1b23;
    --border-color: rgba(255, 255, 255, 0.08);
    --primary: #d4a373; /* Rose Gold / Warm Beige */
    --primary-light: #e6ccb2;
    --primary-dark: #b07d62;
    --accent: #e07a5f; /* Coral Accent */
    --text-primary: #f8f9fa;
    --text-secondary: #a6a9b6;
    --text-muted: #6c757d;
    --success: #52b788;
    --danger: #e63946;
    --warning: #ffb703;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-inset: inset 0 2px 4px 0 rgba(255, 255, 255, 0.05);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #08090b;
    font-family: var(--font-family);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Desktop Device Shell Simulation */
.device-wrapper {
    width: 100%;
    max-width: 430px;
    height: 100vh;
    max-height: 900px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-frame {
    width: 100%;
    height: 100%;
    background-color: var(--bg-main);
    border: 12px solid #22252a;
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Phone Header (Notch) Simulator */
.phone-header {
    height: 44px;
    background-color: #16181c;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    user-select: none;
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.phone-header .camera-lens {
    width: 80px;
    height: 20px;
    background-color: #000;
    border-radius: 10px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.phone-header .status-icons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.phone-header .status-icons svg {
    width: 16px;
    height: 16px;
}

/* App Header */
.app-header {
    background-color: #121318;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-area h1 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sub-logo {
    font-size: 10px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    display: block;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 10px 4px 4px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.user-profile-badge:hover {
    background: rgba(255, 255, 255, 0.08);
}

.avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    font-weight: bold;
}

.role-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-light);
}

/* App Main Content Window */
.app-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.app-content::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

/* Bottom Navigation Bar */
.bottom-nav {
    height: 65px;
    background-color: #121318;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: 8px;
    z-index: 10;
}

.nav-item {
    background: none;
    border: none;
    outline: none;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 20%;
    padding: 4px;
}

.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    transition: var(--transition-smooth);
}

.nav-item span {
    font-size: 10px;
    font-weight: 500;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active .nav-icon {
    transform: translateY(-2px);
}

/* Base Loader Styles */
.loader-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Forms & Inputs styling */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-field {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    outline: none;
    transition: var(--transition-smooth);
    font-family: var(--font-family);
}

.input-field:focus {
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.15);
}

/* Button Premium Styles */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    outline: none;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
    box-shadow: 0 4px 15px rgba(212, 163, 115, 0.2);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212, 163, 115, 0.3);
}

.btn:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #b32631);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.2);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.3);
}

/* Card Styling (Glassmorphism) */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, rgba(255,255,255,0.15), rgba(255,255,255,0));
}

/* AUTHENTICATION VIEW */
.auth-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
    margin-top: auto;
    margin-bottom: auto;
    width: 100%;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.phone-input-wrapper {
    display: flex;
    gap: 8px;
}

.phone-prefix {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    font-size: 15px;
}

.virtual-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.keypad-btn {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    padding: 14px 0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.keypad-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.keypad-btn:active {
    background-color: rgba(255, 255, 255, 0.15);
}

/* SMS Simulation box */
.sms-simulation-box {
    background-color: rgba(212, 163, 115, 0.08);
    border: 1px dashed var(--primary);
    border-radius: var(--radius-md);
    padding: 12px;
    font-size: 13px;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

/* CALENDAR VIEW */
.calendar-view-header {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.day-selector-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
}

.day-selector-scroll::-webkit-scrollbar {
    display: none;
}

.day-pill {
    flex: 0 0 60px;
    height: 70px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.day-pill:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.day-pill.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(212, 163, 115, 0.2);
}

.day-pill .day-name {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.day-pill.active .day-name {
    color: rgba(255, 255, 255, 0.8);
}

.day-pill .day-number {
    font-size: 18px;
    font-weight: 700;
}

.master-selector-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.master-selector-row::-webkit-scrollbar {
    display: none;
}

.master-pill {
    white-space: nowrap;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.master-pill.active {
    background-color: rgba(212, 163, 115, 0.15);
    color: var(--primary);
    border-color: var(--primary);
}

/* Schedule Time Slots Grid */
.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.time-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
}

.time-label {
    width: 48px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
}

.slot-container {
    flex: 1;
    height: 100%;
}

.slot-btn {
    width: 100%;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.slot-btn:hover {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: var(--primary-dark);
    color: var(--text-secondary);
}

/* Booking Card Styles (Master & Admin) */
.booking-card {
    width: 100%;
    min-height: 48px;
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
}

.booking-card.status-pending {
    background: linear-gradient(135deg, rgba(255, 183, 3, 0.1), rgba(255, 183, 3, 0.03));
    border: 1px solid rgba(255, 183, 3, 0.3);
    border-left: 4px solid var(--warning);
}

.booking-card.status-confirmed {
    background: linear-gradient(135deg, rgba(82, 183, 136, 0.1), rgba(82, 183, 136, 0.03));
    border: 1px solid rgba(82, 183, 136, 0.3);
    border-left: 4px solid var(--success);
}

.booking-card.status-busy {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--text-muted);
    cursor: not-allowed;
}

.booking-card:hover:not(.status-busy) {
    transform: scale(1.02);
}

.booking-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.booking-client-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.booking-duration {
    font-size: 11px;
    color: var(--text-secondary);
}

.booking-service-name {
    font-size: 11px;
    color: var(--text-secondary);
}

.booking-master-tag {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.08);
    align-self: flex-start;
    margin-top: 4px;
    color: var(--text-primary);
}

/* Modals Overlay & Modal Panel */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Slide up modal */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    width: 100%;
    background-color: var(--bg-card-solid);
    border-radius: 24px 24px 0 0;
    border-top: 1px solid var(--border-color);
    padding: 24px;
    max-height: 90%;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
}

/* CATALOG SERVICES */
.category-block {
    margin-bottom: 20px;
}

.category-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-item {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.service-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.service-details h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.service-details p {
    font-size: 12px;
    color: var(--text-secondary);
}

.service-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.service-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-light);
}

.service-duration {
    font-size: 11px;
    color: var(--text-muted);
}

/* CLIENTS VIEW */
.search-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding-left: 40px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.clients-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.client-row {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.client-row:hover {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: var(--primary);
}

.client-info-main h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.client-info-main p {
    font-size: 12px;
    color: var(--text-secondary);
}

.client-history-summary {
    font-size: 11px;
    background-color: rgba(212, 163, 115, 0.08);
    color: var(--primary-light);
    padding: 4px 8px;
    border-radius: 10px;
}

/* Card details view for clients */
.client-detail-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.client-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-detail-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
}

.client-visit-history {
    margin-top: 10px;
}

.visit-log-item {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.visit-log-item:last-child {
    border-bottom: none;
}

/* NOTIFICATIONS AND SETTINGS */
.settings-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-top: 10px;
    margin-bottom: 8px;
}

.settings-description {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Notification log panel */
.notification-log-panel {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    height: 150px;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: monospace;
    font-size: 11px;
}

.log-entry {
    border-left: 2px solid var(--primary);
    padding-left: 6px;
    color: var(--text-secondary);
}

.log-time {
    color: var(--primary-light);
}



/* Toast Banner Animations */
.toast-banner {
    position: absolute;
    top: -80px; /* Hidden initially */
    left: 16px;
    right: 16px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-banner.show {
    transform: translateY(130px); /* Slide down from notch */
}

.toast-icon {
    font-size: 20px;
}

.toast-body {
    flex: 1;
}

.toast-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-light);
}

.toast-text {
    font-size: 11px;
    color: #fff;
    margin-top: 2px;
}

/* Tab Header Selection in views */
.tab-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 0;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-smooth);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Media Queries for Mobile Screens */
@media (max-width: 768px) {
    body {
        align-items: stretch;
        background-color: var(--bg-main);
    }
    
    .device-wrapper {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
    }
    
    .phone-frame {
        border: none;
        border-radius: 0;
    }
    
    .phone-header {
        display: none; /* Hide notch simulator on real phones */
    }
    

}
