:root{
  --hcr-green:#2e7d32;
  --hcr-green-dark:#1b5e20;
  --hcr-green-soft:#eef8f0;
  --hcr-green-light:#dff3e3;
  --hcr-red:#e51b2b;
  --hcr-blue:#1976d2;
  --hcr-text:#1f2937;
  --hcr-muted:#6b7280;
  --hcr-border:#e4efe7;
  --hcr-shadow:0 18px 45px rgba(31,90,48,.10);
  --hcr-shadow-soft:0 8px 25px rgba(0,0,0,.045);
}

/* Base containers */
.hcr-card{
  max-width:1180px;
  margin:34px auto;
  padding:34px;
  border:1px solid var(--hcr-border);
  border-radius:28px;
  background:#fff;
  box-shadow:var(--hcr-shadow);
  color:var(--hcr-text);
  font-family:Arial,Helvetica,sans-serif;
}

.hcr-card h2{
  margin:0 0 24px;
  color:var(--hcr-green-dark);
  font-size:40px;
  line-height:1.15;
  font-weight:850;
  letter-spacing:-.5px;
}

.hcr-card h3{
  margin:0 0 18px;
  color:var(--hcr-green);
  font-size:28px;
  line-height:1.2;
  font-weight:800;
}

.hcr-card p{font-size:16px;line-height:1.65;color:var(--hcr-text)}
.hcr-small{font-size:13px;color:var(--hcr-muted)}

/* Notice */
.hcr-message{
  max-width:1180px;
  margin:18px auto;
  padding:15px 18px;
  border-left:5px solid var(--hcr-green);
  background:var(--hcr-green-soft);
  color:var(--hcr-green-dark);
  border-radius:14px;
  font-weight:650;
}

/* Portal/account layout */
.hcr-two-col{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:28px;
}

.hcr-account section,
.hcr-portal section,
.hcr-upload,
.hcr-rx,
.hcr-case{
  background:#f8fcf9;
  border:1px solid #e2f3e6;
  border-radius:24px;
  padding:26px;
  box-shadow:var(--hcr-shadow-soft);
}

.hcr-account > p:first-of-type{
  background:linear-gradient(135deg,#f1f8f4,#fff);
  border:1px solid #e2f3e6;
  border-radius:18px;
  padding:14px 18px;
  display:inline-block;
  margin:0 0 18px;
}

/* Forms */
.hcr-form fieldset{
  border:1px solid #e2f3e6;
  border-radius:24px;
  margin:22px 0;
  padding:24px;
  background:#f8fcf9;
}
.hcr-form legend{font-weight:800;color:var(--hcr-green-dark);padding:0 10px;font-size:18px}

.hcr-form label,
.hcr-prescription-form label,
.hcr-status-form label,
.hcr-portal label,
.hcr-account label,
.hcr-upload label{
  display:block;
  font-weight:750;
  margin:14px 0 8px;
  color:var(--hcr-text);
}

.hcr-form input,
.hcr-form select,
.hcr-form textarea,
.hcr-prescription-form input,
.hcr-prescription-form textarea,
.hcr-status-form select,
.hcr-filter input,
.hcr-filter select,
.hcr-portal input,
.hcr-account input,
.hcr-account textarea,
.hcr-upload input,
.login-username input,
.login-password input{
  width:100%;
  box-sizing:border-box;
  padding:14px 16px;
  border:1px solid #cfded3;
  border-radius:14px;
  background:#fff;
  color:var(--hcr-text);
  font-size:16px;
  transition:.2s ease;
}

.hcr-form input:focus,
.hcr-form select:focus,
.hcr-form textarea:focus,
.hcr-prescription-form input:focus,
.hcr-prescription-form textarea:focus,
.hcr-status-form select:focus,
.hcr-filter input:focus,
.hcr-filter select:focus,
.hcr-portal input:focus,
.hcr-account input:focus,
.hcr-account textarea:focus,
.hcr-upload input:focus,
.login-username input:focus,
.login-password input:focus{
  outline:none;
  border-color:var(--hcr-green);
  box-shadow:0 0 0 4px rgba(46,125,50,.12);
}

.login-remember{display:flex;align-items:center;gap:8px;margin:15px 0}
.login-remember input{width:auto!important;margin:0}
.login-submit{margin-top:18px}

/* Buttons */
.hcr-form button,
.hcr-card button,
.hcr-filter button,
.hcr-card .button,
.hcr-card input[type="submit"],
.hcr-portal input[type="submit"],
.hcr-account input[type="submit"],
.login-submit input[type="submit"],
.hcr-btn{
  display:inline-block;
  margin-top:12px;
  padding:14px 26px!important;
  background:linear-gradient(135deg,var(--hcr-green),var(--hcr-green-dark))!important;
  color:#fff!important;
  border:0!important;
  border-radius:999px!important;
  text-decoration:none!important;
  cursor:pointer;
  font-weight:800!important;
  font-size:16px!important;
  box-shadow:0 10px 24px rgba(46,125,50,.22);
  transition:.2s ease;
}

.hcr-form button:hover,
.hcr-card button:hover,
.hcr-filter button:hover,
.hcr-card .button:hover,
.hcr-card input[type="submit"]:hover,
.login-submit input[type="submit"]:hover,
.hcr-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 30px rgba(46,125,50,.28);
}

.hcr-btn-light{background:#fff!important;color:var(--hcr-green-dark)!important;border:1px solid #d7ecd9!important;box-shadow:var(--hcr-shadow-soft)!important}
.hcr-btn-danger,
.hcr-card a[href*="logout"]{background:linear-gradient(135deg,#e51b2b,#b51220)!important;color:#fff!important}

/* Dashboard tables and filters */
.hcr-filter{
  display:grid;
  grid-template-columns:2fr 1.2fr 1.5fr 1fr auto;
  gap:12px;
  align-items:center;
  margin:18px 0;
  padding:18px;
  border-radius:22px;
  border:1px solid #e2f3e6;
  background:#f8fcf9;
}
.hcr-inline{font-weight:600;display:flex!important;align-items:center;gap:8px;margin:0!important}
.hcr-inline input{width:auto!important}

.hcr-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin-top:18px;
  overflow:hidden;
  border:1px solid #e2f3e6;
  border-radius:18px;
}
.hcr-table th,.hcr-table td{padding:13px;text-align:left;vertical-align:top;border-bottom:1px solid #edf5ef}
.hcr-table th{background:var(--hcr-green-soft);color:var(--hcr-green-dark);font-weight:800}
.hcr-table tr:last-child td{border-bottom:0}
.hcr-badge{display:inline-block;padding:6px 10px;border-radius:999px;background:#e8f5e9;border:1px solid #b8dfbf;color:var(--hcr-green-dark);font-size:12px;font-weight:800}

/* Case details */
.hcr-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}
.hcr-grid p{background:#fff;border:1px solid #e6efe8;padding:14px;border-radius:16px;margin:0;box-shadow:0 3px 10px rgba(0,0,0,.025)}
.hcr-case{border-top:0;margin-top:22px}
.hcr-case summary{cursor:pointer;font-weight:800;margin:12px 0;color:var(--hcr-green-dark)}

/* Prescription */
.hcr-rx{background:#fff;margin:16px 0;border-left:5px solid var(--hcr-green)}
.hcr-rx-head{text-align:center;font-size:15px;color:var(--hcr-green-dark)}
.hcr-sign{text-align:right;margin-top:30px;border-top:1px solid #999;padding-top:8px;width:190px;margin-left:auto}
.hcr-status-form{display:flex;gap:12px;align-items:end;flex-wrap:wrap;background:#f8fcf9;padding:18px;border-radius:22px;border:1px solid #e2f3e6}
.hcr-status-form label{min-width:220px}
.hcr-prescription-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;background:#f8fcf9;padding:24px;border-radius:24px;border:1px solid #e2f3e6}
.hcr-prescription-form label:nth-last-child(3),.hcr-prescription-form label:nth-last-child(2){grid-column:1/-1}
.hcr-prescription-form button{grid-column:1/-1;justify-self:start}

/* Report upload */
.hcr-upload{margin-top:16px}
.hcr-upload input[type="file"]{padding:12px;background:#fff}

/* Login/Register polish */
.hcr-portal.hcr-card{position:relative;overflow:hidden}
.hcr-portal.hcr-card:before{
  content:"";position:absolute;right:-90px;top:-90px;width:220px;height:220px;border-radius:50%;background:rgba(46,125,50,.08);
}
.hcr-portal section h3:before,.hcr-account section h3:before{content:"";display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--hcr-green);margin-right:10px;vertical-align:middle}

@media(max-width:900px){
  .hcr-filter{grid-template-columns:1fr}
  .hcr-two-col{grid-template-columns:1fr}
  .hcr-card{margin:18px;padding:22px;border-radius:22px}
  .hcr-card h2{font-size:32px}
  .hcr-card h3{font-size:24px}
  .hcr-table{font-size:13px;display:block;overflow-x:auto}
  .hcr-table th,.hcr-table td{padding:9px}
}

@media print{
  body *{visibility:hidden}
  .hcr-rx,.hcr-rx *{visibility:visible}
  .hcr-rx{position:absolute;left:0;top:0;width:100%;border:0;box-shadow:none}
  .hcr-rx button,.hcr-card>.button,.hcr-status-form,.hcr-prescription-form{display:none!important}
}
.hcr-error{background:#fff5f5!important;border-color:#fecaca!important;color:#991b1b!important}
.hcr-role-login-form .hcr-check{display:flex;align-items:center;gap:8px;margin:10px 0 18px;font-weight:600}
.hcr-role-login-form .hcr-check input{width:auto!important;margin:0!important}

/* v3.3.2 branded role UI */
.hcr-card h2,
.hcr-dashboard h2,
.hcr-account h2,
.hcr-portal h2{
  font-size:36px!important;
  line-height:1.15!important;
  font-weight:900!important;
  letter-spacing:-.4px;
}

.hcr-login-card{
  max-width:860px;
  min-height:auto;
  padding:36px 38px!important;
}

.hcr-login-card h2{
  margin-bottom:22px!important;
}

.hcr-role-login-form{
  position:relative;
  z-index:2;
  max-width:100%;
}

.hcr-login-fields{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
  max-width:100%;
}

.hcr-role-login-form .hcr-field{
  display:block!important;
  margin:0!important;
  font-weight:800!important;
}

.hcr-role-login-form .hcr-field span{
  display:block;
  margin-bottom:8px;
  color:var(--hcr-text);
}

.hcr-role-login-form input[type="text"],
.hcr-role-login-form input[type="password"]{
  width:100%!important;
  min-height:48px;
  border-radius:14px!important;
}

.hcr-role-login-form .hcr-check{
  margin:16px 0 18px!important;
}

.hcr-auth-card .hcr-two-col{
  align-items:start;
}

.hcr-auth-card section,
.hcr-login-card{
  background:linear-gradient(180deg,#ffffff,#fbfefc)!important;
}

.hcr-role-note{
  display:inline-block;
  margin:0 0 18px!important;
  padding:9px 14px;
  border-radius:999px;
  background:var(--hcr-green-soft);
  color:var(--hcr-green-dark)!important;
  font-weight:800;
}

.hcr-header-login,
.hcr-user-menu-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:11px 18px;
  border-radius:999px;
  background:var(--hcr-green)!important;
  color:#fff!important;
  text-decoration:none!important;
  font-weight:850;
  border:0;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(46,125,50,.18);
}

.hcr-user-menu{
  position:relative;
  display:inline-block;
  font-family:Arial,Helvetica,sans-serif;
}

.hcr-user-menu-list{
  position:absolute;
  right:0;
  top:100%;
  margin-top:8px;
  min-width:190px;
  padding:8px;
  background:#fff;
  border:1px solid #e2f3e6;
  border-radius:18px;
  box-shadow:0 16px 40px rgba(0,0,0,.11);
  opacity:0;
  visibility:hidden;
  transform:translateY(8px);
  pointer-events:none;
  transition:.18s ease;
  z-index:10000;
}

.hcr-user-menu:after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:100%;
  height:12px;
}

.hcr-user-menu:hover .hcr-user-menu-list,
.hcr-user-menu:focus-within .hcr-user-menu-list{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
  pointer-events:auto;
}

.hcr-user-menu-list a{
  display:block;
  padding:12px 14px;
  border-radius:12px;
  color:var(--hcr-green-dark)!important;
  background:#fff!important;
  text-decoration:none!important;
  font-weight:800;
}

.hcr-user-menu-list a:hover{
  background:var(--hcr-green-soft)!important;
}

@media(max-width:768px){
  .hcr-card h2,
  .hcr-dashboard h2,
  .hcr-account h2,
  .hcr-portal h2{font-size:30px!important;}
  .hcr-login-card{padding:26px 24px!important;}
}

/* v3.6.3 Patient Login/Register/Forgot branded UI */
.hcr-patient-access-card{
  max-width:980px!important;
  padding:34px!important;
  border-radius:28px!important;
  background:linear-gradient(180deg,#ffffff,#fbfefc)!important;
}
.hcr-auth-head{margin-bottom:22px;text-align:left}
.hcr-auth-badge{display:inline-block;background:var(--hcr-green-soft,#eef8f0);color:var(--hcr-green-dark,#1b5e20);padding:8px 14px;border-radius:999px;font-weight:900;margin-bottom:12px}
.hcr-auth-head h2{margin:0 0 8px!important;color:var(--hcr-green-dark,#1b5e20)!important;font-size:36px!important;font-weight:950!important}
.hcr-auth-head p{margin:0;color:#4b5563;font-weight:600}
.hcr-auth-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0 26px;border-bottom:1px solid #e5f3e8;padding-bottom:12px}
.hcr-auth-tabs a{padding:12px 18px;border-radius:999px;background:#f4fbf6;color:var(--hcr-green-dark,#1b5e20)!important;text-decoration:none!important;font-weight:900;border:1px solid #dff3e3}
.hcr-auth-tabs a.active,.hcr-auth-tabs a:hover{background:var(--hcr-green,#2e7d32)!important;color:#fff!important}
.hcr-auth-panel{background:#fff;border:1px solid #e5f3e8;border-radius:24px;padding:26px;box-shadow:0 12px 35px rgba(0,0,0,.05)}
.hcr-auth-panel h3{margin-top:0!important;color:var(--hcr-green-dark,#1b5e20)!important;font-size:26px!important}
.hcr-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.hcr-patient-access-card .hcr-field{display:block!important;font-weight:850!important;margin:0 0 16px!important}
.hcr-patient-access-card .hcr-field span{display:block;margin-bottom:7px;color:#111827}
.hcr-patient-access-card input[type="text"],
.hcr-patient-access-card input[type="email"],
.hcr-patient-access-card input[type="tel"],
.hcr-patient-access-card input[type="password"],
.hcr-patient-access-card select{width:100%!important;min-height:48px;border-radius:14px!important;border:1px solid #ccd9cf!important;padding:10px 14px!important;background:#fff!important}
.hcr-patient-access-card button[type="submit"]{background:var(--hcr-green,#2e7d32)!important;color:#fff!important;border:0!important;border-radius:999px!important;padding:14px 24px!important;font-weight:900!important;box-shadow:0 12px 24px rgba(46,125,50,.18)!important;cursor:pointer!important}
.hcr-login-links,.hcr-auth-switch{display:flex;gap:14px;flex-wrap:wrap;margin-top:18px;font-weight:800}
.hcr-login-links a,.hcr-auth-switch a{color:var(--hcr-green-dark,#1b5e20)!important;text-decoration:underline!important}
.hcr-consent{display:flex!important;align-items:flex-start;gap:10px;margin:10px 0 20px!important;font-weight:700!important;color:#374151}
.hcr-consent input{width:auto!important;margin-top:4px!important}
@media(max-width:768px){.hcr-form-grid{grid-template-columns:1fr}.hcr-patient-access-card{padding:24px!important}.hcr-auth-panel{padding:20px}.hcr-auth-head h2{font-size:30px!important}}
