/* Global Settings */
body {
  background-color: #121212;
  color: #ffffff;
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 20px; /* Consider setting padding on .container instead */
  box-sizing: border-box;
}
/* Add this to avoid body padding interfering with full-width elements */
body > .container {
  padding: 20px; /* Apply padding here */
}


h1, h2, h3, h4, h5 {
  color: #ffffff;
}

.container {
  max-width: 800px; /* Adjust if needed */
  margin: 0 auto;
  /* Padding moved from body */
}

/* Header Styling */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #4CAF50;
  padding-bottom: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap; /* Good for responsiveness */
}
.header .logo {
  font-size: 1.5em;
  font-weight: bold;
}
.header .menu {
  display: flex;
  gap: 15px;
  flex-wrap: wrap; /* Good for responsiveness */
}
.menu a {
  color: #4CAF50;
  text-decoration: none;
  font-size: 1.2em;
}

/* Card Style for Information Blocks */
.card {
  background-color: #1e1e1e;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.card-header {
  font-size: 1.2em;
  margin-bottom: 10px;
  color: #4CAF50;
}
.icon {
  margin-right: 8px;
}

/* Button Styling */
.btn {
  background-color: #4CAF50;
  border: none;
  color: #ffffff;
  padding: 10px 20px;
  margin: 5px; /* Adjusted margin slightly for better spacing */
  text-align: center;
  text-decoration: none;
  display: inline-block; /* Allows multiple buttons per line if space */
  font-size: 1em;
  border-radius: 5px;
  cursor: pointer;
  vertical-align: middle; /* Helps align buttons if text differs */
}
.btn:hover {
  background-color: #45a049;
}

/* Form inputs and selects */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  /* Remove max-width: 100%; it's redundant with width: 100% */
  box-sizing: border-box; /* Keep this! */
  padding: 10px;
  margin-bottom: 10px;
  background-color: #222;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
}

/* Table Responsive Wrapper */
/* This wrapper handles horizontal scrolling on screens slightly too small */
/* for the full table, but wider than the mobile breakpoint (600px) */
.responsive-table-wrapper {
  overflow-x: auto; /* Enable horizontal scroll if content overflows */
  width: 100%;     /* Ensure it takes full available width */
  margin-bottom: 20px; /* Add some space below the table */
  -webkit-overflow-scrolling: touch; /* Smoother scrolling on iOS */
}

/* Base Table Styling */
.responsive-table {
  width: 100%;           /* Make table try to fit container */
  /* min-width: 600px; */ /* REMOVED: This forces horizontal scroll even if content could fit.
                             Let the wrapper handle scrolling only if needed based on content */
  border-collapse: collapse;
  /* margin-bottom: 20px; */ /* Margin moved to wrapper */
}
.responsive-table th,
.responsive-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #555;
  white-space: nowrap; /* Prevent text wrapping in cells initially.
                          On mobile, word-break will handle it. */
}
.responsive-table th {
  background-color: #1e1e1e; /* Or #333 for more contrast */
  font-size: 1em;
  font-weight: bold; /* Explicitly set font weight for headers */
}
.responsive-table td {
  font-size: 0.9em;
}

/* Mobile-friendly: Stacked table rows using data-label */
@media (max-width: 600px) { /* Adjust 600px breakpoint if needed */

  /* Remove horizontal scroll on wrapper as table will stack */
  /* .responsive-table-wrapper {
     overflow-x: visible; /* Optionally override if you don't want scroll *at all* below 600px */
  /* } */
  /* Keep overflow-x: auto on wrapper as a fallback if content inside a TD is still too wide */


  /* Hide table headers, they will be displayed using ::before */
  .responsive-table thead {
    display: none;
  }

  /* Make table elements behave like blocks */
  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
    box-sizing: border-box; /* Include padding/border in width */
  }

  /* Add spacing between stacked "rows" */
  .responsive-table tr {
    margin-bottom: 15px;
    border: 1px solid #333; /* Add border around each "card" */
    border-radius: 4px;     /* Optional: round corners */
    background-color: #1e1e1e; /* Give each row a background */
  }
  /* Remove bottom border inherited from standard TD style */
   .responsive-table td {
      border-bottom: none; /* Remove default bottom border */
      border-top: 1px solid #333; /* Add separator line between cells in a card */
   }
   .responsive-table tr td:first-child {
       border-top: none; /* No top border for the first cell in a card */
   }


  /* Style the data cells */
  .responsive-table td {
    text-align: right; /* Align data value to the right */
    padding-left: 50%; /* Create space on the left for the label */
    position: relative; /* Needed for absolute positioning of ::before */
    white-space: normal; /* Allow text wrapping within the cell */
    word-break: break-word; /* Break long words if needed */
    overflow-wrap: break-word; /* Alternative/fallback for word breaking */
  }

  /* Style and position the data label using ::before */
  .responsive-table td::before {
    content: attr(data-label); /* Get text from data-label attribute */
    position: absolute;
    left: 0;
    top: 0; /* Align label to the top */
    height: 100%; /* Make label take full height */
    display: flex; /* Use flexbox for vertical alignment */
    align-items: center; /* Vertically center label text */
    width: 45%; /* Adjust width as needed */
    padding-left: 15px;
    font-weight: bold;
    text-align: left; /* Align label text to the left */
    white-space: normal; /* Allow label text to wrap if needed */
    color: #aaa; /* Dim the label color slightly */
  }

  /* Specific styling for the action buttons container */
  .responsive-table td[data-label="Actions"] {
      text-align: center; /* Center buttons */
      padding-left: 15px; /* Reset padding-left if needed */
  }
   .responsive-table td[data-label="Actions"]::before {
      /* Optionally hide label for actions or adjust */
      /* display: none; */
      /* Or adjust position if centering buttons */
      width: 100%;
      position: static; /* Reset positioning */
      font-weight: bold;
      text-align: center;
      padding-bottom: 10px; /* Space between label and buttons */
      display: block; /* Make label block */
       color: #aaa;
       padding-left: 0;
  }

  .responsive-table td[data-label="Actions"] .btn {
    display: inline-block; /* Keep buttons inline */
    margin: 5px; /* Ensure some margin */
    /* width: auto; */ /* Let buttons size naturally */
    /* OR make buttons full width: */
    /* display: block;
    width: calc(100% - 30px); /* Adjust width considering padding */
    /* margin: 5px auto; */
  }
}
