*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:Arial,sans-serif;
}

body{
  display:flex;
  background:#f4f7fb;
  color:#222;
}

.sidebar{
  width:260px;
  min-height:100vh;
  background:#0f172a;
  color:white;
  padding:24px;
  position:fixed;
}

.sidebar h2{
  margin-bottom:30px;
}

.sidebar nav{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.sidebar a{
  color:white;
  text-decoration:none;
  padding:12px;
  border-radius:10px;
  transition:0.2s;
}

.sidebar a:hover{
  background:#1e293b;
}

.main{
  margin-left:260px;
  width:100%;
  padding:24px;
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:30px;
}

.btn{
  background:#2563eb;
  color:white;
  border:none;
  padding:12px 18px;
  border-radius:10px;
  cursor:pointer;
}

.cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:18px;
  margin-top:20px;
}

.card{
  padding:22px;
  border-radius:18px;
  color:white;
}

.card span{
  display:block;
  font-size:34px;
  font-weight:bold;
  margin-top:10px;
}

.blue{background:#2563eb;}
.red{background:#dc2626;}
.yellow{background:#d97706;}
.green{background:#16a34a;}
.gray{background:#64748b;}

section{
  margin-top:45px;
}

.section-head{
  display:flex;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
}

.filters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.filters input,
.filters select{
  padding:10px;
  border-radius:10px;
  border:1px solid #d1d5db;
}

.tabs{
  margin-top:20px;
  display:flex;
  gap:10px;
  overflow:auto;
}

.tabs button{
  border:none;
  background:white;
  padding:10px 18px;
  border-radius:10px;
  cursor:pointer;
}

.tabs .active{
  background:#2563eb;
  color:white;
}

.patient-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:20px;
  margin-top:25px;
}

.patient-card{
  background:white;
  padding:20px;
  border-radius:18px;
  border-left:8px solid;
  box-shadow:0 5px 20px rgba(0,0,0,0.06);
}

.patient-card h3{
  margin:12px 0;
}

.patient-card p{
  margin-bottom:8px;
  font-size:14px;
}

.patient-card button{
  margin-top:12px;
  width:100%;
  padding:10px;
  border:none;
  border-radius:10px;
  background:#111827;
  color:white;
}

.preop{
  border-color:#dc2626;
}

.durante{
  border-color:#d97706;
}

.done{
  border-color:#16a34a;
}

.status{
  display:inline-block;
  padding:6px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:bold;
  color:white;
}

.preop .status{background:#dc2626;}
.durante .status{background:#d97706;}
.done .status{background:#16a34a;}

.analytics-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
  margin-top:20px;
}

.analytics-card{
  background:white;
  padding:24px;
  border-radius:18px;
  box-shadow:0 5px 20px rgba(0,0,0,0.06);
}

.patient-form{
  margin-top:20px;
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:18px;
}

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

.form-group label{
  margin-bottom:8px;
  font-weight:bold;
}

.form-group input,
.form-group textarea{
  padding:12px;
  border-radius:10px;
  border:1px solid #d1d5db;
}

.full{
  grid-column:1/-1;
}

@media(max-width:900px){
  body{
    flex-direction:column;
  }

  .sidebar{
    position:relative;
    width:100%;
    min-height:auto;
  }

  .main{
    margin-left:0;
  }

  .topbar{
    flex-direction:column;
    align-items:flex-start;
    gap:14px;
  }

  .patient-form{
    grid-template-columns:1fr;
  }
}

.tab-content{
  display:none;
}

.tab-content.active{
  display:block;
}

.patient-card{
    background:#fff;
    border-radius:16px;
    padding:18px;
    margin-top:20px;
    box-shadow:0 2px 10px rgba(0,0,0,0.08);
    overflow:auto;
}

.operasi-table{
    width:100%;
    border-collapse:collapse;
    margin-top:15px;
    font-size:14px;
}

.operasi-table th{
    width:140px;
    background:#f3f4f6;
    text-align:left;
    padding:10px;
    border:1px solid #d1d5db;
    vertical-align:top;
}

.operasi-table td{
    padding:10px;
    border:1px solid #d1d5db;
    vertical-align:top;
}

.edit-btn{
    margin-top:15px;
    width:100%;
    background:#111827;
    color:#fff;
    border:none;
    padding:12px;
    border-radius:10px;
    cursor:pointer;
}

.status{
    display:inline-block;
    background:#dc2626;
    color:#fff;
    padding:6px 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:bold;
}


.ok-tabs{
    display:flex;
    gap:10px;
    margin-top:20px;
    margin-bottom:20px;
    overflow:auto;
}

.ok-btn{
    border:none;
    background:#e5e7eb;
    padding:10px 16px;
    border-radius:10px;
    cursor:pointer;
    white-space:nowrap;
}

.ok-btn.active{
    background:#2563eb;
    color:#fff;
}

.ok-content{
    display:none;
}

.ok-content.active{
    display:block;
}

.ppds-box{
    margin-top:10px;
    margin-bottom:15px;
    background:#eff6ff;
    color:#1e40af;
    padding:10px 14px;
    border-radius:10px;
    font-size:14px;
    font-weight:600;
    border-left:4px solid #2563eb;
}



.form-card{
    background:#fff;
    padding:25px;
    border-radius:18px;
    margin-top:20px;
    box-shadow:0 2px 10px rgba(0,0,0,0.08);
    max-width:700px;
}

.form-group{
    margin-bottom:20px;
}

.form-group label{
    display:block;
    margin-bottom:8px;
    font-weight:600;
    color:#111827;
}

.form-group input,
.form-group select{
    width:100%;
    padding:12px;
    border:1px solid #d1d5db;
    border-radius:10px;
    font-size:14px;
}

.submit-btn{
    width:100%;
    background:#2563eb;
    color:#fff;
    border:none;
    padding:14px;
    border-radius:12px;
    font-size:15px;
    font-weight:600;
    cursor:pointer;
}

.submit-btn:hover{
    opacity:0.9;
}

.usia-row{
    display:flex;
    gap:10px;
}

.usia-row input{
    flex:1;
}

.usia-row select{
    width:140px;
}


.manual-btn{
    width:100%;
    border:none;
    background:#f59e0b;
    color:#fff;
    padding:12px;
    border-radius:10px;
    cursor:pointer;
    margin-bottom:20px;
    font-weight:600;
}

.manual-btn.active{
    background:#dc2626;
}

.ok-ronde-row{
    display:flex;
    gap:15px;
}

.ok-ronde-row .form-group{
    flex:1;
}

.top-section{
    background:#eff6ff;
    padding:20px;
    border-radius:16px;
    margin-bottom:25px;
    border:1px solid #bfdbfe;
}

.patient-section{
    background:#fef3c7;
    padding:20px;
    border-radius:16px;
    margin-bottom:25px;
    border:1px solid #fcd34d;
}

.section-title{
    font-size:16px;
    font-weight:700;
    margin-bottom:18px;
    color:#111827;
}

.manual-btn{
    width:100%;
    border:none;
    background:#f59e0b;
    color:#fff;
    padding:12px;
    border-radius:10px;
    cursor:pointer;
    margin-bottom:20px;
    font-weight:600;
}

.manual-btn.active{
    background:#dc2626;
}

.ok-ronde-row{
    display:flex;
    gap:15px;
}

.ok-ronde-row .form-group{
    flex:1;
}


.form-card{
    background:#fff;
    padding:25px;
    border-radius:18px;
    margin-top:20px;
    box-shadow:0 2px 10px rgba(0,0,0,0.08);
    max-width:900px;
}

.top-section{
    background:#eff6ff;
    padding:20px;
    border-radius:16px;
    margin-bottom:20px;
}

.patient-section{
    background:#f9fafb;
    padding:20px;
    border-radius:16px;
    margin-bottom:20px;
}

.form-group{
    margin-bottom:20px;
}

.form-group label{
    display:block;
    margin-bottom:8px;
    font-weight:600;
}

.form-group input,
.form-group select,
.form-group textarea{
    width:100%;
    padding:12px;
    border:1px solid #d1d5db;
    border-radius:10px;
    font-size:14px;
}

.form-group textarea{
    min-height:100px;
}

.rm-row{
    display:flex;
    gap:10px;
}

.rm-row input{
    flex:1;
}

.search-btn{
    width:120px;
    border:none;
    background:#2563eb;
    color:#fff;
    border-radius:10px;
    cursor:pointer;
}

.manual-btn{
    border:none;
    background:#f59e0b;
    color:#fff;
    padding:12px 18px;
    border-radius:10px;
    margin-bottom:20px;
    cursor:pointer;
}

.submit-btn{
    width:100%;
    border:none;
    background:#111827;
    color:#fff;
    padding:14px;
    border-radius:12px;
    font-size:15px;
    font-weight:600;
    cursor:pointer;
}

.ok-ronde-row{
    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    gap:15px;
}

.search-btn{
    width:120px;
    border:none;
    background:#2563eb;
    color:#fff;
    border-radius:10px;
    cursor:pointer;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:14px;
    font-weight:600;

    padding:0 18px;

    transition:0.2s;
}

.search-btn:hover{
    background:#1d4ed8;
}

.autocomplete-box{
    position:relative;
    width:100%;
}

.autocomplete-list{
    position:absolute;
    top:100%;
    left:0;
    width:100%;
    background:#fff;
    border:1px solid #d1d5db;
    border-radius:12px;
    margin-top:6px;
    max-height:220px;
    overflow-y:auto;
    box-shadow:0 8px 20px rgba(0,0,0,0.08);
    z-index:999;
    display:none;
}

.autocomplete-item{
    padding:12px 14px;
    cursor:pointer;
    transition:0.2s;
}

.autocomplete-item:hover{
    background:#f3f4f6;
}