:root {
  --main-blue: #001a57;
  --bg: #f3f6fa;
  --container-radius: 18px;
  --container-shadow: 0 8px 32px 0 rgba(0,26,87,0.10), 0 1.5px 6px 0 #001a5710;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  width: 100vw;
  font-family: 'Poppins', Arial, sans-serif;
  background: var(--bg);
  color: #1e293b;
  overflow-x: hidden;
}

body {
  box-sizing: border-box;
}

.container {
  background: #fff;
  padding: 2rem 1rem;
  border-radius: var(--container-radius);
  max-width: 900px;
  width: 98%;
  box-shadow: var(--container-shadow);
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: min-height 0.25s;
}

h1, h3 {
  color: var(--main-blue);
  text-align: center;
  letter-spacing: -1px;
  margin-bottom: 1.2rem;
}
h1 {
  font-size: 2rem;
  font-weight: 600;
}
h3 {
  font-size: 1rem;
  font-weight: 600;
}

label {
  font-weight: 500;
  font-size: 1rem;
  margin-top: 1.1rem;
  margin-bottom: 0.2rem;
  display: block;
  color: var(--main-blue);
}

input, select {
  margin-top: 0.1rem;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1.5px solid #c7d2fe;
  background: #f8fafc;
  font-size: 1rem;
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 500;
  color: #1e293b;
  transition: border-color 0.2s;
  box-sizing: border-box;
  max-width: 100%;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--main-blue);
  background: #fff;
}

button {
  margin-top: 2rem;
  background: linear-gradient(90deg,var(--main-blue) 60%,#000d2e 100%);
  color: #fff;
  border: none;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  font-size: 1.12rem;
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px #001a5718;
  transition: background 0.2s, box-shadow 0.2s;
  letter-spacing: 0.5px;
  display: block;
  width: 100%;
}

button:hover {
  background: linear-gradient(90deg,#000d2e 60%,var(--main-blue) 100%);
  box-shadow: 0 4px 16px #001a5722;
}

/* --- TABLE STYLES --- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 1.08rem;
  font-family: 'Poppins', Arial, sans-serif;
  background: #f8fafc;
  border-radius: var(--container-radius);
  box-shadow: 0 2px 12px #001a570a;
  margin: 2rem 0 1.2rem 0;
  table-layout: auto; /* allow columns to expand naturally */
  transition: font-size 0.2s;
  display: table;
}

th, td {
  padding: 1rem 0.7rem;
  border: 1.2px solid #e0e7ff;
  font-size: 1.05rem;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  white-space: nowrap;
}

th {
  background: var(--main-blue);
  color: #fff;
  font-weight: 700;
  text-align: center;
  font-size: 1.15rem;
  letter-spacing: 0.1px;
  width: auto;          /* allow th to expand naturally */
  max-width: none;      /* remove any width restriction */
}

.left {
  text-align: left;
  white-space: nowrap;
  min-width: 140px;
  max-width: none;
}

th, td {
  width: auto;
  max-width: none;
}

th:first-child, td:first-child {
  overflow: visible;
  text-overflow: unset;
  white-space: nowrap;
}

.result {
  margin-top: 1.2rem;
  font-size: 1.08rem;
  color: var(--main-blue);
  font-weight: 500;
  text-align: right;
}

.status {
  color: #dc2626;
  margin-top: 1.2rem;
  text-align: center;
  font-weight: 500;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.salary-tax-summary {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.summary-row {
  display: flex;
  gap: 2rem;
}
.summary-block {
  background: #f8fafc;
  border-radius: 10px;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 8px #001a570a;
  text-align: center;
  min-width: 120px;
}
.summary-label {
  font-size: 0.98rem;
  color: #001a57;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.summary-value {
  font-size: 1.25rem;
  color: #1e293b;
  font-weight: 700;
}

.salary-tax-summary {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 20px auto;
  padding: 12px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-sizing: border-box;
}

.summary-row {
  display: flex;
  flex-direction: row;
  gap: 0.7rem;
}

.summary-block {
  flex: 1 1 0;
  background: #fff;
  border-radius: 6px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  box-sizing: border-box;
}


.summary-block {
  flex: 1 1 0;
  min-width: 120px;
  background: #fff;
  border-radius: 6px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  box-sizing: border-box;
}

.summary-label {
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 6px;
}

.summary-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2a3b8f;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: auto; /* allow columns to shrink */
  background: #f8fafc;
}

th, td {
  padding: 0.7rem 0.5rem;
  font-size: 0.95rem;
  min-width: 90px; /* adjust as needed for your data */
  white-space: nowrap; /* prevent awkward wrapping */
  text-overflow: ellipsis;
  overflow: hidden;
}


/* Remove any media queries that change flex-direction to column */
@media (max-width: 700px) {
  th, td {
    font-size: 0.91rem;
    padding: 0.65rem 0.3rem;
    min-width: 70px;
  }
}

@media (max-width: 480px) {
  th, td {
    font-size: 0.82rem;
    padding: 0.45rem 0.1rem;
    min-width: 60px;
  }
}


