/* Refreshed CSS — improved variables, accessibility, layout, and responsiveness */

:root{
  --bg: #f4f4f4;
  --card: #ffffff;
  --primary: #2C4B9B;
  --muted: #34495e;
  --accent: #1abc9c;
  --danger: #e74c3d;
  --shadow: 0 8px 20px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-sm: 6px;
  --gap: 12px;
  --text: #2c3e50;
  --soft-bg: #ecf0f1;
  --max-width: 720px;
  --transition: 0.22s ease;
}

/* Reset / base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page layout */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

.container{
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: var(--max-width);
  width: 95%;
  margin: 20px auto;
  font-weight: 700;
  color: var(--muted);
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
  color: var(--primary);
}

.logo {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.header h1 {
  font-size: 1.75rem;
  color: var(--primary);
  font-weight: 800;
  line-height: 1;
}

/* Headings */
h1, h2 {
  text-align: center;
  margin-bottom: 16px;
  color: var(--primary);
}

/* Inputs / form */
.input-section{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.input-section label {
  margin-top: 8px;
  font-weight: 800;
  color: var(--muted);
  font-size: 0.95rem;
}

.input-section input,
.input-section select,
.input-section textarea {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid #d1d5db;
  font-size: 15px;
  background: #fff;
  color: var(--text);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.input-section input:focus,
.input-section select:focus,
.input-section textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(44,75,155,0.12);
}

/* Flex helpers */
.input-flex {
  display: flex;
  gap: 10px;
}

.input-flex > * {
  flex: 1 1 0;
}

/* Buttons */
button {
  margin-top: 10px;
  padding: 12px;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #fff;
  transition: transform var(--transition), opacity var(--transition), box-shadow var(--transition);
  font-weight: 800;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

button:active { transform: translateY(1px); }

button:focus {
  outline: 3px solid rgba(44,75,155,0.14);
}

/* Primary / secondary button styles */
.btn-calc {
  background: linear-gradient(180deg, var(--primary), #213a80);
  width: 100%;
}

.btn-clear {
  background: linear-gradient(180deg, var(--danger), #c23a30);
  width: 100%;
}

.btn-download {
  background: linear-gradient(180deg, var(--muted), #2b3c43);
  margin: 5px 5px 0 0;
  flex: 1;
}

 
#downloadButtons {
  display: none;  
  margin-top: 10px;
  gap: 8px;
  align-items: center;
}

 
.show { display: block !important; }

 
.date-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.date-label img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: saturate(0.8);
}
 
.result-section,
.list-section {
  margin-top: 18px;
  padding: 14px;
  background: var(--soft-bg);
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
}

 
.highlight-date {
  text-align: center;
  padding: 10px 0;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  border-radius: 6px;
  margin-bottom: 12px;
}

 
.toggle-table {
  margin-top: 10px;
  text-align: center;
  cursor: pointer;
  color: #2980b9;
  text-decoration: underline;
  font-weight: 700;
}

 
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  display: none;  
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}

table, th, td {
  border: 1px solid #34495e;
}

th, td {
  padding: 10px;
  text-align: center;
  font-weight: 700;
}

th {
  background-color: var(--accent);
  color: #ffffff;
  font-size: 0.95rem;
}

tr:nth-child(even) {
  background-color: #d5f5e3;
  color: var(--text);
}

td {
  color: var(--text);
  font-weight: 700;
}

 
footer {
  background: whitesmoke;
  color: #242323;
  font-weight: 600;
  text-align: center;
  padding: 15px 10px;
  margin-top: auto;
  border-top-left-radius: var(--radius-sm);
  border-top-right-radius: var(--radius-sm);
}
 
@media (max-width: 900px) {
  .container { padding: 18px; }
  .header h1 { font-size: 1.5rem; }
}

@media (max-width: 600px) {
  .container { padding: 14px; }
  button { font-size: 14px; padding: 10px; }
  th, td { font-size: 14px; padding: 8px; }
  .logo { width: 40px; height: 40px; }
  .input-flex { flex-direction: column; }
  #downloadButtons { flex-direction: column; }
}
