/* ============================================
   NextSlot - Modern Mobile-Friendly Stylesheet
   ============================================ */

/* ===== CSS Variables (Theme Colors) ===== */
:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --light: #f3f4f6;
    --dark: #1f2937;
    --white: #ffffff;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

/* ===== Base Styles ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #fafafa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Improved Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* Mobile Typography */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
}

/* ===== Enhanced Navbar ===== */
.navbar {
    background: var(--gradient-primary) !important;
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--white) !important;
    transition: transform var(--transition-fast);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand i {
    margin-right: 0.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white) !important;
    transform: translateY(-2px);
}

.nav-link i {
    margin-right: 0.25rem;
}

/* Dropdown menus */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateX(5px);
}

.dropdown-item i {
    margin-right: 0.5rem;
    width: 20px;
}

.dropdown-divider {
    margin: 0.5rem 0;
}

/* Mobile navbar */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(0, 0, 0, 0.05);
        padding: 1rem;
        border-radius: var(--radius-lg);
        margin-top: 1rem;
    }
    
    .dropdown-menu {
        background-color: rgba(255, 255, 255, 0.95);
    }
}

/* ===== Enhanced Buttons ===== */
.btn {
    border-radius: var(--radius-md);
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    border: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: var(--gradient-primary);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--gradient-success);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--gradient-danger);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--gradient-warning);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-warning:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
    transform: translateY(-2px);
}

/* Button sizes for mobile */
@media (max-width: 768px) {
    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
}

/* ===== Enhanced Cards ===== */
.card {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.card-header {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 1.25rem;
    font-weight: 700;
}

.card-header.bg-success {
    background: var(--gradient-success) !important;
}

.card-header.bg-danger {
    background: var(--gradient-danger) !important;
}

.card-header.bg-warning {
    background: var(--gradient-warning) !important;
    color: var(--white) !important;
}

.card-header.bg-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: var(--light);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
}

/* Service/Stylist Cards */
.service-card,
.stylist-card {
    height: 100%;
    cursor: pointer;
}

.service-card:hover,
.stylist-card:hover {
    transform: translateY(-8px);
}

.service-card img,
.stylist-card img {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transition: transform var(--transition-base);
}

.service-card:hover img,
.stylist-card:hover img {
    transform: scale(1.05);
}

/* ===== Enhanced Tables ===== */
.table {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table thead th {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: all var(--transition-fast);
}

.table tbody tr:hover {
    background-color: var(--light);
    transform: scale(1.01);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--light);
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table td,
    .table th {
        padding: 0.75rem 0.5rem;
    }
}

/* ===== Enhanced Badges ===== */
.badge {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.3px;
}

.badge i {
    margin-right: 0.25rem;
}

/* Badge animations */
.badge-pulse {
    animation: pulse 2s infinite;
}

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

/* ===== Enhanced Alerts ===== */
.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
}

.alert i {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.alert-dismissible .btn-close {
    padding: 1rem;
}

/* Alert animations */
.alert {
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== Enhanced Forms ===== */
.form-control,
.form-select {
    border: 2px solid var(--light);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--primary);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Mobile form improvements */
@media (max-width: 768px) {
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ===== Hero Section ===== */
.hero-section {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    position: relative;
}

.hero-section p {
    font-size: 1.25rem;
    opacity: 0.95;
    position: relative;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
}

/* ===== Footer ===== */
footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: var(--white);
    padding: 2rem 0;
    margin-top: auto;
}

footer p {
    margin: 0;
    opacity: 0.9;
}

/* ===== Loading Spinner ===== */
.spinner-border {
    border-width: 3px;
}

/* ===== Queue Number Display ===== */
.queue-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: var(--radius-lg);
}

/* ===== Statistics Cards ===== */
.stat-card {
    text-align: center;
    padding: 2rem;
    border-radius: var(--radius-xl);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.stat-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
}

.stat-card h2 {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    color: var(--white);
    position: relative;
}

.stat-card p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
}

@media (max-width: 768px) {
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-card h2 {
        font-size: 2rem;
    }
}

/* ===== Calendar Styling ===== */
.fc {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.fc-button {
    background: var(--gradient-primary) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    padding: 0.5rem 1rem !important;
}

.fc-button:hover {
    opacity: 0.9;
}

/* ===== Touch Improvements ===== */
@media (hover: none) {
    .btn:hover {
        transform: none;
    }
    
    .card:hover {
        transform: none;
    }
    
    /* Larger touch targets */
    .btn,
    .nav-link,
    .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ===== Accessibility ===== */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
}

/* ===== Smooth Scrolling ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Container Improvements ===== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ===== Utility Classes ===== */
.shadow-soft {
    box-shadow: var(--shadow-md);
}

.shadow-strong {
    box-shadow: var(--shadow-xl);
}

.rounded-lg {
    border-radius: var(--radius-lg) !important;
}

.rounded-xl {
    border-radius: var(--radius-xl) !important;
}

.gradient-primary {
    background: var(--gradient-primary);
    color: var(--white);
}

.gradient-success {
    background: var(--gradient-success);
    color: var(--white);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Print Styles ===== */
@media print {
    .navbar,
    .btn,
    footer {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ===== Dark Mode Support (Optional) ===== */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* ===== Animation Utilities ===== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== Mobile-Specific Improvements ===== */
@media (max-width: 576px) {
    /* Stack buttons on mobile */
    .d-grid {
        gap: 0.75rem;
    }
    
    /* Better spacing on mobile */
    .my-5 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }
    
    /* Adjust card padding */
    .card-body {
        padding: 1rem;
    }
    
    /* Smaller stat cards */
    .stat-card i {
        font-size: 2rem;
    }
}

/* ===== Performance Optimizations ===== */
img {
    max-width: 100%;
    height: auto;
}

.card img {
    will-change: transform;
}

/* ===== End of Stylesheet ===== */
