/* Sidebar Styles */
.sidebar {
    width: 18rem;
    background-color: #0f172a;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 30;
    position: relative;
    border-right: 1px solid #1e293b;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(30, 41, 59, 0.8);
    background-color: rgba(2, 6, 23, 0.4);
}

.sidebar-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
}

.sidebar-logo {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
    letter-spacing: 0.025em;
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.sidebar-brand-subtext {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-toggle-btn {
    color: #cbd5e1;
    padding: 0.5rem;
    border-radius: 0.75rem;
    background-color: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.8);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sidebar-toggle-btn:hover {
    color: #ffffff;
    background-color: #334155;
}

.sidebar-role-container {
    padding: 0.875rem 1.25rem;
    background-color: rgba(30, 41, 59, 0.4);
    border-bottom: 1px solid rgba(30, 41, 59, 0.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
}

.sidebar-role-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #94a3b8;
    text-transform: uppercase;
}

.sidebar-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.sidebar-role-badge.admin {
    background-color: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.sidebar-role-badge.dokter {
    background-color: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.sidebar-role-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.sidebar-role-dot.admin {
    background-color: #34d399;
}

.sidebar-role-dot.dokter {
    background-color: #fbbf24;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.sidebar-menu-title {
    padding: 0 0.75rem 0.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    color: #94a3b8;
    text-decoration: none;
    cursor: pointer;
}

.sidebar-menu-item:hover {
    color: #ffffff;
    background-color: rgba(30, 41, 59, 0.7);
}

.sidebar-menu-item.active {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.sidebar-menu-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.sidebar-menu-item.active .sidebar-menu-icon {
    color: #ffffff;
}

.sidebar-menu-text {
    font-size: 0.875rem;
}

.bento-actions {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* gap: 1.5rem; */
    background-color: #fffbeb;
    /* padding: 1.25rem 1.5rem; */
    border-radius: 0.75rem;
    border: 1px dashed #fcd34d;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 15px;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #f8f9ff;
}

/* Header Styles */
.top-header {
    height: 5rem;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 20;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.welcome-content {
    position: relative;
    z-index: 10;
    max-width: 42rem;
    display: flex;
    flex-direction: column;
    /* gap: 0.5rem; */
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-sidebar-toggle {
    display: none;
    color: #64748b;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-sidebar-toggle:hover {
    background-color: #f1f5f9;
}

@media (max-width: 768px) {
    .mobile-sidebar-toggle {
        display: block;
    }
}

.page-hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem !important;
    gap: 1rem !important;
    margin-bottom: 0.5rem !important;
}

.page-hero-title {
    font-size: 1.125rem !important;
}

.page-hero-desc {
    margin-top: 0.125rem !important;
    font-size: 0.75rem !important;
}

.page-hero-tag {
    margin-bottom: 0.25rem !important;
}

.metric-pill {
    padding: 0.5rem 0.75rem !important;
    gap: 0.25rem !important;
}

.metric-value-wrap {
    gap: 0.25rem !important;
}

.metric-number {
    font-size: 1.25rem !important;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.025em;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-time {
    display: none;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

@media (min-width: 1024px) {
    .header-time {
        display: flex;
    }
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 1rem;
    border-left: 1px solid #e2e8f0;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.user-info {
    display: none;
    flex-direction: column;
}

@media (min-width: 640px) {
    .user-info {
        display: flex;
    }
}

.user-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e293b;
}

.user-role {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    text-transform: capitalize;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #ef4444;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.2s;
    text-decoration: none;
    cursor: pointer;
}

.logout-btn:hover {
    background-color: #fef2f2;
}

.main-scroll-area {
    flex: 1;
    overflow-y: auto;
}

/* Detail RM & Semantic Layouts */
.mb-6 {
    margin-bottom: 1.5rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-1 {
    gap: 0.25rem;
}

.flex {
    display: flex;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-1 {
    flex: 1;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-start {
    align-items: flex-start;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

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

.justify-end {
    justify-content: flex-end;
}

.justify-around {
    justify-content: space-around;
}

/* Colors */
.bg-slate-50 {
    background-color: #f8fafc;
}

.bg-slate-100 {
    background-color: #f1f5f9;
}

.bg-white {
    background-color: #ffffff;
}

.bg-transparent {
    background-color: transparent;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-blue-600 {
    background-color: #2563eb;
}

.bg-emerald-50 {
    background-color: #ecfdf5;
}

.bg-red-500 {
    background-color: #ef4444;
}

.bg-orange-500 {
    background-color: #f97316;
}

.bg-purple-600 {
    background-color: #9333ea;
}

.text-slate-400 {
    color: #94a3b8;
}

.text-slate-500 {
    color: #64748b;
}

.text-slate-600 {
    color: #475569;
}

.text-slate-800 {
    color: #1e293b;
}

.text-blue-600 {
    color: #2563eb;
}

.text-emerald-600 {
    color: #059669;
}

.text-red-500 {
    color: #ef4444;
}

.text-white {
    color: #ffffff;
}

/* Borders & Shadow */
.border {
    border-width: 1px;
    border-style: solid;
}

.border-none {
    border: none;
}

.border-b {
    border-bottom-width: 1px;
    border-bottom-style: solid;
}

.border-slate-100 {
    border-color: #f1f5f9;
}

.border-slate-200 {
    border-color: #e2e8f0;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-md {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-full {
    border-radius: 9999px;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Spacing */
.m-0 {
    margin: 0;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.pb-2 {
    padding-bottom: 0.5rem;
}

.pt-1 {
    padding-top: 0.25rem;
}

/* Sizing */
.w-full {
    width: 100%;
}

.h-auto {
    height: auto;
}

.h-9 {
    height: 2.25rem;
}

.w-2\.5 {
    width: 0.625rem;
}

.h-2\.5 {
    height: 0.625rem;
}

.w-72 {
    width: 18rem;
}

/* Typography */
.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

.font-normal {
    font-weight: 400;
}

.italic {
    font-style: italic;
}

.uppercase {
    text-transform: uppercase;
}

.text-left {
    text-align: left;
}

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

.text-right {
    text-align: right;
}

/* Utilities */
.cursor-pointer {
    cursor: pointer;
}

.pointer-events-auto {
    pointer-events: auto;
}

.pointer-events-none {
    pointer-events: none;
}

.resize-none {
    resize: none;
}

.outline-none {
    outline: none;
}

.overflow-x-auto {
    overflow-x: auto;
}

.border-collapse {
    border-collapse: collapse;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-40 {
    z-index: 40;
}

.transform {
    transform: translate(var(--tw-translate-x), var(--tw-translate-y));
}

.-translate-x-1\/2 {
    --tw-translate-x: -50%;
}

.-translate-y-1\/2 {
    --tw-translate-y: -50%;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.duration-200 {
    transition-duration: 200ms;
}

.hover\:bg-slate-100:hover {
    background-color: #f1f5f9;
}

.hover\:text-slate-600:hover {
    color: #475569;
}

/* Grid Components */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .sm\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Icon Resizing */
.icon-sm {
    font-size: 18px;
}

.icon-md {
    font-size: 24px;
}

/* Panel Base */
.panel {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

/* Breadcrumb Layout */
.page-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.breadcrumb-link {
    color: #64748b;
    transition: color 0.2s;
    text-decoration: none;
}

.breadcrumb-link:hover {
    color: #2563eb;
}

.breadcrumb-separator {
    color: #64748b;
    font-size: 14px;
}

.breadcrumb-current {
    color: #2563eb;
    font-weight: 700;
}

/* Specific Components */
.btn-primary-orange {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #f97316;
    color: #ffffff;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary-orange:hover {
    background-color: #ea580c;
}

.btn-light {
    background-color: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-light:hover {
    color: #ef4444;
    border-color: #fecaca;
    background-color: #fef2f2;
}

/* Patient Info Panel */
.patient-info-header {
    padding: 1.5rem;
    background-color: #eff6ff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.patient-avatar-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.patient-avatar-large {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.patient-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.patient-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

.badge-rm {
    padding: 0.125rem 0.5rem;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem;
    font-family: monospace;
    font-weight: 700;
    color: #2563eb;
}

.kunjungan-meta {
    text-align: right;
}

.meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 600;
    margin: 0;
}

.meta-value {
    font-size: 1.125rem;
    color: #1e293b;
    font-weight: 700;
    margin: 0.25rem 0 0 0;
}

.meta-subvalue {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0.25rem 0 0 0;
}

.patient-info-body {
    padding: 1.5rem;
}

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

.info-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1rem;
    color: #1e293b;
    font-weight: 600;
}

.badge-status-success {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: #ecfdf5;
    color: #059669;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Data Box */
.data-box {
    background-color: #f8fafc;
    border-radius: 0.75rem;
    padding: 1rem;
}

.data-box-highlight {
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.data-box-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #2563eb;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.data-box-value {
    font-size: 1rem;
    color: #1e293b;
    margin: 0;
}

/* Compact Form Fixes */
.form-input {
    padding: 0.375rem 0.625rem !important;
    font-size: 0.8125rem !important;
}

.input-wrapper .form-input {
    padding-left: 2rem !important;
}

.form-grid {
    gap: 0.5rem !important;
}

.form-group {
    gap: 0 !important;
    margin-bottom: 0 !important;
}

.form-label {
    font-size: 0.6875rem !important;
    margin-bottom: 0.125rem !important;
}

.field-input-wrap {
    position: relative;
    padding-left: 20px;
    padding-right: 45px;
    margin-right: 25px;
    margin-left: 25px;

}

/* Panel Components */
.panel-header {
    padding: 0.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.panel-body {
    padding: 1.5rem;
}

.panel-title-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

/* Grid specific to dashboard */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media(min-width: 1024px) {
    .dashboard-grid {
        flex-direction: row;
    }

    .dashboard-col-2 {
        flex: 2;
    }

    .dashboard-col-1 {
        flex: 1;
        min-width: 380px;
    }
}

.bento-body {
    display: flex;
    flex-direction: column;
}

.data-table th {
    padding: 0.5rem 1rem !important;
}

.data-table td {
    padding: 0.5rem 1rem !important;
}

.badge-status {
    padding: 0.125rem 0.5rem !important;
    font-size: 0.6875rem !important;
}

.bento-actions {
    /* padding-top: 1.5rem; */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    /* gap: 1rem; */
    background-color: #f8fafc;
    padding: 0.5rem;
    border-radius: 0.5rem;
    /* margin-top: 0.5rem; */
}

.bento-panel {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: -1rem;
}

/* Body Mapping Components */
.body-mapping-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    overflow: hidden;
}

.body-mapping-inner {
    display: flex;
    justify-content: space-around;
    width: 360px;
    height: 430px;
    position: relative;
}

.body-view {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.body-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.body-svg {
    width: 130px;
    height: auto;
    color: #94a3b8;
}

.pin-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.pin-point {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    z-index: 10;
}

.pin-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s;
}

.pin-marker:hover {
    transform: scale(1.2);
}

.pin-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: #94a3b8;
    font-style: italic;
    background-color: rgba(248, 250, 252, 0.8);
}

.pins-table-wrap {
    margin-top: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #ffffff;
}

.pins-table {
    width: 100%;
    text-align: left;
    font-size: 0.875rem;
    border-collapse: collapse;
}

.pins-table th {
    padding: 0.75rem;
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 600;
}

.pins-table td {
    padding: 0.75rem;
    border-top: 1px solid #f1f5f9;
    color: #1e293b;
}