@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0284c7; /* Clinical sky blue */
    --primary-hover: #0369a1;
    --primary-light: #e0f2fe; /* Light blue */
    --secondary-color: #06b6d4; /* Cyan */
    --dark-color: #0f172a;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    
    --font-main: 'Outfit', sans-serif;
    
    /* Glassmorphism effects */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(2, 132, 199, 0.08);
}

/* Override Bootstrap green classes to match our new blue/cyan medical theme */
.text-success {
    color: var(--primary-color) !important;
}
.bg-success {
    background-color: var(--primary-color) !important;
}
.btn-success {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}
.btn-success:hover, .btn-success:focus, .btn-success:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}
.btn-outline-success {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}
.btn-outline-success:hover {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}
.border-success {
    border-color: var(--primary-color) !important;
}
.border-success-subtle {
    border-color: rgba(2, 132, 199, 0.2) !important;
}
.bg-success-subtle {
    background-color: var(--primary-light) !important;
    color: var(--primary-color) !important;
}
.text-success-emphasis {
    color: var(--primary-hover) !important;
}

body {
    font-family: var(--font-main);
    background-color: #f1f5f9;
    color: var(--dark-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 12px 40px 0 rgba(2, 132, 199, 0.15);
    transform: translateY(-2px);
}

/* Gradient background for landing/header */
.bg-gradient-medical {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

/* Premium Buttons */
.btn-medical {
    background-color: var(--primary-color);
    color: white;
    border-radius: 10px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    border: none;
    transition: all 0.3s ease;
}

.btn-medical:hover {
    background-color: var(--primary-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.btn-outline-medical {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background: transparent;
    border-radius: 10px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-medical:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Navbar customization */
.navbar-medical {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.navbar-medical .navbar-brand {
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-medical .nav-link {
    color: #475569;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.navbar-medical .nav-link:hover, 
.navbar-medical .nav-link.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Custom Floating Forms */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 148, 136, 0.25);
}

/* Status Badges */
.badge-status-menunggu {
    background-color: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
    padding: 0.4em 0.8em;
    border-radius: 20px;
    font-weight: 600;
}

.badge-status-dikonfirmasi {
    background-color: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
    padding: 0.4em 0.8em;
    border-radius: 20px;
    font-weight: 600;
}

.badge-status-selesai {
    background-color: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
    padding: 0.4em 0.8em;
    border-radius: 20px;
    font-weight: 600;
}

.badge-status-dibatalkan {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 0.4em 0.8em;
    border-radius: 20px;
    font-weight: 600;
}

/* Admin Dashboard Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background-color: white;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.admin-content {
    flex-grow: 1;
    background-color: #f8fafc;
    padding: 2rem;
}

.sidebar-heading {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    flex-grow: 1;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1.5rem;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.sidebar-menu li a:hover,
.sidebar-menu li.active a {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Avatar layout */
.avatar-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.avatar-doctor {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.avatar-nav {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
}

/* Responsive grid layouts */
.patient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

/* Doctor card inside listing */
.doctor-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.doctor-card-body {
    display: flex;
    gap: 20px;
    align-items: center;
}

@media (max-width: 768px) {
    .admin-wrapper {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        flex-direction: column;
        background: white;
    }
    .sidebar-heading {
        padding: 12px 15px !important;
        border-bottom: 1px solid var(--border-color);
        font-size: 1.1rem;
    }
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding: 0 !important;
        margin: 0;
        scrollbar-width: none; /* Firefox */
    }
    .sidebar-menu::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    .sidebar-menu li {
        flex: 1 0 auto;
    }
    .sidebar-menu li a {
        padding: 10px 15px !important;
        border-left: none !important;
        border-bottom: 3px solid transparent;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .sidebar-menu li.active a,
    .sidebar-menu li a:hover {
        border-bottom: 3px solid var(--primary-color);
        background: var(--primary-light);
        color: var(--primary-color);
    }
    .sidebar-footer {
        position: absolute;
        top: 8px;
        right: 15px;
        padding: 0 !important;
        border-top: none !important;
        width: auto;
    }
    .sidebar-footer .text-muted,
    .sidebar-footer .fw-bold {
        display: none !important;
    }
    .sidebar-footer a.btn {
        padding: 4px 10px !important;
        font-size: 0.75rem;
    }
    .admin-content {
        padding: 1rem;
    }
    .doctor-card-body {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   Mobile Application Style Layout for Patients (Responsive Mix)
   ========================================================================== */

body.mobile-bg {
    background-color: #f1f5f9;
    background-image: none;
    min-height: 100vh;
    margin: 0;
    display: block;
}

.mobile-app-container {
    max-width: 100%;
    width: 100%;
    min-height: auto;
    background-color: transparent;
    box-shadow: none;
    display: block;
    position: static;
    padding-bottom: 0;
}

.bottom-nav {
    display: none; /* Hide bottom nav on desktop */
}

.mobile-app-header {
    display: none; /* Hide mobile header on desktop */
}

/* Mobile and Tablet viewports (<= 991px) */
@media (max-width: 991px) {
    body.mobile-bg {
        background: linear-gradient(135deg, rgba(13, 148, 136, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%), 
                    url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?q=80&w=2000&auto=format&fit=crop') no-repeat center center fixed;
        background-size: cover;
        display: flex;
        justify-content: center;
        align-items: stretch;
    }

    .mobile-app-container {
        max-width: 480px; /* Phone frame preview on tablet/desktop-resized windows */
        width: 100%;
        min-height: 100vh;
        background-color: #f8fafc;
        box-shadow: 0 0 50px rgba(15, 23, 42, 0.15);
        display: flex;
        flex-direction: column;
        position: relative;
        padding-bottom: 80px; /* space for bottom nav */
        margin: 0 auto;
    }

    /* Floating Bottom Navigation Bar */
    .bottom-nav {
        display: flex; /* Show bottom nav on mobile */
        position: fixed;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        max-width: 480px;
        width: 100%;
        height: 70px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        z-index: 1000;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
        padding: 0 10px;
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #94a3b8;
        font-size: 0.7rem;
        font-weight: 600;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        flex: 1;
        height: 100%;
    }

    .bottom-nav-item i {
        font-size: 1.35rem;
        margin-bottom: 4px;
        transition: all 0.2s ease;
    }

    .bottom-nav-item:hover,
    .bottom-nav-item.active {
        color: var(--primary-color);
    }

    .bottom-nav-item.active i {
        transform: translateY(-4px);
        color: var(--primary-color);
    }

    /* Floating Header for Mobile App */
    .mobile-app-header {
        display: flex; /* Show mobile header on mobile */
        background: white;
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
        position: sticky;
        top: 0;
        z-index: 999;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 2px 10px rgba(0,0,0,0.01);
    }

    .mobile-app-header .app-brand {
        font-weight: 700;
        font-size: 1.15rem;
        color: var(--primary-color);
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-app-content {
        flex: 1;
        padding: 20px;
        overflow-y: auto;
    }
}

/* Desktop container limits */
.mobile-app-content {
    width: 100%;
    margin: 0 auto;
    padding: 30px 15px;
    max-width: 1280px;
}

/* For small devices, expand container to fill the screen */
@media (max-width: 480px) {
    .mobile-app-container {
        max-width: 100%;
        box-shadow: none;
    }
    .bottom-nav {
        max-width: 100%;
    }
}

/* Auth Pages (Login & Register) Layout */
body.auth-body {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.12) 0%, rgba(16, 185, 129, 0.12) 100%), 
                url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?q=80&w=2000&auto=format&fit=crop') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-container {
    max-width: 460px;
    width: 100%;
}



