:root {
  --clr: #636363;
}
/* ===== TOP HEADER ===== */
.top-header {
  background: rgba(193, 0, 42, 0.95);

  height: 60px;
  padding: 0 20px;

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

  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Логотип */
.top-header img {
  height: 36px;
}

/* Текст */
.top-header h1 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  line-height: 1;
}

/* Search bar */
.header-right {
  display: flex;
  align-items: center;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #c1002a;
  border: none;
  padding: 10px 24px;
  font-size: 16px;
  color: white;
  outline: none;
  width: 400px;
  transition: width 0.3s ease;
}

.search-bar:focus-within {
  width: 480px;
}

.search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 16px;
  width: 100%;
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.compact-nav {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 0.75rem 1rem;
  margin: 1rem auto;
  max-width: 950px;
  font-family: "Poppins", sans-serif;
}

.compact-nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.compact-nav li {
  display: flex;
}

.compact-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background-color: #f9f9f9;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  transition: all 0.25s ease-in-out;
  font-size: 0.8rem;
  font-weight: 500;
  color: #333;
  min-width: 70px;
  text-align: center;
}

.compact-nav a:hover {
  background-color: #c1002a;
  color: white;
  transform: translateY(-3px);
}

.compact-nav li.active a {
  background-color: #c1002a;
  color: white;
}

.compact-nav a span {
  margin-top: 0.25rem;
}

.compact-nav ion-icon {
  font-size: 1.3rem;
  font-weight: 300; /* ensures thinner icon look */
  line-height: 1;
}

/* General Styles */
body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
}

/* Header Styles */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 2rem;
  background: rgba(193, 0, 42, 0.95);
  color: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(6px);
}

/* header img {
  margin-right: 2rem;
  width: 130px;
  height: 130px;
}

header h1 {
  font-size: 1.5rem;
  margin-left: 1rem;
} */

section h2,
section h3 {
  color: #c1002a;
  font-weight: 600;
  margin-bottom: 1rem;
}

section p {
  font-size: 1rem;
  line-height: 1.7;
  color: #444;
}

/* Main Content Styles */
main {
  padding: 2rem;
  max-width: 900px;
  margin: 2rem auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

section {
  border-left: 5px solid #c1002a;
  padding-left: 1.5rem;
  margin-bottom: 3rem;
  background-color: #fff;
}

section h2 {
  font-size: 1.8rem;
  color: #c1002a;
  padding-left: 10px;
  margin-bottom: 1rem;
  clear: both;
}

section p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

ul {
  margin: 0;
  padding-left: 20px;
  list-style-type: disc;
}

ul li {
  margin-bottom: 0.7rem;
}

.clearfix {
  overflow: auto;
  border: 5px double rgb(193, 0, 42);
  padding: 10px;
}

.img1 {
  float: right;
}

.images {
  margin-top: 100px;
  position: relative;
  border: 5px double rgb(193, 0, 42);
  overflow: auto;
  width: 400px;
  height: 470px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.images img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.images img.active {
  opacity: 1;
}

.pic {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0;
}

.pic .content {
  flex: 1;
  margin-right: 2rem;
}
.game-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 2rem;
  gap: 2rem;
}
.game-left {
  flex: 1;
}
.game-right {
  flex-shrink: 0;
  width: 200px;
  margin-top: 70px;
}
.game-right img {
  width: 200px;
  height: auto;
  border: 3px solid rgb(193, 0, 42);
  box-shadow: 0 4px 8px rgb(62, 62, 84);
}
#game {
  margin: 1rem 0;
  width: 360px;
  height: 360px;
  margin: 0 auto;
  border: 5px double rgb(193, 0, 42);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0;
}
#game img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid rgb(193, 0, 42);
  box-sizing: border-box;
}
/* About us */
.gallery {
  width: 400px;
  display: flex;
  overflow-x: scroll;
}
.gallery div {
  width: 100%;
  display: grid;
  grid-template-columns: auto auto auto;
  grid-gap: 20px;
  padding: 10px;
  flex: none;
}
.gallery div img {
  width: 100%;
}
.gallery::-webkit-scrollbar {
  display: none;
}
.gallery-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10% auto;
}
#backBtn,
#nextBtn {
  width: 50px;
  cursor: pointer;
  margin: 40px;
}
.gallery div img:hover {
  filter: grayscale(0);
  cursor: pointer;
  transform: scale(1.1);
}
/* ContactUs */
.hero {
  width: 100%;
  height: 100vh;
  background: rgba(193, 0, 42, 0.95);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
form {
  margin-top: 70px;
  width: 90%;
  max-width: 600px;
}
.input-group {
  margin-bottom: 30px;
  position: relative;
}
input,
textarea {
  width: 100%;
  padding: 10px 16px;
  outline: 0;
  border: none;
  color: #000;
  background: #fff;
  font-size: 15px;
  border-radius: 20px;
}
.item.error {
  border: 1px solid red;
}
.input-group label {
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  padding: 10px;
  color: #000;
  cursor: text;
  transition: 0.2s;
}
button {
  padding: 10px 0;
  color: #fff;
  outline: none;
  background: transparent;
  border: 1px solid #fff;
  width: 100%;
  cursor: pointer;
}
input:focus ~ label,
input:valid ~ label,
textarea:focus ~ label,
textarea:valid ~ label {
  top: -35px;
  font-size: 14px;
}

/* AboutUs */

.gallery-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  width: 100%;
}
.gallery {
  width: 900px;
  display: flex;
  overflow-x: scroll;
  scroll-behavior: smooth;
}
.gallery div {
  width: 100%;
  display: grid;
  grid-template-columns: auto auto auto;
  grid-gap: 10px;
  padding: 10px;
  flex: none;
}
.gallery div img {
  width: 100%;
  filter: grayscale(100%);
  transition: transform 0.5s;
}
.gallery div img:hover {
  filter: grayscale(0);
  cursor: pointer;
  transform: scale(1.1);
}
.gallery::-webkit-scrollbar {
  display: none;
}
#backBtn,
#nextBtn {
  width: 50px;
  cursor: pointer;
  margin: 40px;
}

.KhIMU {
  float: right;
  margin: 0 0 1rem 1rem; /* Adjust spacing as needed */
  width: 200px; /* Set the image width */
  height: auto;
}
.leo {
  float: right;
  margin: 0 0 1rem 1rem; /* Adjust spacing as needed */
  width: 300px; /* Set the image width */
  height: auto;
}
#threedd {
  width: 500px;
  height: 450px;
  margin-left: 200px;
}
.float-right {
  float: right;
  margin: 0 0 1rem 1rem; /* Adjust spacing as needed */
  width: 500px; /* Set the image width */
  height: auto; /* Maintain aspect ratio */
}
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Information */

.right {
  float: right;
  margin: 0 0 1rem 1rem;
  width: 250px;
  height: auto;
}

@media (max-width: 768px) {
  .navigation {
    flex-direction: column;
    height: auto;
  }

  .navigation ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .navigation ul li {
    width: 70px;
  }

  header h1 {
    font-size: 1.5rem;
  }
}

/* Login Box Styles */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80vh; /* Centrerar vertikalt */
}

.login-box {
  background-color: white;
  padding: 2rem 3rem;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  text-align: center;
  width: 300px;
}

.login-box h2 {
  color: #c1002a; /* Röd färg som header */
  margin-bottom: 1.5rem;
}

.login-box input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #c1002a;
  border-radius: 8px;
  font-size: 1rem;
  color: #000; /* Synlig text */
  background-color: #fff; /* Vit bakgrund */
}

.login-box input::placeholder {
  color: #999; /* Placeholder-text */
}

.login-box button {
  width: 100%;
  padding: 10px;
  background-color: #c1002a;
  border: none;
  color: white;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
}

.login-box button:hover {
  background-color: #a00025;
}

.login-box .error {
  color: red;
  margin-top: 10px;
  font-size: 0.9rem;
}
/* Surgeons Dashboard Styling */
.surgeons-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 50px;
}

.dashboard-title {
  color: #c1002a;
  font-size: 2rem;
  margin-bottom: 30px;
  text-align: center;
  border-bottom: 3px solid #c1002a;
  padding-bottom: 10px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 200px;
}

.error-message {
  margin-top: 1rem;
  color: #c1002a;
  font-weight: 500;
  display: none;
}

/* ===== Assess Wound Page ===== */

.assess-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.assess-section {
  border-left: 5px solid #c1002a;
  padding-left: 1.5rem;
}

.assess-section h2 {
  color: #c1002a;
  margin-bottom: 0.5rem;
}

.assess-form {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.assess-form input[type="number"] {
  width: 80%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.form-group select {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}

.save-btn {
  grid-column: span 2;
  margin-top: 1.5rem;
  padding: 12px;
  background-color: #c1002a;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.save-btn:hover {
  background-color: #a00023;
}

.assess-form label {
  position: static;
  padding: 0;
  color: #333;
}
.segment-container {
  max-width: 900px;
  margin: 40px auto;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.segment-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 40px;
}

.segment-results {
  display: flex;
  gap: 30px;
  justify-content: space-between;
}

.segment-box {
  width: 100%;
  text-align: center;
}

.placeholder {
  height: 220px;
  border: 2px dashed #c1002a;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
}
.segment-form label {
  font-weight: 600;
  color: #c1002a;
  margin-bottom: 5px;
}
/* ===== Edit Profile Page ===== */
.profile-container {
  max-width: 400px;
  margin: 60px auto;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.profile-container h2 {
  color: #c1002a;
  margin-bottom: 20px;
}

.profile-container input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #c1002a;
  font-size: 1rem;
}

.profile-container button {
  width: 100%;
  padding: 10px;
  background-color: #c1002a;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.profile-container button:hover {
  background-color: #a00025;
}

.success-message {
  margin-top: 15px;
  color: green;
  font-weight: 500;
}

.view-section {
  margin-top: 50px;
  text-align: center;
}

.view-section h2 {
  color: #c1002a;
  margin-bottom: 20px;
}

.scan-container {
  width: 320px;
  height: 320px;
  margin: 0 auto 20px;
  border: 3px solid #c1002a;
  border-radius: 10px;
  overflow: hidden;
}

.scan-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.scan-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.scan-controls button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background-color: #c1002a;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.scan-controls button:hover {
  background-color: #a00025;
}

/* ===== Print Page ===== */
.page-subtitle {
  text-align: center;
  color: white;
  opacity: 0.7;
  margin-bottom: 20px;
}

.print-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto 20px auto;

  padding: 16px;
  border-radius: 16px;

  background: rgba(255, 255, 255, 0.06);

  text-align: center;
}

#printImage {
  /* display: none; */
  max-width: 100%;
  max-height: 300px;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}

#printImage.show {
  display: block;
}

#printBtn.print-btn {
  width: 260px;
  margin: 0 auto;
  display: block;
}

/* PWAT SCORE */
.pwat-section {
  text-align: center;
  margin: 20px auto;
}
.pwat-score {
  font-size: 3rem;
  font-weight: 700;
  color: rgba(193, 0, 42, 0.95);
  margin: 0;
}
.pwat-score span {
  font-size: 1.2rem;
  font-weight: 400;
  color: #666;
}

.pwat-card {
  background: #fff;
  border: 2px solid #c7202f;
  border-radius: 12px;
  padding: 20px 24px;
  text-align: center;
  margin: 20px auto;
  display: none;
}

.pwat-card-label {
  margin: 0 0 4px;
  font-size: 14px;
  color: #888;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pwat-card-value {
  margin: 0;
  font-size: 3rem;
  font-weight: 700;
  color: rgba(193, 0, 42, 0.95);
}

.pwat-card-total {
  font-size: 1.2rem;
  font-weight: 400;
  color: #666;
}

/* PRINT MODE */
@media print {
  .menu-panel,
  .top-header,
  .simulator-body::before,
  #printBtn,
  #saveBtn,
  #logoutBtn,
  .charts-header {
    display: none !important;
  }

  body,
  .simulator-body {
    background: white !important;
    background-image: none !important;
  }

  .simulator-wrapper,
  .simulator-container {
    display: block !important;
    background: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    height: auto !important;
    overflow: visible !important;
  }

  .display-panel {
    width: 100% !important;
    padding: 20px !important;
    background: white !important;
    color: black !important;
    overflow: visible !important;
    height: auto !important;
    display: block !important;
  }

  #printImage {
    max-width: 100%;
    max-height: 50vh;
    display: block;
    margin: 0 auto 20px auto;
  }

  #assessmentSection {
    margin-top: 20px;
    color: black !important;
  }

  #assessmentTable {
    width: 100%;
    border-collapse: collapse;
  }

  #assessmentTable td {
    padding: 6px 10px;
    border: 1px solid #999;
    color: black !important;
  }
}
/* ===== SURGERY SIMULATOR DESIGN ===== */

.simulator-body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-image: url("../assets/images/operation-room.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
}

.simulator-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 40, 0.6);
  z-index: -1;
}

.simulator-wrapper {
  text-align: center;
  padding-top: 10px;
}

.sim-title {
  font-size: 28px;
  color: white;
  font-weight: bold;
  margin-bottom: 30px;
  text-shadow: 0px 5px 15px rgba(0, 0, 0, 0.7);
}
.welcome-box {
  padding: 10px 20px;
  border-radius: 16px;

  display: flex;
  flex-direction: column;
  align-items: center;

  max-width: 420px;
}
.welcome-content {
  width: 100%;
  max-width: 420px;
  text-align: left;

  background: rgba(20, 35, 50, 0.55);
  border-radius: 16px;

  margin-top: 50px;

  padding: 32px;

  backdrop-filter: blur(12px);

  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.welcome-content::before {
  content: "";
  display: block;
  width: 50px;
  height: 4px;
  background: #ff2e63;
  border-radius: 10px;
  margin-bottom: 18px;
}
.landing-text {
  color: #c9d1d9;
  line-height: 1.5;
  font-size: 17px;
  margin-bottom: 20px;
}

.landing-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.step {
  color: #9aa6b2;
  font-size: 17px;
}

.display-panel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 60px;
}

.simulator-container {
  width: 900px;
  height: 499px;

  margin: 20px auto;

  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);

  border-radius: 20px;
  display: flex;

  padding: 20px;
  gap: 20px;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);

  overflow: hidden;
  transform: scale(0.97);
}

/* .step {
  font-size: 14px;
  color: white;
  opacity: 0.9;
} */

.start-btn {
  margin-top: 18px;
  padding: 10px 18px;

  border-radius: 10px;
  background: #c1002a;
  color: white;

  text-decoration: none;
  font-size: 14px;

  transition: 0.2s;
}

.start-btn:hover {
  background: #a00023;
}

/* LEFT SIDE */
.menu-panel {
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
}

.menu-btn {
  padding: 12px;
  border-radius: 30px;
  background: linear-gradient(to bottom, #e5edf3, #cdd8e2);
  text-decoration: none;
  color: #1f2a35;
  font-weight: bold;
  text-align: center;
  transition: 0.2s ease;
}

.menu-btn:hover {
  transform: translateX(6px);
  background: linear-gradient(to bottom, #ffffff, #dbe5ee);
}

.logout {
  background: linear-gradient(to bottom, #d94b4b, #b52a2a);
  color: white;
}

.logout:hover {
  background: linear-gradient(to bottom, #ff5a5a, #c33232);
}

/* RIGHT SIDE */
.display-panel {
  flex: 1;
  /* padding: 40px; */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.display-box {
  width: 100%;
  height: 370px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 15px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  margin-top: 20px;
}
.display-box {
  width: 100%;
  height: 400px;
  border-radius: 15px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.display-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upload-content {
  background: #f4ede3;
  border-radius: 20px;
  padding: 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.upload-content img {
  margin-top: 30px;
  max-width: 100%;
}

.page-title {
  font-size: 26px;
  font-weight: 600;
  color: white;
}

.segment-controls {
  display: flex;

  gap: 10px;

  align-items: center;

  margin-bottom: 20px;
}

.action-btn {
  padding: 10px 16px;

  background: #c7202f;

  color: white;

  border: none;

  border-radius: 5px;

  cursor: pointer;
}

.action-btn:hover {
  background: #a81824;
}

.segment-results {
  display: flex;

  gap: 20px;

  width: 100%;
}

.segment-box {
  flex: 1;

  background: white;

  padding: 15px;

  border-radius: 8px;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.image-box {
  height: 200px;

  display: flex;

  align-items: center;

  justify-content: center;

  background: #f0f0f0;

  border-radius: 6px;
}

.menu-btn.active {
  background: #c7202f;
  color: white;
}

.menu-btn:hover {
  background: #c7202f;
  color: white;
}

.header-left img {
  height: 36px;
  padding: 4px;
  background: white;
  border-radius: 6px;
  display: block;
}
/* FIX EDIT PROFILE LAYOUT */

.profile-form {
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}

.profile-form label {
  position: static;
  display: block;
  color: white;
  font-weight: 600;
}

.profile-form input {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.update-btn {
  width: 100%;
  padding: 12px;
  background: #d62828;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
/* FIX EDIT PROFILE FORM INSIDE PANEL */

.display-panel {
  overflow-y: auto;
}

.profile-form {
  max-width: 350px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-form label {
  position: static;
  font-size: 14px;
}

.profile-form input {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.update-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: #d62828;
  color: white;
  cursor: pointer;
}
/* ===== POPUP ===== */
#ng-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.ng-modal {
  background: #fff;
  border-radius: 10px;
  padding: 2rem;
  max-width: 500px;
  text-align: center;
}

.ng-title {
  font-size: 22px;
  margin-bottom: 1rem;
}

.ng-body {
  font-size: 14px;
  margin-bottom: 1rem;
}

.ng-label {
  font-weight: bold;
}

.ng-divider {
  margin: 1rem 0;
}

.ng-btn {
  background: grey;
  color: white;
  padding: 10px 20px;
  border: none;
  cursor: not-allowed;
}

.ng-btn.active {
  background: #d32f2f; /* röd */
  cursor: pointer;
}

.ng-btn.active:hover {
  background: #b71c1c; /* mörkare röd */
}

/* ===== AUTH PAGES (login, register, forgot-password) ===== */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 60px);
  background: #f4f4f4;
  padding: 24px 16px;
}

.auth-box {
  background: #fff;
  padding: 2.5rem 2.5rem 2rem;
  border-radius: 14px;
  box-shadow: 0 6px 28px rgba(0,0,0,0.12);
  width: 100%;
  max-width: 420px;
}

.auth-box h2 {
  color: #c1002a;
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 1.6rem;
}

.auth-subtitle {
  color: #666;
  font-size: 0.9rem;
  text-align: center;
  margin: -1rem 0 1.4rem;
}

.auth-field {
  margin-bottom: 1rem;
}

.auth-field input,
.auth-row input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  color: #000;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.auth-field input:focus,
.auth-row input:focus {
  outline: none;
  border-color: #c1002a;
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1rem;
}

.auth-password-field {
  position: relative;
}

.auth-password-field input {
  padding-right: 68px;
}

.auth-toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #c1002a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  width: auto;
}

.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  font-size: 0.88rem;
}

.auth-stay-signed {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #444;
}

.auth-stay-signed input[type="checkbox"] {
  width: auto;
  border-radius: 3px;
  margin: 0;
}

.auth-btn {
  width: 100%;
  padding: 11px;
  background: #c1002a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s;
}

.auth-btn:hover {
  background: #a00022;
}

.auth-btn:disabled {
  background: #e08090;
  cursor: not-allowed;
}

.auth-error {
  color: #c1002a;
  font-size: 0.88rem;
  margin-top: 10px;
  min-height: 1.2em;
  text-align: center;
}

.auth-success {
  color: #2e7d32;
  font-size: 0.95rem;
  text-align: center;
  padding: 14px;
  background: #e8f5e9;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.4rem;
  font-size: 0.9rem;
  color: #555;
}

.auth-link {
  color: #c1002a;
  text-decoration: none;
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

/* ===== EDIT PROFILE (simulator) ===== */
.profile-form input {
  width: 100%;
  padding: 9px 12px;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  color: #000;
  background: #fff;
  box-sizing: border-box;
}

.profile-form input:focus {
  outline: none;
  border-color: #c1002a;
}

.profile-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.profile-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 4px;
}

.profile-divider {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 1.2rem 0;
}

.profile-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.8rem;
}

.profile-section-title span {
  font-weight: 400;
  color: #888;
  font-size: 12px;
}

.profile-password-field {
  position: relative;
  margin-bottom: 1rem;
}

.profile-password-field input {
  margin-bottom: 0;
  padding-right: 68px;
}

.profile-toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #c1002a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  width: auto;
}

.floating-add-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  background-color: #c1002a;
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 300;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(193, 0, 42, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-add-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(193, 0, 42, 0.5);
}

.add-patient-form {
  display: flex;
  flex-direction: column;
  max-width: 350px;
  gap: 12px;
}

.add-patient-form input,
.add-patient-form select {
  background-color: #E59494;
  border: none;
  border-radius: 8px;
  color: white;
  padding: 14px 18px;
  font-size: 15px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.add-patient-form input::placeholder {
  color: #808080;
}

.add-patient-form input:focus,
.add-patient-form select:focus {
  background-color: #d43050;
}

.add-patient-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.add-patient-form select option {
  background-color: #E59494;
  color: white;
}

.add-patient-btn {
  background-color: #c1002a;
  border: none;
  border-radius: 8px;
  color: white;
  padding: 14px 18px;
  font-size: 15px;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: background-color 0.2s ease;
}

.add-patient-btn:hover {
  background-color: #a50024;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: #c1002a;
  margin-bottom: 0.5rem;
}

.link-patient-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #c1002a;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: background-color 0.2s ease;
}

.link-patient-btn:hover {
  background-color: #a50024;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  min-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.link-patient-modal {
  background: #E59494;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.link-patient-modal .search-bar {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.link-patient-modal .search-bar:focus-within {
  width: 100%;
}

.link-patient-results {
  max-height: 240px;
  overflow-y: auto;
  padding: 0 8px;
}

.link-patient-results .patient-card {
  background: rgba(255, 255, 255, 0.5);
  margin-bottom: 6px;
  cursor: pointer;
}

.link-patient-results .patient-card:hover {
  background: rgba(255, 255, 255, 0.8);
}

.linked-patient-display {
  margin: 6px 0 16px 0;
  font-size: 15px;
  font-weight: 700;
  color: #000;
}

.linked-patient-display:empty {
  display: none;
}

.create-patient-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #C1002A;
  color: white;
  border: none;
  border-radius: 0 0 12px 12px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
  box-sizing: border-box;
  width: 100%;
}

.create-patient-btn:hover {
  background: #a50024;
}

.wound-name-label {
  background: #C1002A;
  color: white;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 24px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.wound-search-bar {
  padding: 0 20px 12px;
}

.wound-search-results {
  max-height: 180px;
  overflow-y: auto;
  padding: 0 12px 8px;
}

.wound-search-results .patient-card {
  background: rgba(255, 255, 255, 0.5);
  margin-bottom: 6px;
  cursor: pointer;
}

.wound-search-results .patient-card:hover {
  background: rgba(255, 255, 255, 0.8);
}

.wound-name-form {
  padding: 12px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wound-name-input {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
}

.validate-wound-btn {
  background: #C1002A;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  width: 100%;
}

.validate-wound-btn:hover {
  background: #a50024;
}

.wound-name-status {
  color: white;
  font-size: 14px;
  text-align: center;
  padding: 0 20px 16px;
  margin: 0;
}

/* ===== PATIENT CARDS ===== */
.patients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
  padding-right: 10px;
}

.patient-card {
  display: block;
  background: #E59494;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.patient-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.patient-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #c1002a;
}

.patient-icon {
  font-size: 24px;
  color: #c1002a;
}

.patient-name {
  font-size: 15px;
  font-weight: 700;
  color: #333;
}

.patient-card-body {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.patient-info {
  font-size: 14px;
  color: #555;
}

.patient-label {
  font-weight: 600;
  color: #333;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding-bottom: 20px;
}

.page-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.page-btn:hover:not(:disabled) {
  background: #c1002a;
}

.page-btn.active {
  background: #c1002a;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-dots {
  color: white;
  font-size: 14px;
  padding: 0 4px;
}

/* ===== PATIENT DETAIL ===== */
.back-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 8px;
  display: inline-block;
  transition: color 0.2s;
}

.back-link:hover {
  color: white;
}

.patient-header {
  background: #d32f2f;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
}

.patient-header-name {
  color: white;
  font-size: 22px;
  font-weight: 700;
}

.obs-layout {
  display: flex;
  gap: 20px;
}

.obs-image {
  width: 50%;
  max-height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.obs-info {
  width: 50%;
  background: #E59494;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.obs-row {
  color: black;
  font-size: 15px;
  padding: 4px 0;
}

.obs-label {
  font-weight: 700;
  color: black;
}

.patient-detail-info {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.detail-row {
  color: black;
  font-size: 15px;
  padding: 6px 0;
}

.detail-label {
  font-weight: 700;
  color: black;
}

.section-subtitle {
  color: white;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ===== INJURY CARDS ===== */
.injuries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding-bottom: 20px;
}

.injury-card {
  display: block;
  background: #E59494;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-left: 4px solid #c1002a;
  transition: transform 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.injury-card:hover {
  transform: translateY(-3px);
}

.injury-card-body {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.injury-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.injury-card-update {
  font-size: 13px;
  color: #777;
}

/* ===== OBSERVATION CARDS ===== */
.observations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding-bottom: 20px;
}

.observation-card {
  background: #E59494;
  border-radius: 12px;
  padding: 20px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-align: center;
  transition: transform 0.2s ease;
  text-decoration: none;
  color: inherit;
  overflow-wrap: break-word;
  word-break: break-word;
}

.observation-card:hover {
  transform: translateY(-3px);
}

.observation-date {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

/* ===== CHARTS PAGE ===== */
.chart-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.15);
  transition: background 0.2s;
  text-decoration: none;
}
.chart-icon-link:hover {
  background: rgba(255,255,255,0.3);
}

.charts-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.charts-header .print-btn {
  margin: 0;
  margin-left: auto;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-bottom: 20px;
}

.chart-card {
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 16px;
  backdrop-filter: blur(4px);
}

.chart-title {
  color: white;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px 0;
  text-align: center;
}

.no-data-msg {
  color: rgba(255,255,255,0.6);
  text-align: center;
  font-size: 14px;
  padding: 40px 0;
  margin: 0;
}

.charts-grid .chart-card svg {
  display: block;
}

@media print {
  .chart-card {
    background: white !important;
    border: 1px solid #ddd !important;
    backdrop-filter: none !important;
    break-inside: avoid;
  }
  .chart-title {
    color: #333 !important;
  }
  .no-data-msg {
    color: #999 !important;
  }
}
