/* assets/css/style.css - Complete Unified Styles */

:root {
    --primary: #4A6FA5;
    --primary-dark: #3d5a8a;
    --primary-light: #6b8fbf;
    --secondary: #6B8E6E;
    --secondary-dark: #567359;
    --accent: #F4A261;
    --accent-dark: #e76f51;
    --success: #2A9D8F;
    --success-dark: #21867a;
    --warning: #E9C46A;
    --danger: #E76F51;
    --info: #4A90E2;
    --dark: #2C3E50;
    --gray-dark: #4a5568;
    --gray: #718096;
    --gray-light: #e2e8f0;
    --light: #F8F9FA;
    --white: #ffffff;
    --black: #1a202c;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --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);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    --transition-fast: 150ms ease;
    --transition: 250ms ease;
    --transition-slow: 350ms ease;
}

[data-theme="dark"] {
    --primary: #5d8bc2;
    --primary-dark: #4a6fa5;
    --secondary: #7da581;
    --dark: #e2e8f0;
    --gray-dark: #cbd5e0;
    --gray: #a0aec0;
    --gray-light: #4a5568;
    --light: #2d3748;
    --white: #1a202c;
    --black: #f7fafc;
    background-color: #1a202c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    font-family: 'Poppins', 'Segoe UI', 'Inter', system-ui, sans-serif;
    color: var(--dark);
    line-height: 1.5;
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 1rem;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* Navbar Styles */
.navbar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    box-shadow: var(--shadow-lg);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #fff, rgba(255,255,255,0.8));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

.nav-link {
    position: relative;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: white;
    transition: width var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Card Styles */
.card {
    border: none;
    border-radius: var(--radius-xl);
    background: var(--white);
    transition: transform var(--transition), box-shadow var(--transition);
    overflow: hidden;
}

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

.card-header {
    background: linear-gradient(135deg, rgba(74, 111, 165, 0.05), rgba(107, 142, 110, 0.05));
    border-bottom: 2px solid var(--primary-light);
    padding: 1.25rem 1.5rem;
}

/* Button Styles */
.btn {
    border-radius: var(--radius-full);
    padding: 0.625rem 1.5rem;
    font-weight: 500;
    transition: all var(--transition);
    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-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #c0392b);
    border: none;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.9));
    border-radius: var(--radius-2xl);
    padding: 4rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(74,111,165,0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Service Card */
.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all var(--transition);
    border: 1px solid var(--gray-light);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74,111,165,0.1), transparent);
    transition: left 0.6s;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    transition: transform var(--transition);
    box-shadow: var(--shadow-md);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Form Styles */
.form-control, .form-select {
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-light);
    transition: all var(--transition);
    background: var(--white);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(74, 111, 165, 0.2);
    outline: none;
}

.form-control:hover, .form-select:hover {
    border-color: var(--primary-light);
}

/* Table Styles */
.table {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.table th {
    border: none;
    color: white;
    font-weight: 600;
    padding: 1rem;
}

/* Keep Bootstrap light table headers readable */
.table thead.bg-light th,
.table thead.table-light th {
    background-color: var(--primary-dark) !important;
    color: var(--white) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

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

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

.table tbody tr:hover {
    background: rgba(74, 111, 165, 0.05);
}

/* Badge Styles */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.75rem;
}

/* Progress Bar */
.progress {
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--gray-light);
    overflow: hidden;
}

.progress-bar {
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Modal Styles */
.modal,
.modal-backdrop,
.modal-dialog,
.modal-content,
.dropdown-menu {
    backface-visibility: hidden;
}

.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    animation: slideIn 0.3s ease;
}

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

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

/* Pagination */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border: none;
    border-radius: var(--radius-full);
    padding: 0.5rem 1rem;
    color: var(--primary);
    transition: all var(--transition-fast);
}

.page-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

/* Service Checkbox Card */
.service-checkbox-card {
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-lg);
}

.service-checkbox-card:hover {
    background: rgba(74, 111, 165, 0.05);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.service-checkbox:checked + label {
    color: var(--primary);
    font-weight: 600;
}

/* Spinner */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.2rem;
}

/* Service Duration Styles */
.service-duration-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    background: #e3f2fd;
    color: #0d6efd;
}

.duration-short {
    background: #d4edda;
    color: #155724;
}

.duration-medium {
    background: #fff3cd;
    color: #856404;
}

.duration-long {
    background: #f8d7da;
    color: #721c24;
}

.estimated-time-box {
    background: linear-gradient(135deg, #e3f2fd, #bbdef5);
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
}

.estimated-time-box .time {
    font-size: 1.2rem;
    font-weight: bold;
    color: #0d6efd;
}

.estimated-time-box .note {
    font-size: 0.7rem;
    color: #6c757d;
}

/* Admin Dashboard Specific Styles */
.bg-gradient-primary {
    background: linear-gradient(135deg, #4A6FA5, #3d5a8a);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #2A9D8F, #21867a);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #E9C46A, #d4a837);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #E76F51, #c0392b);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #4A90E2, #3a7bc8);
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #4A6FA5, #3d5a8a);
}

.nav-pills .nav-link {
    color: #4A6FA5;
    transition: all 0.3s ease;
    border-radius: 30px;
    margin: 0 2px;
}

.nav-pills .nav-link:hover:not(.active) {
    background: rgba(74,111,165,0.1);
}

.table-success-light {
    background-color: rgba(42,157,143,0.05);
}

/* Rating Input */
.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 5px;
}

.rating-input input {
    display: none;
}

.rating-input label {
    cursor: pointer;
    padding: 0 5px;
    color: #ddd;
    font-size: 30px;
    transition: color 0.2s;
}

.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
    color: #ffc107;
}

/* Timeline Modal Styles */
.timeline-steps {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    position: relative;
}

.timeline-steps::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.timeline-step {
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.timeline-step .step-icon {
    width: 50px;
    height: 50px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    transition: all 0.3s;
}

.timeline-step.active .step-icon {
    background: #4A6FA5;
    color: white;
    transform: scale(1.1);
}

.timeline-step.completed .step-icon {
    background: #2A9D8F;
    color: white;
}

.timeline-step .step-label {
    font-size: 11px;
    color: #666;
}

.timeline-step.active .step-label,
.timeline-step.completed .step-label {
    color: #4A6FA5;
    font-weight: bold;
}

/* Saved Address Card */
.saved-address-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.add-new-address-card {
    transition: all 0.3s ease;
    background: #f8f9fa;
    cursor: pointer;
}

.add-new-address-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* Button Group */
.btn-group .btn {
    border-radius: 30px !important;
    padding: 0.25rem 0.6rem;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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

.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

/* Responsive Styles */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .hero-section {
        padding: 2rem;
    }
    
    .card:hover {
        transform: translateY(-2px);
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .table-responsive {
        border-radius: var(--radius-lg);
    }
    
    .service-card {
        padding: 1.25rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .timeline-step .step-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .timeline-step .step-label {
        font-size: 9px;
    }
    
    .btn-group .btn {
        padding: 0.2rem 0.5rem;
        font-size: 12px;
    }
    
    .card-body .p-3 {
        padding: 0.75rem !important;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-section {
        padding: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}