/**
 * Barber Booking App - Main Stylesheet
 * Clean, modern design with dark blue header theme
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --primary-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --primary-dark: #1e3c72;
    --primary-light: #2a5298;
    --accent-green: #22c55e;
    --accent-green-dark: #16a34a;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --text-light: #999999;
    --bg-light: #f5f5f5;
    --bg-card: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   PAGE HEADER - DARK BLUE STYLE
   ============================================ */
.page-header {
    background: var(--primary-gradient);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 60px;
}

.page-header h1,
.page-header .page-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: white;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-header .back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    text-decoration: none;
    padding: 8px;
    margin: -8px;
    margin-right: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    border-radius: 8px;
    transition: background 0.2s;
}

.page-header .back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */
.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   HEADER (Legacy support)
   ============================================ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    flex: 1;
}

.back-button,
.close-button {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 5px 10px;
    color: #333;
    transition: color 0.3s ease;
}

.back-button:hover,
.close-button:hover {
    color: #666;
}

/* ============================================
   WELCOME TEXT
   ============================================ */
.welcome-text {
    font-size: 32px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
    color: #000;
}

/* ============================================
   FORM STYLES
   ============================================ */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #000;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: none;
    border-radius: 12px;
    background-color: #f0f0f0;
    color: #333;
    transition: background-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    background-color: #e8e8e8;
}

.form-group input::placeholder {
    color: #999;
}

/* ============================================
   BUTTONS - DARK BLUE THEME
   ============================================ */
.btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Primary Button - Dark Blue Gradient */
.btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #163057 0%, #1e3c72 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 60, 114, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(30, 60, 114, 0.3);
}

.btn-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Secondary Button - Outlined */
.btn-secondary {
    background: white;
    color: #1e3c72;
    border: 2px solid #1e3c72;
}

.btn-secondary:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
}

/* Success Button - Green */
.btn-success {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #163057 0%, #1e3c72 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

/* Danger Button - Red */
.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* Warning Button - Orange */
.btn-warning {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
    transform: translateY(-2px);
}

/* Light Button - Subtle */
.btn-light {
    background: #f5f5f5;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
}

.btn-light:hover {
    background: #eeeeee;
    transform: translateY(-2px);
}

/* Small Button */
.btn-sm {
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 8px;
}

/* Large Button */
.btn-lg {
    padding: 20px 32px;
    font-size: 18px;
    border-radius: 16px;
}

/* Icon Button */
.btn-icon {
    width: auto;
    padding: 12px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* CTA Button - Full Width Dark Blue */
.cta-button {
    width: 100%;
    max-width: 500px;
    padding: 18px 32px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}

.cta-button:hover {
    background: linear-gradient(135deg, #163057 0%, #1e3c72 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 60, 114, 0.4);
}

/* Pay Button - Special Style */
.pay-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}

.pay-btn:hover {
    background: linear-gradient(135deg, #163057 0%, #1e3c72 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 60, 114, 0.4);
}

.pay-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Quick Action Buttons */
.quick-action-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-reschedule {
    background: #e0f2fe;
    color: #0369a1;
    border: none;
}

.btn-reschedule:hover {
    background: #bae6fd;
    transform: translateY(-1px);
}

.btn-cancel {
    background: #fee2e2;
    color: #dc2626;
    border: none;
}

.btn-cancel:hover {
    background: #fecaca;
    transform: translateY(-1px);
}

/* Logout Button */
.logout-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Filter Chips / Tags */
.filter-chip {
    padding: 10px 20px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 15px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.filter-chip:hover {
    border-color: #1e3c72;
    color: #1e3c72;
}

.filter-chip.active {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border-color: transparent;
}

/* ============================================
   LINKS
   ============================================ */
.text-link {
    display: block;
    text-align: center;
    margin-top: 30px;
    font-size: 15px;
    color: #666;
}

.text-link a {
    color: #1e3c72;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.text-link a:hover {
    color: #2a5298;
    text-decoration: underline;
}

.forgot-password {
    display: block;
    text-align: right;
    color: #1e3c72;
    font-size: 14px;
    margin-bottom: 30px;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    color: #1e3c72;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    transition: color 0.3s;
}

.back-link:hover {
    color: #2a5298;
}

.view-all-link {
    font-size: 14px;
    color: #1e3c72;
    text-decoration: none;
    font-weight: 600;
}

.view-all-link:hover {
    text-decoration: underline;
}

.text-link a:hover {
    color: #333;
}

.forgot-password {
    display: block;
    text-align: left;
    margin-top: 12px;
    margin-bottom: 24px;
    font-size: 15px;
    color: #666;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #333;
}

/* ============================================
   LOGOUT MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 40px 30px;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease;
}

.modal-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
}

.modal-content p {
    font-size: 18px;
    margin-bottom: 40px;
    color: #333;
}

/* ============================================
   ALERTS & MESSAGES
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .welcome-text {
        font-size: 28px;
    }

    .btn {
        padding: 16px;
        font-size: 17px;
    }
}
/* ============================================
   APPOINTMENT CARDS
   ============================================ */
.appointment-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s;
    cursor: pointer;
}

.appointment-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
