/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

header h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 5px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.back-link {
    display: inline-block;
    margin-bottom: 15px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Statistics Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
}

/* Search Bar */
.search-container {
    margin-bottom: 25px;
}

.search-container form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.search-btn {
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #5a67d8;
}

.clear-btn {
    padding: 12px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1em;
    display: inline-flex;
    align-items: center;
}

.clear-btn:hover {
    background: #c82333;
}

/* Results Info */
.results-info {
    margin-bottom: 20px;
    color: #666;
}

/* Drug Grid */
.drug-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.drug-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.drug-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.drug-card.has-vd {
    border-left: 4px solid #28a745;
}

.drug-card.no-vd {
    border-left: 4px solid #dc3545;
}

.drug-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.drug-card-header h2 {
    font-size: 1.2em;
    margin: 0;
}

.drug-card-header h2 a {
    color: #333;
    text-decoration: none;
}

.drug-card-header h2 a:hover {
    color: #667eea;
}

.vd-badge {
    font-size: 0.8em;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.badge-available {
    background: #d4edda;
    color: #155724;
}

.badge-missing {
    background: #f8d7da;
    color: #721c24;
}

.drug-card-body {
    margin-bottom: 15px;
}

.drug-info {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.drug-info:last-child {
    border-bottom: none;
}

.drug-info.highlight {
    background: #e8f5e9;
    padding: 5px 10px;
    border-radius: 4px;
    margin-top: 5px;
}

.info-label {
    color: #666;
    font-weight: 500;
}

.info-value {
    color: #333;
    font-weight: 500;
}

.drug-card-footer {
    text-align: right;
}

.view-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
}

.view-btn:hover {
    background: #5a67d8;
}

/* View Page Specific */
.vd-status-banner {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 500;
}

.status-available {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-missing {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.detail-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.detail-item.vd-highlight {
    background: #e8f5e9;
    border-color: #28a745;
    border-width: 2px;
}

.detail-label {
    font-size: 0.85em;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1.1em;
    color: #333;
    font-weight: 500;
}

/* Actions */
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.action-btn {
    padding: 10px 25px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

.action-btn:hover {
    background: #5a67d8;
}

.action-btn.refresh-btn {
    background: #17a2b8;
}

.action-btn.refresh-btn:hover {
    background: #138496;
}

.action-btn.print-btn {
    background: #6c757d;
}

.action-btn.print-btn:hover {
    background: #5a6268;
}

/* Raw Data */
.raw-data {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.raw-data h3 {
    margin-bottom: 10px;
    color: #333;
}

.raw-data pre {
    background: white;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.9em;
    border: 1px solid #dee2e6;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 50px 20px;
    grid-column: 1 / -1;
}

.no-results p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 20px;
}

.back-btn {
    display: inline-block;
    padding: 10px 25px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
}

/* Footer */
footer {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 2px solid #f0f0f0;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .drug-grid {
        grid-template-columns: 1fr;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-container form {
        flex-direction: column;
    }
    
    .search-btn, .clear-btn {
        width: 100%;
        justify-content: center;
    }
}

@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .actions, .search-container, .stats-bar, .raw-data {
        display: none;
    }
}
/* Formula Display */
.formula-display {
    display: inline-block;
    padding: 2px 10px;
    background: #f8f9fa;
    border: 1px dashed #6c757d;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #495057;
}

/* Drug Card - Remove colored borders */
.drug-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.drug-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Drug Card Header */
.drug-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.drug-card-header h2 {
    font-size: 1.2em;
    margin: 0;
}

.drug-card-header h2 a {
    color: #333;
    text-decoration: none;
}

.drug-card-header h2 a:hover {
    color: #667eea;
}

/* Drug Info */
.drug-info {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.drug-info:last-child {
    border-bottom: none;
}

.info-label {
    color: #666;
    font-weight: 500;
}

.info-value {
    color: #333;
    font-weight: 500;
}

/* View Button */
.view-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
}

.view-btn:hover {
    background: #5a67d8;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 50px 20px;
    grid-column: 1 / -1;
}

.no-results p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 20px;
}

.back-btn {
    display: inline-block;
    padding: 10px 25px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
}

/* Footer */
footer {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 2px solid #f0f0f0;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .drug-grid {
        grid-template-columns: 1fr;
    }
    
    .search-container form {
        flex-direction: column;
    }
    
    .search-btn, .clear-btn {
        width: 100%;
        justify-content: center;
    }
}
/* Pregnancy Category Styles */
.pregnancy-info {
    background: #f0f8ff;
    border: 2px solid #2196F3;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.pregnancy-info h3 {
    color: #0d47a1;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.pregnancy-description {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.pregnancy-description strong {
    display: block;
    font-size: 1.1em;
    color: #0d47a1;
    margin-bottom: 8px;
}

.pregnancy-description p {
    margin: 0;
    line-height: 1.6;
    color: #333;
}

.pregnancy-note {
    margin-top: 12px;
    padding: 10px;
    background: #fff3cd;
    border-radius: 6px;
    border: 1px solid #ffc107;
}

.pregnancy-note small {
    color: #856404;
}

.detail-item.pregnancy-highlight {
    background: #e3f2fd;
    border: 2px solid #2196F3;
}

.detail-item.pregnancy-highlight .detail-label {
    color: #0d47a1;
}

.detail-item.pregnancy-highlight .detail-value {
    color: #0d47a1;
    font-weight: bold;
}

/* Footer Note */
.footer-note {
    margin-top: 10px;
    font-size: 0.85em;
    color: #999;
}

/* Detail Item - General */
.detail-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.detail-label {
    font-size: 0.85em;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1.1em;
    color: #333;
    font-weight: 500;
}

/* Actions */
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.action-btn {
    padding: 10px 25px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

.action-btn:hover {
    background: #5a67d8;
}

.action-btn.refresh-btn {
    background: #17a2b8;
}

.action-btn.refresh-btn:hover {
    background: #138496;
}

.action-btn.print-btn {
    background: #6c757d;
}

.action-btn.print-btn:hover {
    background: #5a6268;
}

/* Footer */
footer {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 2px solid #f0f0f0;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        text-align: center;
    }
}
/* ============================================
   DRUG PROPERTIES SECTION
   ============================================ */

.drug-properties-section {
    margin: 40px 0 30px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    border: 1px solid #dee2e6;
}

.section-title {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-intro {
    color: #6c757d;
    font-size: 1.05em;
    margin-bottom: 30px;
    line-height: 1.6;
    padding-bottom: 20px;
    border-bottom: 2px solid #dee2e6;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.property-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e9ecef;
}

.property-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.property-icon {
    font-size: 2em;
    min-width: 45px;
    text-align: center;
    line-height: 1.2;
    padding-top: 2px;
}

.property-content {
    flex: 1;
}

.property-name {
    font-size: 1.1em;
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.property-description {
    color: #495057;
    font-size: 0.95em;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.property-description strong {
    color: #2c3e50;
    font-weight: 600;
}

.property-description em {
    color: #6c757d;
    font-style: italic;
}

.property-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-block;
    padding: 2px 10px;
    background: #e9ecef;
    color: #495057;
    font-size: 0.7em;
    font-weight: 500;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tag:hover {
    background: #dee2e6;
}

/* Pregnancy Card Special Styling */
.property-card.pregnancy-card {
    background: linear-gradient(135deg, #fdf6f0 0%, #f8ecf0 100%);
    border: 2px solid #e8c4c4;
}

.property-card.pregnancy-card .property-name {
    color: #8b3a3a;
}

/* Responsive */
@media (max-width: 768px) {
    .drug-properties-section {
        padding: 15px;
        margin: 20px 0;
    }

    .section-title {
        font-size: 1.4em;
    }

    .properties-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .property-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px;
    }

    .property-icon {
        font-size: 2.5em;
        min-width: auto;
    }

    .property-tags {
        justify-content: center;
    }
}

@media print {
    .drug-properties-section {
        background: white !important;
        border: 1px solid #ddd !important;
    }

    .property-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .property-card:hover {
        transform: none !important;
    }
}
/* ============================================
   NAVIGATION BAR
   ============================================ */

.navbar {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    border-radius: 12px 12px 0 0;
    margin-bottom: 20px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.nav-brand {
    color: white;
    font-size: 1.4em;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-brand .brand-icon {
    font-size: 1.6em;
}

.nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

.nav-link.active {
    background: rgba(255,255,255,0.2);
    color: white;
    font-weight: 500;
}

.nav-link span {
    font-size: 1.1em;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 10px 0;
        gap: 10px;
    }
    
    .nav-links {
        justify-content: center;
        width: 100%;
        gap: 5px;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 0.85em;
    }
    
    .nav-link span {
        font-size: 0.9em;
    }
}