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

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

/* ================================
   HEADER
================================ */
.header{
  background:linear-gradient(90deg,#4e73df,#36b9cc);
  padding:14px 16px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
}

.logo{
  color:#fff;
  font-size:20px;
  font-weight:bold;
}

/* NAV */
.nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.nav a{
  text-decoration:none;
  color:#fff;
  background:rgba(255,255,255,0.18);
  padding:8px 14px;
  border-radius:20px;
  font-size:14px;
  transition:0.3s;
}

.nav a:hover{
  background:#fff;
  color:#333;
}

/* LOGOUT */
.logout{
  background:#ff4d4d !important;
  color:#fff !important;
}

/* ================================
   PAGE CONTAINER
================================ */
.container{
  padding:18px;
}

/* ================================
   HEADINGS
================================ */
h2,h3,h4{
  margin-bottom:12px;
}

/* ================================
   DASHBOARD CARDS
================================ */
.dashboard-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:16px;
  margin-bottom:25px;
}

.card{
  background:#fff;
  padding:20px;
  border-radius:16px;
  box-shadow:0 6px 18px rgba(0,0,0,0.08);
  text-align:center;
}

.card h4{
  margin-bottom:12px;
}

.card a{
  display:inline-block;
  background:#4e73df;
  color:#fff;
  padding:10px 18px;
  border-radius:10px;
  text-decoration:none;
}

/* ================================
   FORMS
================================ */
.form-box{
  background:#fff;
  padding:20px;
  border-radius:16px;
  box-shadow:0 6px 18px rgba(0,0,0,0.08);
  max-width:500px;
}

input,select,textarea{
  width:100%;
  padding:12px;
  margin-bottom:12px;
  border-radius:10px;
  border:1px solid #ccc;
  font-size:14px;
}

textarea{
  resize:none;
}

/* ================================
   BUTTONS
================================ */
.btn{
  border:none;
  padding:12px 20px;
  border-radius:10px;
  cursor:pointer;
  font-size:14px;
}

.btn-primary{
  background:#4e73df;
  color:#fff;
}

.btn-success{
  background:#1cc88a;
  color:#fff;
}

.btn-danger{
  background:#e74a3b;
  color:#fff;
}

.btn:hover{
  opacity:0.9;
}

/* ================================
   TABLES
================================ */
.table-box{
  background:#fff;
  padding:15px;
  border-radius:16px;
  box-shadow:0 6px 18px rgba(0,0,0,0.08);
  overflow-x:auto;
}

table{
  width:100%;
  border-collapse:collapse;
}

th{
  background:#4e73df;
  color:#fff;
  padding:12px;
}

td{
  padding:10px;
  border-bottom:1px solid #eee;
}

/* ================================
   OPD TABLE HEADER BAR
================================ */
.opd-header{
  display:grid;
  grid-template-columns:1fr 1fr;
  background:#4e73df;
  color:#fff;
  border-radius:12px;
  overflow:hidden;
  margin-bottom:10px;
}

.opd-header div{
  padding:12px;
  text-align:center;
  font-weight:bold;
}

/* ================================
   MEDICINE ROW
================================ */
.row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.col{
  flex:1;
}

/* ================================
   MOBILE OPTIMIZATION
================================ */
@media(max-width:600px){

  .btn{
    padding:10px 12px;
    font-size:13px;
  }

  input,select,textarea{
    font-size:14px;
  }
}

/* ================================
   PATIENT DASHBOARD UI UPGRADE
================================ */

body{
    background:#f4f6fb;
    font-family: "Segoe UI", Arial, sans-serif;
}

/* Main container */
.container{
    max-width:900px;
    margin:auto;
    padding:15px;
}

/* Header */
.patient-header{
    background:#ffffff;
    padding:18px;
    border-radius:12px;
    box-shadow:0 3px 8px rgba(0,0,0,0.08);
}

.patient-header h2{
    margin:0;
    font-size:22px;
}

.patient-header p{
    margin-top:5px;
    color:#555;
}

/* Top Buttons */
.top-actions{
    display:flex;
    gap:10px;
    margin:15px 0;
}

.btn{
    padding:10px 18px;
    border-radius:8px;
    text-decoration:none;
    font-size:14px;
    color:#fff;
    display:inline-block;
    text-align:center;
}

.btn-primary{
    background:#4f7cff;
}

.btn-danger{
    background:#ff4d4d;
}

/* Section title */
.section-title{
    margin-top:25px;
    margin-bottom:10px;
    font-size:18px;
}

/* Card */
.card{
    background:#ffffff;
    border-radius:12px;
    padding:15px;
    margin-bottom:18px;
    box-shadow:0 3px 10px rgba(0,0,0,0.08);
}

/* Tables */
.table-wrap{
    overflow-x:auto;
}

table{
    width:100%;
    border-collapse:collapse;
}

th{
    background:#4f7cff;
    color:#fff;
    padding:10px;
    font-size:14px;
}

td{
    padding:10px;
    border-bottom:1px solid #eee;
    font-size:14px;
}

/* Status Colors */
.status-approved{
    color:green;
    font-weight:600;
}

.status-pending{
    color:orange;
    font-weight:600;
}

/* Prescription header */
.prescription-head{
    background:#f1f5ff;
    padding:10px;
    border-radius:8px;
    margin-bottom:10px;
    font-weight:600;
}

/* Mobile Optimization */
@media(max-width:600px){
    .top-actions{
        flex-direction:column;
    }

    .btn{
        width:100%;
    }

    th,td{
        font-size:13px;
        padding:8px;
    }
}

.top-actions{
    display: flex;
    gap: 12px;          /* SPACE BETWEEN BUTTONS */
    margin-bottom: 15px;
    flex-wrap: wrap;   /* Mobile friendly */
}
