/* 3King Aircon Maintenance System - Professional Styles */

:root {
    /* Refined formal palette */
    --primary-color: #0f4c81;   /* Classic Blue */
    --primary-light: #3fa9f5;   /* Sky Blue */
    --primary-dark: #0b3a63;    /* Deep Navy */
    --secondary-color: #6b7280; /* Neutral Gray */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #14b8a6;
    --light-color: #f8fafc;
    --dark-color: #0f172a;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-700);
    scroll-behavior: smooth;
}

/* Navbar Stability - Ensure navbar stays in position across all admin pages */
.navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1030 !important;
    transition: none !important;
}

.navbar-nav .nav-link {
    transition: none !important;
}

.navbar-nav .nav-link.active {
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.3;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* Logo Styling */
.logo {
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.navbar-logo {
    width: 35px;
    height: 35px;
}

.hero-logo {
    width: 150px;
    height: 150px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.login-logo {
    width: 80px;
    height: 80px;
}

.footer-logo {
    width: 30px;
    height: 30px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #f6f7fb 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.min-vh-75 {
    min-height: 75vh;
}

/* Custom Cards */
.card {
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border-radius: 0.75rem;
    background: white;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-light);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.btn-outline-primary {
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 0.75rem;
}

/* Statistics Cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1rem;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stats-card:hover::before {
    opacity: 1;
}

.stats-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.stats-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.stats-card p {
    margin-bottom: 0;
    opacity: 0.9;
    font-size: 1rem;
    font-weight: 500;
}

/* Tables */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    background-color: var(--light-color);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
    color: var(--dark-color);
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
}

/* Forms */
.form-control {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.input-group-text {
    background-color: var(--light-color);
    border: 1px solid #dee2e6;
    color: var(--secondary-color);
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Footer */
footer {
    margin-top: auto;
}

/* Footer theme overrides for better contrast and palette alignment */
footer.bg-dark {
    background: var(--primary-color) !important;
    color: #e5e7eb;
}

footer.bg-dark h5,
footer.bg-dark h6 {
    color: #ffffff;
}

footer.bg-dark .text-muted {
    color: #ffffff !important;
}

footer.bg-dark a.text-muted:hover {
    color: #ffffff !important;
}

footer.bg-dark .border-secondary {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Ensure all footer copy is legible */
footer.bg-dark p,
footer.bg-dark li,
footer.bg-dark a,
footer.bg-dark small,
footer.bg-dark .text-white-50 {
    color: #ffffff !important;
}

footer.bg-dark a:hover { color: #ffffff !important; }

footer.bg-dark .fs-5 { color: #ffffff !important; }

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
        text-align: center;
        padding: 3rem 0;
    }
    
    .min-vh-75 {
        min-height: 70vh;
    }
    
    .display-4 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .display-5 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .hero-logo {
        width: 100px;
        height: 100px;
        margin-bottom: 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .stats-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .stats-card h3 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .section-title::after {
        width: 40px;
        height: 3px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 60vh;
        padding: 2rem 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .hero-logo {
        width: 80px;
        height: 80px;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .stats-card {
        padding: 1rem;
    }
    
    .stats-card h3 {
        font-size: 1.75rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Service Area Cards */
.service-area-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-area-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Appointment Status Colors */
.status-pending {
    color: var(--warning-color);
}

.status-confirmed {
    color: var(--info-color);
}

.status-in-progress {
    color: var(--primary-color);
}

.status-completed {
    color: var(--success-color);
}

.status-cancelled {
    color: var(--danger-color);
}

/* Dashboard Stats */
.stats-card {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 60%, var(--primary-light) 120%);
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.stats-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-card p {
    margin-bottom: 0;
    opacity: 0.9;
}

/* Quick Actions */
.quick-actions .btn {
    margin-bottom: 0.5rem;
    text-align: left;
    padding: 0.75rem 1rem;
}

.quick-actions .btn i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

/* Profile Section */
.profile-section {
    background-color: var(--light-color);
    border-radius: 1rem;
    padding: 2rem;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Service Cards */
.service-card {
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    transition: all 0.3s ease;
    background: white;
    overflow: hidden;
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.service-card .card-body {
    padding: 2rem;
}

.service-card .service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.feature-icon:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table-responsive .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}
