/* ==========================================================================
   AİLE HEKİMLİĞİ MODERN TEMA (Mavi – Beyaz – Gri)
   Ana Renk: #0057D9 (Kurumsal Mavi)
   Yardımcı Renk: #4C6FFF (Modern Canlı Mavi)
   Arka Plan: #F7F9FC (Ultra Açık Soft Mavi-Gri)
   ========================================================================== */

:root {
    --ahm-primary: #0057D9;
    --ahm-primary-hover: #0045B0;
    --ahm-primary-light: #EEF2FF;
    --ahm-secondary: #4C6FFF;
    --ahm-secondary-light: #E0E7FF;
    --ahm-bg: #F7F9FC;
    --ahm-card-bg: #FFFFFF;
    --ahm-border: #E2E8F0;
    --ahm-text-dark: #0F172A;
    --ahm-text-body: #334155;
    --ahm-text-muted: #64748B;
    --ahm-success: #16A34A;
    --ahm-success-bg: #DCFCE7;
    --ahm-danger: #DC2626;
    --ahm-danger-bg: #FEE2E2;
    --ahm-warning: #D97706;
    --ahm-warning-bg: #FEF3C7;
    --ahm-info: #0284C7;
    --ahm-info-bg: #E0F2FE;
    --ahm-sidebar-width: 290px;
    --ahm-radius: 14px;
    --ahm-radius-sm: 8px;
    --ahm-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --ahm-shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
    --ahm-shadow-hover: 0 12px 28px -6px rgba(0, 87, 217, 0.16);
}

/* Genel Gövde */
body {
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--ahm-bg);
    color: var(--ahm-text-body);
    margin: 0;
    padding: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Tipografi */
h1, h2, h3, h4, h5, h6 {
    color: var(--ahm-text-dark);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--ahm-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

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

/* Layout Çerçevesi (Sidebar + Geniş İçerik) */
.ahm-app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

/* ==========================================================================
   SOL SIDEBAR (Left Sidebar)
   ========================================================================== */
.ahm-sidebar {
    width: var(--ahm-sidebar-width);
    min-width: var(--ahm-sidebar-width);
    background-color: #FFFFFF;
    border-right: 1px solid var(--ahm-border);
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1020;
    overflow-y: auto;
}

.ahm-sidebar-header {
    padding: 24px 20px 18px;
    border-bottom: 1px solid var(--ahm-border);
}

.ahm-brand-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background-color: var(--ahm-primary-light);
    color: var(--ahm-primary);
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.ahm-brand-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ahm-text-dark);
    line-height: 1.3;
    margin: 0;
}

.ahm-brand-sub {
    font-size: 0.75rem;
    color: var(--ahm-text-muted);
    margin-top: 3px;
}

/* Sidebar Navigasyonu (Dinamik Menü) */
.ahm-sidebar-nav {
    padding: 16px 12px;
    flex-grow: 1;
}

.ahm-nav-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ahm-text-muted);
    padding: 6px 12px;
    margin-bottom: 4px;
}

.ahm-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ahm-sidebar-menu li {
    margin-bottom: 3px;
}

.ahm-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--ahm-radius-sm);
    color: var(--ahm-text-body);
    font-weight: 500;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.ahm-menu-link i {
    font-size: 1.15rem;
    color: var(--ahm-text-muted);
    transition: all 0.2s ease;
    width: 20px;
    text-align: center;
}

.ahm-menu-link:hover {
    background-color: #F8FAFC;
    color: var(--ahm-primary);
}

.ahm-menu-link:hover i {
    color: var(--ahm-primary);
}

.ahm-menu-link.active {
    background-color: var(--ahm-primary-light);
    color: var(--ahm-primary);
    font-weight: 700;
    border-left-color: var(--ahm-primary);
}

.ahm-menu-link.active i {
    color: var(--ahm-primary);
}

/* Sidebar Alt Widget'lar */
.ahm-sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--ahm-border);
    background-color: #FAFCFE;
}

.ahm-live-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ahm-success);
    background-color: var(--ahm-success-bg);
    padding: 6px 10px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.ahm-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--ahm-success);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
    animation: ahmPulse 1.8s infinite;
}

@keyframes ahmPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.ahm-duty-widget {
    background-color: #FFFFFF;
    border: 1px solid var(--ahm-border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

/* ==========================================================================
   GENİŞ İÇERİK ALANI & ÜST BAR (Main Content & Top Bar)
   ========================================================================== */
.ahm-main-wrapper {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}

.ahm-top-bar {
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--ahm-border);
    padding: 12px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1010;
}

.ahm-top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ahm-top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ahm-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 30px;
    background-color: var(--ahm-bg);
    border: 1px solid var(--ahm-border);
    color: var(--ahm-text-dark);
}

.ahm-btn-primary {
    background: linear-gradient(135deg, var(--ahm-primary) 0%, var(--ahm-secondary) 100%);
    color: #FFFFFF !important;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 87, 217, 0.25);
    transition: all 0.2s ease;
}

.ahm-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 87, 217, 0.35);
}

.ahm-btn-outline {
    background-color: transparent;
    color: var(--ahm-primary) !important;
    border: 1.5px solid var(--ahm-primary);
    font-weight: 600;
    border-radius: 8px;
    padding: 7px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.ahm-btn-outline:hover {
    background-color: var(--ahm-primary-light);
}

/* İçerik Gövdesi */
.ahm-content-container {
    padding: 32px 36px;
    flex: 1 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   KARTLAR & BİLEŞENLER
   ========================================================================== */
.ahm-card {
    background-color: var(--ahm-card-bg);
    border: 1px solid var(--ahm-border);
    border-radius: var(--ahm-radius);
    padding: 24px;
    box-shadow: var(--ahm-shadow-sm);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: auto;
}

.ahm-card.h-100 {
    height: 100%;
}

.ahm-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ahm-shadow-hover);
    border-color: #CBD5E1;
}

/* Modern Hero Banner */
.ahm-hero-card {
    background: linear-gradient(135deg, #0057D9 0%, #3B66F5 50%, #4C6FFF 100%);
    border-radius: 20px;
    padding: 44px 40px;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(0, 87, 217, 0.3);
    margin-bottom: 32px;
}

.ahm-hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 30px;
    margin-bottom: 16px;
}

.ahm-hero-title {
    color: #FFFFFF;
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 14px;
    max-width: 780px;
}

.ahm-hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    max-width: 680px;
    margin-bottom: 26px;
}

/* Hızlı İşlem Kutuları */
.ahm-quick-card {
    background-color: #FFFFFF;
    border: 1px solid var(--ahm-border);
    border-radius: var(--ahm-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--ahm-shadow-sm);
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.ahm-quick-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ahm-shadow-md);
    border-color: var(--ahm-primary);
}

.ahm-quick-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Hekim Profil Kartları */
.ahm-doctor-card {
    background-color: #FFFFFF;
    border: 1px solid var(--ahm-border);
    border-radius: var(--ahm-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--ahm-shadow-sm);
    transition: all 0.25s ease;
}

.ahm-doctor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ahm-shadow-hover);
    border-color: #CBD5E1;
}

.ahm-doctor-header {
    padding: 20px 20px 14px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #F1F5F9;
}

.ahm-doctor-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--ahm-primary-light);
    color: var(--ahm-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.ahm-doctor-body {
    padding: 16px 20px;
    flex-grow: 1;
}

.ahm-doctor-footer {
    padding: 14px 20px;
    background-color: #F8FAFC;
    border-top: 1px solid #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Nöbetçi Eczane Kartı */
.ahm-duty-card {
    background: linear-gradient(145deg, #FFFFFF 0%, #FFF5F5 100%);
    border: 1.5px solid #FED7D7;
    border-radius: var(--ahm-radius);
    padding: 24px;
    box-shadow: var(--ahm-shadow-sm);
}

.ahm-duty-badge {
    background-color: var(--ahm-danger);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Kart Tabanlı Duyuru Öğeleri */
.ahm-announcement-card {
    background-color: #FFFFFF;
    border: 1px solid var(--ahm-border);
    border-radius: var(--ahm-radius);
    overflow: hidden;
    box-shadow: var(--ahm-shadow-sm);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ahm-announcement-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ahm-shadow-hover);
}

.ahm-announcement-body {
    padding: 22px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Etkinlik Takvimi Öğeleri */
.ahm-event-card {
    background-color: #FFFFFF;
    border: 1px solid var(--ahm-border);
    border-radius: var(--ahm-radius);
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    box-shadow: var(--ahm-shadow-sm);
    transition: all 0.2s ease;
}

.ahm-event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ahm-shadow-md);
    border-color: var(--ahm-primary);
}

.ahm-event-date-badge {
    background: var(--ahm-primary-light);
    color: var(--ahm-primary);
    border-radius: 12px;
    width: 68px;
    height: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
}

.ahm-event-date-day {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}

.ahm-event-date-month {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Footer (İçerik Altı & Kurumsal Bölüm) */
.ahm-footer {
    background-color: #FFFFFF;
    border-top: 1px solid var(--ahm-border);
    margin-top: auto;
    width: 100%;
}

.ahm-footer-main {
    padding: 44px 36px 36px;
    overflow: hidden;
}

.ahm-footer-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--ahm-primary) 0%, var(--ahm-secondary) 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 87, 217, 0.2);
}

.ahm-footer-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--ahm-primary-light);
    color: var(--ahm-primary);
    padding: 2px 7px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.ahm-footer-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ahm-text-dark);
    line-height: 1.3;
}

.ahm-footer-desc {
    font-size: 0.85rem;
    color: var(--ahm-text-muted);
    line-height: 1.6;
}

.ahm-footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
}

.ahm-footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--ahm-text-body);
}

.ahm-footer-contact-item a {
    color: var(--ahm-text-body);
    text-decoration: none;
    transition: color 0.15s ease;
}

.ahm-footer-contact-item a:hover {
    color: var(--ahm-primary);
}

.ahm-footer-col-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ahm-text-dark);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid var(--ahm-border);
    display: flex;
    align-items: center;
}

.ahm-footer-hours-list {
    padding: 0;
    margin: 0;
    list-style: none;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ahm-footer-hours-list li {
    display: flex;
    flex-direction: column;
}

.ahm-footer-hours-list .label {
    font-weight: 600;
    color: var(--ahm-text-dark);
}

.ahm-footer-hours-list .val {
    color: var(--ahm-text-muted);
    font-size: 0.82rem;
}

.ahm-footer-alert-card {
    background-color: var(--ahm-bg);
    border: 1px solid var(--ahm-border);
    border-radius: var(--ahm-radius-sm);
    padding: 10px 14px;
    font-size: 0.78rem;
    color: var(--ahm-text-muted);
    display: flex;
    align-items: flex-start;
    line-height: 1.45;
}

.ahm-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ahm-footer-links li a {
    font-size: 0.85rem;
    color: var(--ahm-text-body);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.15s ease;
}

.ahm-footer-links li a:hover {
    color: var(--ahm-primary);
    transform: translateX(3px);
}

.ahm-footer-portal-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #FFFFFF;
    border: 1px solid var(--ahm-border);
    border-radius: 10px;
    padding: 10px 14px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.ahm-footer-portal-btn:hover {
    border-color: var(--ahm-primary);
    background-color: var(--ahm-primary-light);
    transform: translateY(-1px);
    box-shadow: var(--ahm-shadow-sm);
}

.ahm-footer-emergency-box {
    background-color: #FAFCFE;
    border: 1px dashed var(--ahm-border);
    border-radius: 10px;
    padding: 12px 14px;
}

.ahm-footer-bottom {
    background-color: #FAFCFE;
    border-top: 1px solid var(--ahm-border);
    padding: 18px 36px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 768px) {
    .ahm-footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* ==========================================================================
   MOBİL VE DUYARLI UYUMLULUK (Responsive)
   ========================================================================== */
@media (max-width: 991.98px) {
    .ahm-sidebar {
        display: none; /* Masaüstü sidebarı gizle, offcanvas kullanılır */
    }
    .ahm-content-container {
        padding: 20px 16px;
    }
    .ahm-hero-card {
        padding: 28px 22px;
    }
    .ahm-hero-title {
        font-size: 1.6rem;
    }
    .ahm-top-bar {
        padding: 10px 16px;
    }
    .ahm-event-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .ahm-footer-main {
        padding: 32px 16px 24px;
    }
    .ahm-footer-bottom {
        padding: 16px;
    }
}

/* ==========================================================================
   OFFCANVAS & YARDIMCI SINIF GÜVENCESİ (Fallback)
   ========================================================================== */
.offcanvas {
    position: fixed;
    bottom: 0;
    z-index: 1045;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    visibility: hidden;
    background-color: #ffffff;
    transition: transform 0.3s ease-in-out;
}

.offcanvas-start {
    top: 0;
    left: 0;
    width: 290px;
    border-right: 1px solid var(--ahm-border);
    transform: translateX(-100%);
}

.offcanvas.show {
    visibility: visible;
    transform: none;
}

@media (min-width: 992px) {
    .d-lg-none {
        display: none !important;
    }
}
