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

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: #f8fafc;
    color: #0f172a;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0284c7, #0d9488);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
}

.logo-text p {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

main {
    max-width: 1200px;
    margin: 3.5rem auto;
    padding: 0 1.5rem;
}

.search-section {
    margin-bottom: 3.5rem;
    text-align: center;
}

.search-title h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.search-title p {
    color: #64748b;
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.search-box-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1.1rem 1.5rem 1.1rem 3.2rem;
    font-size: 1.05rem;
    font-family: inherit;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    outline: none;
    transition: all 0.25s ease;
}

.search-input:focus {
    border-color: #0284c7;
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.08);
}

.search-icon-svg {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.25s;
}

.search-input:focus + .search-icon-svg {
    color: #0284c7;
}

.brands-section {
    margin-top: 2rem;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.brand-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2.25rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01), 0 2px 4px -2px rgba(0, 0, 0, 0.01);
}

.brand-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 24px -8px rgba(0, 0, 0, 0.05), 0 8px 16px -8px rgba(0, 0, 0, 0.03);
    border-color: #cbd5e1;
}

.brand-visual {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.75rem;
    color: #ffffff;
    margin-bottom: 1.5rem;
    transition: transform 0.3s;
}

.brand-card:hover .brand-visual {
    transform: scale(1.08);
}

.visual-beckman {
    background: linear-gradient(135deg, #f43f5e, #be123c);
    box-shadow: 0 8px 16px -4px rgba(244, 63, 94, 0.25);
}

.visual-roche {
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    box-shadow: 0 8px 16px -4px rgba(14, 165, 233, 0.25);
}

.visual-ge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 8px 16px -4px rgba(59, 130, 246, 0.25);
}

.visual-siemens {
    background: linear-gradient(135deg, #14b8a6, #0f766e);
    box-shadow: 0 8px 16px -4px rgba(20, 184, 166, 0.25);
}

.visual-sebia {
    background: linear-gradient(135deg, #6366f1, #4338ca);
    box-shadow: 0 8px 16px -4px rgba(99, 102, 241, 0.25);
}

.visual-etainlabs {
    background: linear-gradient(135deg, #a855f7, #6b21a8);
    box-shadow: 0 8px 16px -4px rgba(168, 85, 247, 0.25);
}

.visual-sysmex {
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 8px 16px -4px rgba(6, 182, 212, 0.25);
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.brand-desc {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1.75rem;
    line-height: 1.4;
    flex-grow: 1;
}

.brand-action-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    background-color: #f1f5f9;
    color: #475569;
    border-radius: 12px;
    transition: all 0.25s;
    display: inline-block;
}

.brand-card:hover .brand-action-btn {
    background-color: #0f172a;
    color: #ffffff;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #cbd5e1;
}

.empty-state h3 {
    color: #0f172a;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    header {
        padding: 1rem 1.5rem;
    }
    
    .header-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .search-title h2 {
        font-size: 1.85rem;
    }
    
    .brands-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s, transform 0.2s;
}

.back-link:hover {
    color: #0f172a;
    transform: translateX(-2px);
}

.categories-section {
    margin-bottom: 2.5rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.category-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.category-card.active {
    background-color: #f43f5e;
    border-color: #f43f5e;
    color: #ffffff;
    box-shadow: 0 8px 16px -4px rgba(244, 63, 94, 0.25);
}

.category-indicator {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.category-card.active h4 {
    color: #ffffff;
}

.category-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
}

.results-bar {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.manuals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.manual-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.4s ease forwards;
}

.manual-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.brand-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.brand-beckman {
    background-color: #fff1f2;
    color: #e11d48;
}

.equipment-type-tag {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    background-color: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.manual-info {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.manual-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.manual-meta-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: #64748b;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.btn-action {
    flex: 1;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.65rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-primary {
    background-color: #0f172a;
    color: #ffffff;
    border: 1px solid #0f172a;
}

.btn-primary:hover {
    background-color: #334155;
    border-color: #334155;
}

.btn-secondary {
    background-color: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .manuals-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.viewer-body {
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.viewer-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 2rem;
    z-index: 100;
}

.viewer-header-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.viewer-title-area h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #0f172a;
}

.viewer-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #0d9488;
    background-color: #f0fdfa;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.viewer-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    background-color: #f8fafc;
}

.viewer-sidebar {
    width: 340px;
    border-right: 1px solid #e2e8f0;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.viewer-search-box {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.viewer-search-box input {
    width: 100%;
    padding: 0.65rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s;
}

.viewer-search-box input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.08);
}

.viewer-topics-list {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    padding: 0.75rem;
}

.viewer-topic-item {
    margin-bottom: 0.25rem;
}

.viewer-topic-link {
    display: block;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    line-height: 1.4;
}

.viewer-topic-link:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.viewer-topic-link.active {
    background-color: #fff1f2;
    color: #e11d48;
    font-weight: 600;
}

.viewer-viewport {
    flex: 1;
    background-color: #ffffff;
    height: 100%;
    overflow: hidden;
}

#manualIframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .viewer-sidebar {
        width: 260px;
    }
}

