@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@700;800;900&display=swap');

:root {
    /* Brand Colors */
    --green-900: #0D3320;
    --green-800: #1A5C36;
    --green-700: #1E7042;
    --green-600: #258550;
    --green-500: #2E9E62;
    --green-400: #4CB87E;
    --green-300: #7DD4A4;
    --green-100: #E8F5EE;
    --green-50:  #F2FAF5;

    --beige-900: #7A6A52;
    --beige-200: #EDE5D8;
    --beige-100: #F5EFE4;
    --beige-50:  #FAF7F2;

    --black:     #0A0A0A;
    --gray-800:  #1C1C1C;
    --gray-700:  #2D2D2D;
    --gray-600:  #444444;
    --gray-500:  #666666;
    --gray-300:  #AAAAAA;
    --gray-100:  #F0F0F0;
    --white:     #FFFFFF;

    /* Legacy compatibility mappings */
    --primary-color: #1E7042;
    --secondary-color: #7A6A52;
    --success-color: #2E9E62;
    --healthcare-blue: #1E7042;
    --healthcare-light: #E8F5EE;
    --healthcare-accent: #4CB87E;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--black);
    background-color: var(--white);
}

.hero-section {
    background: linear-gradient(135deg, #0077b6 0%, #00b4d8 50%, #90e0ef 100%);
    color: white;
    padding: 80px 0;
    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"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>') repeat;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.feature-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--healthcare-blue), var(--healthcare-accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 20px;
}

.search-box {
    background: white;
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.search-box .form-control {
    border: none;
    padding: 15px 25px;
    font-size: 16px;
}

.search-box .form-control:focus {
    box-shadow: none;
}

.search-box .btn {
    border-radius: 50px;
    padding: 12px 30px;
}

.code-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid var(--healthcare-blue);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.code-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.code-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.code-badge.icd-10-cm { background: #e3f2fd; color: #1976d2; }
.code-badge.cpt { background: #f3e5f5; color: #7b1fa2; }
.code-badge.hcpcs { background: #e8f5e9; color: #388e3c; }
.code-badge.loinc { background: #fff3e0; color: #f57c00; }
.code-badge.snomed-ct { background: #fce4ec; color: #c2185b; }

.sidebar {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    min-height: calc(100vh - 150px);
}

.sidebar .nav-link {
    color: #495057;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 2px 10px;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    background: #f8f9fa;
    color: var(--healthcare-blue);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--healthcare-blue), var(--healthcare-accent));
    color: white;
}

.sidebar .nav-link i {
    width: 24px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #212529;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #6c757d;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 119, 182, 0.05);
}

.btn-healthcare {
    background: linear-gradient(135deg, var(--healthcare-blue), var(--healthcare-accent));
    border: none;
    color: white;
    padding: 10px 25px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-healthcare:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 119, 182, 0.3);
    color: white;
}

.page-header {
    background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 30px;
}

.page-header h1 {
    margin-bottom: 10px;
}

.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.blog-card .card-body {
    padding: 25px;
}

.blog-card .blog-image {
    height: 200px;
    background: linear-gradient(135deg, #0077b6, #00b4d8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--healthcare-accent);
    box-shadow: 0 0 0 0.2rem rgba(0, 180, 216, 0.25);
}

.badge-active { background-color: #198754; }
.badge-inactive { background-color: #dc3545; }
.badge-pending { background-color: #ffc107; color: #212529; }
.badge-reviewed { background-color: #0d6efd; }

@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .sidebar {
        margin-bottom: 20px;
    }
}

.dashboard-sidebar {
    background: white;
    min-height: 100vh;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

.dashboard-sidebar .nav-link {
    color: #495057;
    padding: 12px 20px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.dashboard-sidebar .nav-link:hover {
    background: #f8f9fa;
    border-left-color: var(--healthcare-accent);
    color: var(--healthcare-blue);
}

.dashboard-sidebar .nav-link.active {
    background: rgba(0, 119, 182, 0.1);
    border-left-color: var(--healthcare-blue);
    color: var(--healthcare-blue);
    font-weight: 600;
}

.content-wrapper {
    padding: 30px;
    background: #f8f9fa;
    min-height: 100vh;
}

/* Custom Branded Navbar */
.navbar-codes-for-md {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--beige-200);
    padding: 16px 0;
    transition: all 0.3s ease;
}
.navbar-codes-for-md .navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.45rem;
    color: var(--green-900) !important;
    font-weight: 800;
}
.navbar-codes-for-md .navbar-brand i {
    color: var(--green-600);
}
.navbar-codes-for-md .nav-link {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--gray-700) !important;
    padding: 8px 16px !important;
    position: relative;
    transition: color 0.25s ease;
}
.navbar-codes-for-md .nav-link:hover, 
.navbar-codes-for-md .nav-link.active {
    color: var(--green-800) !important;
}
.navbar-codes-for-md .nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--green-600);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}
.navbar-codes-for-md .nav-link:hover::after,
.navbar-codes-for-md .nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Navbar Buttons */
.btn-nav-outline {
    border: 2px solid var(--green-700);
    color: var(--green-700) !important;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 8px 20px;
    border-radius: 8px;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.btn-nav-outline:hover {
    background: var(--green-50);
    transform: translateY(-1px);
}
.btn-nav-primary {
    background: var(--green-700);
    border: 2px solid var(--green-700);
    color: white !important;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 8px 22px;
    border-radius: 8px;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(30, 112, 66, 0.15);
}
.btn-nav-primary:hover {
    background: var(--green-800);
    border-color: var(--green-800);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(30, 112, 66, 0.25);
}

/* Custom Branded Footer */
.bg-codes-for-md-dark {
    background: var(--green-900) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    padding: 80px 0 40px;
    position: relative;
    border-top: 1px solid var(--green-800);
}
.bg-codes-for-md-dark h5,
.bg-codes-for-md-dark h6 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 20px;
}
.bg-codes-for-md-dark a {
    color: rgba(255, 255, 255, 0.65) !important;
    text-decoration: none;
    transition: all 0.25s ease;
    display: inline-block;
    margin-bottom: 12px;
}
.bg-codes-for-md-dark a:hover {
    color: var(--green-300) !important;
    transform: translateX(3px);
}
.bg-codes-for-md-dark .footer-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--white) !important;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bg-codes-for-md-dark .footer-brand i {
    color: var(--green-400);
}

/* Newsletter Input */
.footer-newsletter {
    position: relative;
    max-width: 320px;
}
.footer-newsletter .form-control {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    color: white !important;
    padding: 12px 100px 12px 16px !important;
    font-size: 0.9rem !important;
}
.footer-newsletter .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.footer-newsletter .form-control:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: var(--green-400) !important;
    box-shadow: none !important;
    color: white !important;
}
.footer-newsletter .btn-submit {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    background: var(--green-600);
    border: none;
    color: white;
    border-radius: 6px;
    padding: 0 16px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: background 0.2s;
}
.footer-newsletter .btn-submit:hover {
    background: var(--green-700);
}

/* Social Buttons */
.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}
.footer-social-btn {
    width: 38px; height: 38px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white !important;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    transition: all 0.25s ease !important;
}
.footer-social-btn:hover {
    background: var(--green-500);
    color: white !important;
    border-color: var(--green-500);
    transform: translateY(-2px) !important;
}

/* Credential Badges in Footer */
.footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}
.footer-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 14px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer-badge i { color: var(--green-400); }
