/* Pearl Dental Services - Brand Colors */
:root {
    --pearl-primary: #7B4FA2;
    --pearl-primary-light: #CBB7E8;
    --pearl-primary-dark: #4B2E83;
    --pearl-secondary: #6c757d;
    --pearl-success: #28a745;
    --pearl-warning: #ffc107;
    --pearl-danger: #dc3545;
    --pearl-light: #F5F0FA;
    --pearl-white: #ffffff;
    --pearl-gray: #f8f9fa;
    --pearl-text: #333333;
    --pearl-text-muted: #6c757d;
}

html {
    font-size: 14px;
    position: relative;
    height: 100%;
    overflow-y: scroll; /* Always reserve scrollbar space to prevent layout shift */
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--pearl-text);
}

/* Navbar Styles */
.navbar-pearl {
    background: linear-gradient(135deg, var(--pearl-primary) 0%, var(--pearl-primary-dark) 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-pearl .navbar-brand {
    color: var(--pearl-white) !important;
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-pearl .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.navbar-pearl .nav-link:hover {
    color: var(--pearl-white) !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.navbar-pearl .nav-link.active {
    color: var(--pearl-white) !important;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--pearl-primary) 0%, var(--pearl-primary-dark) 100%);
    color: var(--pearl-white);
    padding: 80px 0;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Buttons */
.btn-pearl {
    background-color: var(--pearl-primary);
    border-color: var(--pearl-primary);
    color: var(--pearl-white);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-pearl:hover {
    background-color: var(--pearl-primary-dark);
    border-color: var(--pearl-primary-dark);
    color: var(--pearl-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 79, 162, 0.4);
}

.btn-pearl-outline {
    background-color: transparent;
    border: 2px solid var(--pearl-primary);
    color: var(--pearl-primary);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-pearl-outline:hover {
    background-color: var(--pearl-primary);
    color: var(--pearl-white);
}

.btn-pearl-light {
    background-color: var(--pearl-white);
    border-color: var(--pearl-white);
    color: var(--pearl-primary);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-pearl-light:hover {
    background-color: var(--pearl-light);
    color: var(--pearl-primary-dark);
}

/* Action buttons in tables - consistent size */
.btn-sm.btn-pearl,
.btn-sm.btn-pearl-outline {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 4px;
}

.btn-sm .bi {
    font-size: 0.875rem;
    line-height: 1;
    vertical-align: middle;
}

/* Cards */
.card-pearl {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card-pearl:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card-pearl .card-header {
    background: linear-gradient(135deg, var(--pearl-primary) 0%, var(--pearl-primary-dark) 100%);
    color: var(--pearl-white);
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 2rem;
}

.feature-card .icon {
    width: 80px;
    height: 80px;
    background: var(--pearl-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--pearl-primary);
}

.feature-card h5 {
    color: var(--pearl-primary-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Stats Section */
.stats-section {
    background-color: var(--pearl-light);
    padding: 60px 0;
}

.stat-item {
    text-align: center;
    padding: 2rem;
}

.stat-item .number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--pearl-primary);
    display: block;
}

.stat-item .label {
    font-size: 1rem;
    color: var(--pearl-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Membership Tiers */
.tier-card {
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.tier-card:hover {
    border-color: var(--pearl-primary);
    transform: translateY(-5px);
}

.tier-card.featured {
    border-color: var(--pearl-primary);
    background: linear-gradient(135deg, var(--pearl-light) 0%, var(--pearl-white) 100%);
}

.tier-card .tier-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pearl-primary-dark);
    margin-bottom: 0.5rem;
}

.tier-card .tier-discount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--pearl-primary);
}

/* Sidebar */
.sidebar {
    background-color: var(--pearl-white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.sidebar .nav-link {
    color: var(--pearl-text);
    padding: 0.75rem 1.25rem;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: var(--pearl-light);
    border-left-color: var(--pearl-primary-light);
}

.sidebar .nav-link.active {
    background-color: var(--pearl-light);
    border-left-color: var(--pearl-primary);
    color: var(--pearl-primary);
    font-weight: 600;
}

/* Portal Dashboard */
.dashboard-card {
    background: var(--pearl-white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.dashboard-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pearl-primary);
}

.dashboard-card .stat-label {
    color: var(--pearl-text-muted);
    font-size: 0.875rem;
}

/* Case Status */
.case-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.case-status.received { background: #e3f2fd; color: #1976d2; }
.case-status.in-progress { background: #fff3e0; color: #f57c00; }
.case-status.shipped { background: #e8f5e9; color: #388e3c; }
.case-status.completed { background: #f3e5f5; color: #7b1fa2; }

/* Product Cards */
.product-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-card .product-image {
    height: 200px;
    background: var(--pearl-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--pearl-primary-light);
    position: relative;
}

/* Product badges (Popular, New) */
.product-badges {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
}

.product-badge {
    font-size: 0.65rem;
    font-weight: 600;
    font-style: normal;
    padding: 3px 8px;
    border-radius: 3px;
    line-height: 1.2;
    text-transform: none;
}

.product-badge-popular {
    background-color: #ffc107;
    color: #212529;
}

.product-badge-new {
    background-color: #198754;
    color: #fff;
}

.product-card .card-body {
    padding: 1.25rem;
}

.product-card .product-name {
    font-weight: 600;
    color: var(--pearl-text);
    margin-bottom: 0.5rem;
}

.product-card .product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pearl-primary);
}

/* Footer */
.footer-pearl {
    background: var(--pearl-primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 40px 0 20px;
}

.footer-pearl h5 {
    color: var(--pearl-white);
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-pearl a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-pearl a:hover {
    color: var(--pearl-white);
}

.footer-pearl .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 30px;
}

/* Forms */
.form-control:focus {
    border-color: var(--pearl-primary);
    box-shadow: 0 0 0 0.2rem rgba(123, 79, 162, 0.25);
}

.form-pearl .form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
}

/* Tables */
.table-pearl thead {
    background: var(--pearl-light);
}

.table-pearl thead th {
    color: var(--pearl-primary-dark);
    font-weight: 600;
    border-bottom: 2px solid var(--pearl-primary-light);
    white-space: nowrap;
}

.table-pearl tbody td {
    vertical-align: middle;
    white-space: nowrap;
}

/* Alerts */
.alert-pearl {
    background-color: var(--pearl-light);
    border-color: var(--pearl-primary-light);
    color: var(--pearl-primary-dark);
    border-radius: 8px;
}

/* Breadcrumb */
.breadcrumb-pearl {
    background: transparent;
    padding: 0;
}

.breadcrumb-pearl .breadcrumb-item a {
    color: var(--pearl-primary);
}

.breadcrumb-pearl .breadcrumb-item.active {
    color: var(--pearl-text-muted);
}

/* Utilities */
.bg-pearl { background-color: var(--pearl-primary) !important; }
.bg-pearl-light { background-color: var(--pearl-light) !important; }
.bg-pearl-dark { background-color: var(--pearl-primary-dark) !important; }
.text-pearl { color: var(--pearl-primary) !important; }
.text-pearl-dark { color: var(--pearl-primary-dark) !important; }
.border-pearl { border-color: var(--pearl-primary) !important; }

/* Page Section */
.page-section {
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pearl-primary-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--pearl-text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Login/Register Pages */
.auth-container {
    max-width: 450px;
    margin: 40px auto;
}

.auth-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.auth-card .card-header {
    background: linear-gradient(135deg, var(--pearl-primary) 0%, var(--pearl-primary-dark) 100%);
    color: var(--pearl-white);
    padding: 2rem;
    text-align: center;
    border: none;
}

.auth-card .card-body {
    padding: 2rem;
}

/* Cart */
.cart-item {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-summary {
    background: var(--pearl-light);
    border-radius: 12px;
    padding: 1.5rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--pearl-primary-light);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--pearl-primary);
    border: 2px solid var(--pearl-white);
}

.timeline-item.completed::before {
    background: var(--pearl-success);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section {
        padding: 50px 0;
    }

    .stat-item .number {
        font-size: 2rem;
    }
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Navbar Scroll Effect */
.navbar-pearl.scrolled {
    background: var(--pearl-primary-dark) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Dropdown Menu */
.navbar-pearl .dropdown-menu {
    border: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem;
}

.navbar-pearl .dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.navbar-pearl .dropdown-item:hover {
    background: var(--pearl-light);
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.service-card .service-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.service-card .service-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1.5rem;
}

/* Workflow Steps */
.workflow-step {
    position: relative;
    text-align: center;
    padding: 1.5rem;
}

.workflow-step .step-number {
    width: 60px;
    height: 60px;
    background: var(--pearl-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.workflow-step::after {
    content: '';
    position: absolute;
    top: 50px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: var(--pearl-primary-light);
}

.workflow-step:last-child::after {
    display: none;
}

/* Testimonial Carousel */
.testimonial-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.testimonial-card .testimonial-text {
    font-style: italic;
    color: var(--pearl-text-muted);
    margin-bottom: 1.5rem;
}

.testimonial-card .testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-card .author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--pearl-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pearl-primary);
    font-weight: 600;
}

/* Stats Counter on Gradient */
.stats-gradient {
    background: linear-gradient(135deg, var(--pearl-primary) 0%, var(--pearl-primary-dark) 100%);
    color: white;
    padding: 60px 0;
}

.stats-gradient .stat-number {
    font-size: 3rem;
    font-weight: 700;
}

.stats-gradient .stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Portal Layout */
.portal-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 1rem;
}

.portal-sidebar .nav-link {
    color: var(--pearl-text);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

.portal-sidebar .nav-link:hover {
    background: var(--pearl-light);
}

.portal-sidebar .nav-link.active {
    background: var(--pearl-primary);
    color: white;
}

.portal-sidebar .nav-link i {
    width: 24px;
    margin-right: 0.5rem;
}

.portal-sidebar .nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6c757d;
    padding: 0.5rem 1rem 0.25rem;
    letter-spacing: 0.05em;
}

/* File Upload Zone */
.file-upload-zone {
    border: 2px dashed var(--pearl-primary-light);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: var(--pearl-light);
    transition: all 0.3s;
    cursor: pointer;
}

.file-upload-zone:hover {
    border-color: var(--pearl-primary);
    background: white;
}

.file-upload-zone.dragover {
    border-color: var(--pearl-primary);
    background: white;
}

@media (max-width: 991.98px) {
    .workflow-step::after {
        display: none;
    }
}
