/* ==========================================================================
   Professional theme - clean medical blue/teal, light.
   Loaded last from include/link.php so it refines every page without
   rewriting them. Change the colours here (:root) to re-brand the whole app.
   ========================================================================== */
:root{
	--brand:#0b6e8a;
	--brand-dark:#084f65;
	--brand-light:#e6f3f7;
	--accent:#0d9488;
	--ink:#1e293b;
	--muted:#64748b;
	--line:#e2e8f0;
	--line-strong:#cbd5e1;
	--bg:#f3f6f9;
	--surface:#ffffff;
	--ok:#15803d;
	--warn:#b45309;
	--bad:#b91c1c;
	--radius:8px;
	--shadow:0 1px 2px rgba(15,23,42,.06),0 4px 14px rgba(15,23,42,.06);
}

html,body{ background:var(--bg); }
body{
	font-family:"Segoe UI",-apple-system,BlinkMacSystemFont,Roboto,"Helvetica Neue",Arial,sans-serif;
	color:var(--ink);
	font-size:14px;
	line-height:1.5;
	-webkit-font-smoothing:antialiased;
}
a{ color:var(--brand); }
a:hover,a:focus{ color:var(--brand-dark); }
h1,h2,h3,h4,h5{ color:var(--ink); font-weight:700; }
hr{ border-top:1px solid var(--line); }

/* ---------- Header (company name + logo) ---------- */
header{
	background:var(--surface) !important;
	color:var(--ink) !important;
	padding:0 !important;
	text-align:left;
	border-bottom:1px solid var(--line);
}
header .container{ padding-top:4px; padding-bottom:4px; }
header h4{ margin:14px 0 !important; font-size:20px; font-weight:700; letter-spacing:.01em; color:var(--brand-dark); }
header h4 strong{ font-weight:700; }
header .col-md-6:last-child{ text-align:right; }
header img{ height:auto !important; max-height:42px; margin:8px 0 6px; }
header .col-md-6:last-child br{ display:none; }

/* ---------- Main navigation ---------- */
.menubar{
	background:var(--brand);
	margin:0 !important;
	box-shadow:0 2px 6px rgba(15,23,42,.12);
}
.menuclass .navbar,
.menuclass .navbar-inverse{
	background:transparent !important;
	border:0 !important;
	min-height:46px !important;
	height:auto !important;
	margin-bottom:0;
}
.menuclass .navbar-inverse .container-fluid,
.menuclass .navbar-inverse .navbar-collapse{ padding:0 !important; }
.menuclass .navbar-nav > li{ border:0 !important; background:transparent !important; }
.menuclass .navbar-nav > li > a{
	color:#e8f4f8 !important;
	font-size:13px !important;
	font-weight:500;
	line-height:20px !important;
	padding:13px 9px !important;
	letter-spacing:0;
}
.menuclass .navbar-nav > li > a i{ margin-right:3px; opacity:.85; }
.menuclass .navbar-nav > li > a span{ white-space:nowrap; }
.menuclass .navbar-nav > li > a:hover,
.menuclass .navbar-nav > li > a:focus,
.menuclass .navbar-nav > .open > a,
.menuclass .navbar-nav > .open > a:hover,
.menuclass .navbar-nav > .active > a{
	background:rgba(255,255,255,.14) !important;
	color:#fff !important;
}
.menuclass .navbar-nav > li > .dropdown-menu{
	background:var(--surface) !important;
	border:1px solid var(--line);
	border-radius:var(--radius);
	box-shadow:0 10px 30px rgba(15,23,42,.18);
	margin-top:0;
	padding:6px 0;
	min-width:200px;
}
.menuclass .dropdown-menu > li > a{
	color:var(--ink) !important;
	padding:8px 18px;
	font-size:13px;
	line-height:1.4;
}
.menuclass .dropdown-menu > li > a:hover,
.menuclass .dropdown-menu > li > a:focus{
	background:var(--brand-light) !important;
	color:var(--brand-dark) !important;
}
.menuclass .navbar-toggle{ border-color:rgba(255,255,255,.5); background:transparent; }
.menuclass .navbar-toggle .icon-bar{ background:#fff; }
.menuclass .navbar-brand{ color:#fff; padding-top:14px; height:46px; }

/* ---------- Page area ---------- */
.content-wrapper{ margin-top:14px; min-height:70vh; padding-bottom:50px; }
.page-head-line{
	font-weight:700; text-transform:none; color:var(--ink);
	font-size:22px; letter-spacing:.01em;
	border-bottom:2px solid var(--brand); padding-bottom:10px; margin-bottom:20px;
}
.content-wrapper h3{ font-size:20px; margin:18px 0 14px; }
.content-wrapper h4{ font-size:16px; margin:16px 0 10px; }

/* ---------- Buttons ---------- */
.btn{
	border-radius:6px !important;
	font-weight:600; font-size:13px;
	padding:7px 14px;
	border:1px solid transparent;
	box-shadow:none;
	transition:background-color .15s,border-color .15s,box-shadow .15s;
}
.btn-sm,.btn-group-sm > .btn{ padding:5px 11px; font-size:12px; }
.btn-xs{ padding:2px 8px; font-size:11px; }
.btn:focus,.btn:active:focus{ outline:0; box-shadow:0 0 0 3px rgba(11,110,138,.25); }
.btn-primary{ background:var(--brand); border-color:var(--brand); color:#fff; }
.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active{ background:var(--brand-dark); border-color:var(--brand-dark); color:#fff; }
.btn-success{ background:var(--ok); border-color:var(--ok); color:#fff; }
.btn-success:hover,.btn-success:focus,.btn-success:active{ background:#116632; border-color:#116632; color:#fff; }
.btn-info{ background:var(--accent); border-color:var(--accent); color:#fff; }
.btn-info:hover,.btn-info:focus,.btn-info:active{ background:#0b7a70; border-color:#0b7a70; color:#fff; }
.btn-danger{ background:var(--bad); border-color:var(--bad); color:#fff; }
.btn-danger:hover,.btn-danger:focus,.btn-danger:active{ background:#991b1b; border-color:#991b1b; color:#fff; }
.btn-warning{ background:#d97706; border-color:#d97706; color:#fff; }
.btn-default,.btn-primaty{ background:var(--surface); border-color:var(--line-strong); color:var(--ink); }
.btn-default:hover,.btn-default:focus,.btn-default:active{ background:#f1f5f9; border-color:#94a3b8; color:var(--ink); }
.btn[disabled],.btn.disabled{ opacity:.5; }

/* ---------- Forms ---------- */
input[type=text],input[type=number],input[type=email],input[type=password],input[type=date],
input[type=search],input[type=tel],input[type=url],select,textarea,.form-control{
	border:1px solid var(--line-strong);
	border-radius:6px;
	background-color:var(--surface);
	color:var(--ink);
	box-shadow:none;
	padding-left:8px; padding-right:8px;
}
input[type=text]:focus,input[type=number]:focus,input[type=email]:focus,input[type=password]:focus,
input[type=date]:focus,input[type=search]:focus,select:focus,textarea:focus,.form-control:focus{
	border-color:var(--brand);
	box-shadow:0 0 0 3px rgba(11,110,138,.15);
	outline:0;
}
input[readonly],input[disabled],select[disabled],.form-control[readonly]{ background:#f1f5f9; }
input[type=checkbox],input[type=radio]{ accent-color:var(--brand); }
label{ font-weight:600; color:var(--ink); }
::placeholder{ color:#94a3b8; }

/* ---------- Tables ---------- */
.table{ background:var(--surface); margin-bottom:16px; }
.table-bordered{ border:1px solid var(--line); border-radius:var(--radius); border-collapse:separate; border-spacing:0; }
.table-bordered > thead > tr > th,.table-bordered > tbody > tr > th,
.table-bordered > thead > tr > td,.table-bordered > tbody > tr > td{ border-color:var(--line); }
.table > thead > tr > th{ background:#f8fafc; color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.04em; border-bottom:1px solid var(--line); }
.table > tbody > tr > td{ border-top-color:var(--line); vertical-align:middle; }
.table-hover > tbody > tr:hover,.table-striped > tbody > tr:nth-of-type(odd):hover{ background:var(--brand-light); }
.table-striped > tbody > tr:nth-of-type(odd){ background:#fafcfd; }

/* ---------- Cards / panels ---------- */
.panel{ border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; }
.panel-heading{ border-radius:0; padding:12px 16px; }
.panel-primary{ border-color:var(--line); }
.panel-primary > .panel-heading{ background:var(--brand); border-color:var(--brand); color:#fff; }
.panel-default > .panel-heading{ background:#f8fafc; color:var(--ink); border-color:var(--line); }
.well{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:none; }
.modal-content{ border:0; border-radius:12px; box-shadow:0 20px 60px rgba(15,23,42,.3); }
.modal-header{ border-bottom:1px solid var(--line); }
.modal-footer{ border-top:1px solid var(--line); }

/* ---------- Labels, alerts ---------- */
.label{ border-radius:999px; padding:.3em .75em; font-weight:600; font-size:11px; letter-spacing:.02em; }
.label-success{ background:#dcfce7; color:#166534; }
.label-info{ background:#cffafe; color:#155e75; }
.label-warning{ background:#fef3c7; color:#92400e; }
.label-danger{ background:#fee2e2; color:#991b1b; }
.label-default{ background:#e2e8f0; color:#475569; }
.alert{ border-radius:var(--radius); border:1px solid transparent; padding:12px 40px 12px 16px; margin:16px 0; box-shadow:none; }
.alert-success{ background:#ecfdf5; border-color:#a7f3d0; color:#065f46 !important; text-align:left !important; }
.alert-danger{ background:#fef2f2; border-color:#fecaca; color:#991b1b; }
.alert-warning{ background:#fffbeb; border-color:#fde68a; color:#92400e; }
.alert-info{ background:#ecfeff; border-color:#a5f3fc; color:#155e75; }
.alert .close{ opacity:.5; }
.alert-success + br,.content-wrapper > .container > br{ display:none; }

/* ---------- Footer ---------- */
footer{ background:#0f172a; color:#94a3b8; padding:16px 0; font-size:12px; }
footer a,footer a:hover{ color:#cbd5e1; }

/* ---------- Dashboard tiles ---------- */
.dash-grid{ margin:8px 0 24px; display:flex; flex-wrap:wrap; gap:16px; }
.dash-grid table,.dash-grid tbody,.dash-grid tr{ display:contents; }
.dash-grid td{
	display:block; border:0 !important; padding:0 !important; background:none;
	flex:0 0 calc((100% - 80px) / 6); max-width:calc((100% - 80px) / 6);
}
.dash-grid td:empty{ display:none; }
.dash-grid td a{
	display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:10px;
	background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow);
	padding:22px 12px; height:100%; min-height:130px; color:var(--ink); text-decoration:none;
	transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease;
}
.dash-grid td a:hover{ transform:translateY(-3px); border-color:var(--brand); box-shadow:0 10px 24px rgba(11,110,138,.16); }
.dash-grid td a i{ font-size:34px !important; color:var(--brand); width:64px; height:64px; line-height:64px; text-align:center; background:var(--brand-light); border-radius:50%; }
.dash-grid td a img{ max-width:64px; max-height:64px; border-radius:50%; background:var(--brand-light); padding:8px; }
.dash-grid td a br{ display:none; }
.dash-grid td a strong{ font-size:14px; font-weight:600; color:var(--ink); }

/* ---------- Sidebar test lists (Patient Entry / Report Entry) ---------- */
.side_menu li,.rep-tabs li{ border-radius:8px; margin-bottom:4px; }


/* alerts.php wrapper: container-like only when it sits directly in <body> */
body > .alert-wrap{ width:100%; max-width:1170px; margin:0 auto; padding:0 15px; }
.back-row{ margin-top:12px; }

/* ---------- Login page ---------- */
.login-wrap{ display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:calc(100vh - 116px); padding:30px 15px; background:linear-gradient(160deg,#e6f3f7 0%,#f3f6f9 55%,#e3f4f1 100%); margin-top:0; }
.login-wrap .alert-wrap{ max-width:400px; padding:0; width:100%; }
.login-card{ width:100%; max-width:400px; background:var(--surface); border:1px solid var(--line); border-radius:14px; box-shadow:0 12px 40px rgba(15,23,42,.12); padding:32px 32px 28px; text-align:center; }
.login-icon{ width:56px; height:56px; line-height:56px; margin:0 auto 12px; border-radius:50%; background:var(--brand); color:#fff; font-size:24px; }
.login-card h4{ margin:0 0 4px; font-size:22px; }
.login-sub{ color:var(--muted); margin-bottom:20px; }
.login-card form{ text-align:left; }
.login-card label{ margin:12px 0 4px; font-size:13px; }
.login-card .form-control{ height:40px; }
.login-btn{ margin-top:22px; padding:10px 14px; font-size:14px; }

@media (max-width:991px){ .dash-grid td{ flex-basis:calc((100% - 32px) / 3); max-width:calc((100% - 32px) / 3); } }
@media (max-width:600px){ .dash-grid{ gap:12px; } .dash-grid td{ flex-basis:calc((100% - 12px) / 2); max-width:calc((100% - 12px) / 2); } header h4{ font-size:16px; } }

/* top menu: icons were all the same generic glyph - text only keeps it on one row */
.menuclass .navbar-nav > li > a i{ display:none; }
.menuclass .dropdown-menu > li > a i{ display:none; }
@media (min-width:768px){ .menuclass .navbar-nav > li > a{ padding-left:11px !important; padding-right:11px !important; } }

/* legacy plain buttons (no .btn class) inside page content */
.content-wrapper button:not([class]),
.content-wrapper input[type=submit]:not([class]),
.content-wrapper input[type=button]:not([class]),
.content-wrapper input[type=reset]:not([class]){
	background:var(--surface); border:1px solid var(--line-strong); border-radius:6px;
	color:var(--ink); font-size:13px; font-weight:600; padding:6px 14px; cursor:pointer;
}
.content-wrapper button:not([class]):hover,
.content-wrapper input[type=submit]:not([class]):hover{ background:var(--brand-light); border-color:var(--brand); color:var(--brand-dark); }

/* pagination (each list page carries its own inline .paging rules - override them here) */
a.paging{ display:inline-block; min-width:30px; text-align:center; background-color:var(--surface) !important; color:var(--brand) !important; border:1px solid var(--line-strong); border-radius:6px; padding:4px 9px !important; margin-left:4px !important; text-decoration:none !important; font-weight:600; }
a.paging:hover{ background-color:var(--brand-light) !important; border-color:var(--brand); }
a.paging.pageactive,a.paging.pageactive:hover{ background-color:var(--brand) !important; color:#fff !important; border-color:var(--brand); }

.label-primary{ background:#dbeafe; color:#1e40af; }
/* workflow selects in Report Entry */
.well select.input-sm,.rep-verify select.input-sm{ width:auto; max-width:300px; display:inline-block; }

/* ---------- Roomier form tables (Patient Entry registration, Patient Report filter) ---------- */
.form-grid > tbody > tr > td{ vertical-align:middle !important; padding:8px 10px; }
.form-grid input[type=text],.form-grid input[type=number],.form-grid input[type=email],.form-grid input.form-control,.form-grid select{
	height:36px !important; padding:6px 10px !important; font-size:13px !important; line-height:1.4;
}
.form-grid input[type=text]:not([style*="width"]),.form-grid input[type=number]:not([style*="width"]),.form-grid select:not([style*="width"]){ width:100%; }
.form-grid input[style*="width:50px"]{ width:72px !important; margin-right:4px; }
.form-grid > tbody > tr > td{ font-size:12px !important; }

/* ---------- Chosen / Select2 dropdowns match the inputs ---------- */
.chosen-container-single .chosen-single{ height:36px; line-height:34px; border:1px solid var(--line-strong); border-radius:6px; background:var(--surface); box-shadow:none; padding-left:10px; }
.chosen-container-single .chosen-single div b{ background-position:0 9px; }
.chosen-container .chosen-drop{ border-color:var(--line-strong); border-radius:0 0 6px 6px; z-index:1060; }
.chosen-container-active .chosen-single{ border-color:var(--brand); box-shadow:0 0 0 3px rgba(11,110,138,.15); }
.select2-container .select2-selection--single{ height:36px !important; border:1px solid var(--line-strong); border-radius:6px; }
.select2-container--default .select2-selection--single .select2-selection__rendered{ line-height:34px !important; padding-left:10px; color:var(--ink); }
.select2-container--default .select2-selection--single .select2-selection__arrow{ height:34px !important; }
.select2-container--default.select2-container--focus .select2-selection--single,.select2-container--open .select2-selection--single{ border-color:var(--brand); }
.select2-dropdown{ border-color:var(--line-strong); border-radius:6px; z-index:2000; }
.select2-container--default .select2-results__option--highlighted[aria-selected]{ background:var(--brand); }.form-grid .chosen-container{ width:100% !important; }
.form-grid .chosen-container-single .chosen-single,.form-grid .select2-container .select2-selection__rendered,.select2-results__option{ font-size:13px; }
.select2-container .select2-selection--single .select2-selection__rendered{ font-size:13px; }
.form-grid input[style*="width:45px"],.form-grid input[style*="width:40px"]{ width:44px !important; padding:6px 3px !important; margin-right:2px; float:left; font-size:12px !important; }

/* Select2 inside a panel that starts hidden (Report Entry test panels, panel_2+):
   force width via CSS rather than JS-measured ancestor width, which would be 0 while hidden. */
.select2-container{ width:100% !important; }
.select2-container--default .select2-selection--multiple{ border:1px solid var(--line-strong); border-radius:6px; min-height:36px; }
.select2-container--default.select2-container--focus .select2-selection--multiple{ border-color:var(--brand); }
.select2-container--default .select2-selection--multiple .select2-selection__choice{ background:var(--brand-light); border-color:var(--brand); color:var(--brand-dark); border-radius:4px; }
