/* ===== HEALMEDY Documentation Styles ===== */

:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --secondary: #f97316;
    --accent: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --darker: #020617;
    --light: #f8fafc;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    --sidebar-width: 280px;
    --header-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--dark);
    color: var(--light);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-700);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.25rem;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: var(--gray-800);
    color: var(--light);
}

.nav-link.active {
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-icon {
    font-size: 1rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-700);
}

.version {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ===== Main Content ===== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    overflow-x: hidden;
}

.content-section {
    padding: 2rem 3rem;
    max-width: 1000px;
    margin: 0 auto;
    border-bottom: 1px solid var(--gray-200);
    overflow: hidden;
}

.section-header {
    margin-bottom: 2rem;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.section-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--gray-600);
    font-size: 1.1rem;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.blue { background: rgba(14, 165, 233, 0.1); }
.stat-icon.green { background: rgba(34, 197, 94, 0.1); }
.stat-icon.orange { background: rgba(249, 115, 22, 0.1); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.1); }

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* ===== Info Card ===== */
.info-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
}

.info-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.info-card ul {
    list-style: none;
}

.info-card li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.info-card li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* ===== Features Grid ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.1);
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.feature-icon {
    font-size: 1.5rem;
}

.feature-header h4 {
    font-size: 1rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* ===== Two Column Layout ===== */
.two-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.three-column {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .two-column, .three-column {
        grid-template-columns: 1fr;
    }
}

/* ===== Data Table ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    font-weight: 600;
    color: var(--gray-700);
    background: var(--gray-50);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* ===== Status Badges ===== */
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.opened { background: #dbeafe; color: #1d4ed8; }
.status-badge.info { background: #e0e7ff; color: #4338ca; }
.status-badge.progress { background: #fef3c7; color: #d97706; }
.status-badge.success { background: #d1fae5; color: #059669; }
.status-badge.warning { background: #fef3c7; color: #d97706; }
.status-badge.danger { background: #fee2e2; color: #dc2626; }
.status-badge.disabled { background: #f1f5f9; color: #64748b; }

.status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ===== Status Flow ===== */
.status-flow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.status-arrow {
    color: var(--gray-400);
    font-size: 0.9rem;
}

/* ===== Alert Box ===== */
.alert-box {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.alert-box.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.alert-box.warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

/* ===== Process Flow ===== */
.process-flow {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.process-step {
    flex: 1;
    min-width: 150px;
    text-align: center;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 0.75rem;
}

.step-content h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.step-content p {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.process-arrow {
    color: var(--gray-300);
    font-size: 1.5rem;
    padding-top: 0.5rem;
}

/* ===== Photo Grid ===== */
.photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.photo-item {
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: 8px;
    font-size: 0.85rem;
}

/* ===== Location Grid ===== */
.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.location-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
}

.location-icon {
    font-size: 1.5rem;
}

.location-name {
    font-weight: 600;
    display: block;
}

.location-desc {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* ===== Alert List ===== */
.alert-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
}

.alert-item.danger {
    background: #fef2f2;
}

.alert-item.warning {
    background: #fffbeb;
}

.alert-icon {
    font-size: 1.25rem;
}

.alert-item strong {
    display: block;
    margin-bottom: 0.25rem;
}

.alert-item p {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin: 0;
}

/* ===== Forms Grid ===== */
.forms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.form-category {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
}

.form-category h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.form-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 8px;
}

.form-item strong {
    display: block;
    font-size: 0.9rem;
}

.form-item p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 0;
}

/* ===== Notifications Overview ===== */
.notifications-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.notif-channel {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.channel-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.channel-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.channel-info p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.channel-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
}

.channel-status.active {
    background: #d1fae5;
    color: #059669;
}

/* ===== Roles Table ===== */
.roles-table-container {
    overflow-x: auto;
}

.roles-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.roles-table th,
.roles-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.roles-table th {
    background: var(--gray-50);
    font-weight: 600;
}

.role-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.role-badge.admin { background: #fef3c7; color: #d97706; }
.role-badge.manager { background: #dbeafe; color: #1d4ed8; }
.role-badge.doctor { background: #d1fae5; color: #059669; }
.role-badge.nurse { background: #fce7f3; color: #db2777; }
.role-badge.medic { background: #e0e7ff; color: #4338ca; }
.role-badge.att { background: #fae8ff; color: #a855f7; }
.role-badge.driver { background: #f1f5f9; color: #475569; }
.role-badge.call { background: #ccfbf1; color: #0d9488; }

/* ===== Tech Grid ===== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tech-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
}

.tech-card h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.tech-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: 8px;
}

.tech-logo {
    font-size: 1.25rem;
}

.tech-item strong {
    display: block;
    font-size: 0.9rem;
}

.tech-item p {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin: 0;
}

/* ===== Security Grid ===== */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.security-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.security-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.security-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.security-item p {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* ===== Compliance Grid ===== */
.compliance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.compliance-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
}

.compliance-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.compliance-icon {
    font-size: 1.5rem;
}

.compliance-card > p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.compliance-card ul {
    list-style: none;
}

.compliance-card li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
}

.compliance-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* ===== Architecture Diagram ===== */
.architecture-diagram {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--gray-200);
}

.arch-layer {
    margin-bottom: 1rem;
}

.layer-title {
    font-weight: 600;
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.layer-content {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.arch-box {
    padding: 0.75rem 1.5rem;
    background: var(--gray-100);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.arch-arrow {
    text-align: center;
    color: var(--gray-400);
    padding: 0.5rem 0;
}

/* ===== Footer ===== */
.main-footer {
    padding: 3rem;
    text-align: center;
    background: white;
    border-top: 1px solid var(--gray-200);
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-version {
    color: var(--gray-400);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-section {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 640px) {
    .section-header h1 {
        font-size: 1.5rem;
    }
    
    .process-flow {
        flex-direction: column;
        align-items: stretch;
    }
    
    .process-arrow {
        transform: rotate(90deg);
        text-align: center;
        padding: 0.5rem 0;
    }
}

/* ===== Screenshot Styles ===== */
.screenshot-container {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

.screenshot-container img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    object-position: top left;
    display: block;
}

.screenshot-caption {
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    font-size: 0.85rem;
    color: var(--gray-600);
    text-align: center;
    border-top: 1px solid var(--gray-200);
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
}

@media (max-width: 900px) {
    .screenshot-grid {
        grid-template-columns: 1fr;
    }
}

.screenshot-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.screenshot-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.screenshot-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: top left;
    border-bottom: 1px solid var(--gray-200);
}

.screenshot-card-content {
    padding: 1rem;
}

.screenshot-card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.screenshot-card-desc {
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* ===== Print Styles ===== */
@media print {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-section {
        page-break-after: always;
        padding: 1rem;
    }
    
    .info-card, .feature-card, .stat-card, .tech-card, .security-item, .compliance-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

