* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #ffffff;
}

.navbar {
    background: #1a1a2e;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo-img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.1);
}

.nav-link.active {
    color: #ffffff;
    background: #a31631;
}

.lang-btn {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.7);
}

header {
    background: #1a1a2e;
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.bio-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin: 1rem 0 2rem;
    color: rgba(255,255,255,0.8);
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-primary, .btn-secondary {
    padding: 0.875rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-primary {
    background: #a31631;
    color: white;
}

.btn-primary:hover {
    background: #8a1229;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.6);
}

.btn-secondary:hover {
    background: white;
    color: #1a1a2e;
    border-color: white;
}

.page-subtitle {
    font-size: 1.1rem;
    margin-top: 0.75rem;
    color: rgba(255,255,255,0.7);
    font-weight: 300;
}

.home-section {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    text-align: center;
}

.home-section h2 {
    color: #1a1a2e;
    margin-bottom: 1rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.home-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    transition: all 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.card h3 {
    color: #1a1a2e;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.card-link {
    color: #a31631;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.95rem;
}

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

.ask-intro, .kb-intro {
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #e5e5e5;
}

.disclaimer {
    background: #fff8e1;
    border-left: 4px solid #f5a623;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
}

.question-form-section, .kb-search {
    padding: 2rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #e5e5e5;
}

.ask-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #a31631;
    box-shadow: 0 0 0 3px rgba(163,22,49,0.08);
}

.search-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

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

.kb-categories {
    padding: 2rem;
}

.kb-categories h2 {
    color: #1a1a2e;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.kb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.kb-card {
    background: white;
    padding: 1.75rem;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    transition: all 0.2s;
}

.kb-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.kb-card h3 {
    color: #1a1a2e;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.kb-count {
    display: inline-block;
    margin-top: 1rem;
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
}

.kb-recent {
    padding: 2rem;
}

.kb-recent h2 {
    color: #1a1a2e;
    font-size: 1.5rem;
    font-weight: 700;
}

.placeholder-text {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 2rem;
}

.admin-container {
    min-height: 100vh;
}

.login-box {
    max-width: 400px;
    margin: 10rem auto;
    padding: 3rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.login-box h1 {
    text-align: center;
    color: #1a1a2e;
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e5e5e5;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: #a31631;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.questions-list {
    padding: 2rem;
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-options {
    display: flex;
    gap: 1rem;
}

.filter-options select {
    padding: 0.625rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
}

.filter-options select:focus {
    outline: none;
    border-color: #a31631;
}

.filter-tabs {
    display: flex;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.tab-btn {
    padding: 0.625rem 1.25rem;
    border: 1px solid #e5e5e5;
    background: white;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    font-family: inherit;
}

.tab-btn:hover {
    border-color: #a31631;
    color: #a31631;
}

.tab-btn.active {
    background: #a31631;
    color: white;
    border-color: #a31631;
}

.question-card {
    background: white;
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 8px;
    border-left: 4px solid #1a1a2e;
    border-top: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.question-card.answered {
    border-left-color: #2e7d32;
}

.question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.pending {
    background: #fff3e0;
    color: #e65100;
}

.status-badge.answered {
    background: #e8f5e9;
    color: #2e7d32;
}

.question-body p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.attachments {
    margin: 1rem 0;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
}

.attachment-link {
    display: block;
    color: #a31631;
    text-decoration: none;
    padding: 0.5rem;
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

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

.form-group small {
    color: #888;
    font-size: 0.85rem;
}

.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #000;
}

main {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.profile-container {
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    overflow: hidden;
}

.profile-header {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 2rem;
    background: #f9f9f9;
    border-bottom: 1px solid #e5e5e5;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-info p {
    font-size: 0.95rem;
    padding: 0.25rem 0;
}

.profile-photo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-photo img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bio-content {
    padding: 2rem;
}

.bio-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.bio-section:last-child {
    border-bottom: none;
}

.bio-section h2 {
    color: #1a1a2e;
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.bio-section p {
    text-align: justify;
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
}

.media-section {
    padding: 2rem;
    background: #f9f9f9;
    border-top: 1px solid #e5e5e5;
}

.media-section h3 {
    color: #1a1a2e;
    margin-bottom: 1rem;
    font-weight: 600;
}

.media-section audio,
.media-section video {
    width: 100%;
    margin: 1rem 0;
    border-radius: 6px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #1a1a2e;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.social-link:hover {
    background: #a31631;
    transform: translateY(-2px);
}

.social-icon {
    font-size: 1.1rem;
    font-weight: bold;
}

.embedded-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
}

.embed-item {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.embed-item h3 {
    color: #1a1a2e;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.embed-item iframe {
    border-radius: 4px;
    background: white;
}


#comments {
    padding: 2rem;
    border-top: 2px solid #1a1a2e;
}

#comments h3 {
    color: #1a1a2e;
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.comment {
    border-left: 4px solid #a31631;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    background: #f9f9f9;
    border-radius: 0 6px 6px 0;
}

.comment-author {
    font-weight: 600;
    color: #1a1a2e;
    font-size: 1rem;
}

.comment-date {
    font-size: 0.8rem;
    color: #888;
}

#comment-form {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#comment-form input,
#comment-form textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

#comment-form input:focus,
#comment-form textarea:focus {
    outline: none;
    border-color: #a31631;
    box-shadow: 0 0 0 3px rgba(163,22,49,0.08);
}

#comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

#comment-form button {
    padding: 0.875rem;
    background: #a31631;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s;
}

#comment-form button:hover {
    background: #8a1229;
}

/* Medical Dashboard Styles */
.sidebar { background: white; padding: 2rem; border-radius: 8px; border: 1px solid #e5e5e5; margin-bottom: 2rem; }
.main-content { flex: 1; background: white; padding: 2rem; border-radius: 8px; border: 1px solid #e5e5e5; }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2rem; margin: 2rem 0; }
#chat-container { margin-top: 2rem; border: 1px solid #e5e5e5; border-radius: 8px; overflow: hidden; }
#chat-messages { height: 400px; overflow-y: auto; padding: 1rem; background: #f9f9f9; }
.message { margin: 1rem 0; padding: 1rem; border-radius: 8px; }
.message.user { background: #1a1a2e; color: white; margin-left: 20%; }
.message.assistant { background: white; border: 1px solid #e5e5e5; margin-right: 20%; }
.chat-input { display: flex; padding: 1rem; background: white; border-top: 1px solid #e5e5e5; }
.chat-input input { flex: 1; padding: 0.75rem; border: 1px solid #e5e5e5; border-radius: 6px; margin-right: 1rem; font-family: inherit; }
.chat-input input:focus { outline: none; border-color: #a31631; }
.report-item { padding: 0.75rem; margin: 0.5rem 0; background: #f9f9f9; border-radius: 6px; cursor: pointer; transition: background 0.2s; border: 1px solid #e5e5e5; }
.report-item:hover { background: #f0f0f0; border-color: #a31631; }
.nav-links { display: flex; gap: 1rem; align-items: center; }
.nav-links a { color: white; text-decoration: none; padding: 0.5rem 1rem; border-radius: 4px; transition: background 0.2s; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,0.15); }
#data-table table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
#data-table th, #data-table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid #e5e5e5; font-size: 0.9rem; }
#data-table th { background: #f9f9f9; font-weight: 600; color: #1a1a2e; }

.notes-form-section, .notes-list-section {
    padding: 2rem;
    margin-bottom: 2rem;
}

.note-card {
    background: white;
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 8px;
    border-left: 4px solid #1a1a2e;
    border-top: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
    transition: all 0.2s;
}

.note-card:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.note-preview {
    color: #666;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.note-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.5rem;
}

.note-full-content {
    white-space: pre-wrap;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 6px;
    margin: 1rem 0;
    border: 1px solid #e5e5e5;
}

.audio-section, .attachments-section {
    margin: 2rem 0;
}

.audio-section audio {
    width: 100%;
    margin-top: 0.5rem;
}

.recording-item {
    background: white;
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    border-left: 3px solid #a31631;
    border: 1px solid #e5e5e5;
    border-left: 3px solid #a31631;
}

.recording-item audio {
    margin-top: 0.5rem;
}

#reports-list, #recordings-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.75rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .profile-header {
        grid-template-columns: 1fr;
    }

    .bio-section h2 {
        font-size: 1.15rem;
    }

    .social-links {
        flex-direction: column;
    }

    .social-link {
        justify-content: center;
    }

    .home-cards, .kb-grid {
        grid-template-columns: 1fr;
    }

    .nav-container { flex-direction: column; align-items: flex-start; }
    .nav-links { flex-direction: column; width: 100%; gap: 0.5rem; }
    .nav-links a, .nav-links button { width: 100%; text-align: center; }
    .dashboard-layout { flex-direction: column; }
    .sidebar-panel { width: 100%; }
    .admin-stats { grid-template-columns: 1fr; }
    .question-card { padding: 1rem; }
    .modal-content { width: 95%; padding: 1.5rem; }
    #data-table { font-size: 0.85rem; }
    #data-table th, #data-table td { padding: 0.5rem; }
    .message { max-width: 90%; }
    .chart-container { padding: 0.5rem; }
}

@media (max-width: 480px) {
    header h1 { font-size: 1.5rem; }
    .nav-logo { font-size: 1.2rem; }
    .btn-primary, .btn-secondary { padding: 0.5rem 1rem; font-size: 0.9rem; }
    .stat-card h3 { font-size: 2rem; }
}
