:root {
  --background-color: #2b2b2b;
  --masthead-color: #333;
  --footer-color: #333;
  --footer-color-gradient: linear-gradient(180deg, #444 0%, #222 100%);
  --topmenu-bg: #444;
  --text-color: #eee;
  --h1-color: #ddd;
  --h2-color: #f0942d;
  --h3-color: #f0942d;
  --form-outer-bg: #2a2b2e;
  --form-bg: #1e2025;
  --form-text: #eee;
  --form-input-bg: #1e2025;
  --border-light: #3a3c42;
  --border-med: #4a4c54;
  --border-dark: #5a5c65;
  --highlight-bg: #444;
  --button-bg: #65a30d;
  --button-text: #ffffff;
  --button-hover: #4d7c0f;
  
  /* Fallbacks for inline CSS from premium layout */
  --font-mono: "Courier New", Courier, monospace;
}

body {
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-color);
  margin: 0;
  padding: 0;
  background: var(--background-color);
  overflow-x: hidden;
  --pine: #4ade80;
  --brass: #facc15;
  --brick: #f87171;
  --ink-soft: var(--text-color);
  --line: var(--border-light);
  --paper: var(--form-bg);
}

* {
  box-sizing: border-box;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.25;
  font-weight: 500;
  margin: 0;
}
h1 { font-size: 32px; margin: 10px 0 20px; color: var(--h1-color); }
h2 { font-size: 28px; color: var(--h2-color); margin: 22px 0; }
h3 { font-size: 24px; color: var(--h3-color); margin: 22px 0; }
a { color: #225a89; text-decoration: none; }
a:hover { color: #c30; text-decoration: underline; }
p { text-align: justify; }

/* Wrapper & Header */
#wrapper {
  width: auto;
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#title {
  background: var(--masthead-color);
  width: auto;
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.site-logo {
  font-size: 24px;
  font-weight: bold;
  color: #ddd;
  text-decoration: none;
}
.site-logo:hover { text-decoration: none; color: #ddd; }
.site-logo svg {
  max-width: 280px;
  height: auto;
}

/* Top Nav Toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  margin-left: 10px;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--h3-color);
}
.nav-toggle svg {
  fill: var(--h3-color); /* Orange color to match competitor */
  width: 20px;
  height: 20px;
}
body.theme-premium-light .nav-toggle svg {
  fill: #ea580c; /* Orange */
}

/* Top Menu */
#topmenu {
  background: transparent;
  text-align: center;
  margin-top: 25px;
  margin-bottom: 25px;
}
#menu_m {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1100px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
#menu_m li {
  border: none;
}
#menu_m li a {
  font-size: 14px;
  color: #374151;
  background: #e5e7eb;
  border-radius: 8px;
  padding: 8px 16px;
  display: block;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}
#menu_m li:hover a {
  background: #ea580c;
  color: #fff;
}

/* Layout */
#mainContent {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  text-align: left;
  padding: 0 20px;
  gap: 30px;
}
#leftCol {
  flex: 1;
}
#rightCol {
  width: 300px;
  flex-shrink: 0;
}

/* Theme Toggle Button in Header */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-color);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  margin-left: auto;
  float: right;
  transition: all 0.2s;
  font-size: 18px;
}
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--h3-color);
}

/* Form Styling */
.calculator_form_wrapper {
  background: var(--form-outer-bg);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  margin-bottom: 30px;
}
.calculator_form_wrapper form {
  background: var(--form-bg);
  padding: 20px;
  border-radius: 5px;
  border: 1px solid var(--border-med);
}

.single-field {
  display: flex;
  margin-bottom: 15px;
  align-items: center;
}
.single-field label {
  width: 250px;
  font-weight: bold;
  color: var(--form-text);
  font-size: 14px;
}
input[type="number"], input[type="text"], input[type="time"], select {
  padding: 10px;
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  background: var(--form-input-bg);
  color: var(--form-text);
  font-size: 16px;
  width: 100%;
  max-width: 300px;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--h3-color);
  box-shadow: 0 0 0 2px rgba(240, 148, 45, 0.2);
}

button.calc-button {
  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s;
}
button.calc-button:hover {
  background: var(--button-hover);
}

button.clear-button {
  background: transparent;
  color: var(--text-color);
  border: 1px solid var(--border-med);
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
  margin-left: 10px;
}
button.clear-button:hover {
  background: var(--highlight-bg);
}

/* Results Area */
#calc-results {
  margin-top: 25px;
  padding: 20px;
  background: var(--highlight-bg);
  border-left: 4px solid var(--h3-color);
  border-radius: 4px;
}
#calc-results h3 {
  margin-top: 0;
  font-size: 18px;
}
.result-row {
  margin-bottom: 10px;
}
.result-row strong {
  color: var(--h3-color);
}

/* Homepage Calculator Listings */
#calculator_listings {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.calc-list-item {
  display: flex;
  align-items: center;
  padding: 20px;
  background: var(--form-bg);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}
.calc-list-item .iconbox_left {
  width: 55px;
  height: 55px;
  margin-right: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.calc-list-item .iconbox_left svg {
  width: 100%;
  height: auto;
  fill: var(--text-color);
  transition: all 0.2s ease;
}
.calc-list-item:hover .iconbox_left svg {
  transform: scale(1.1);
  fill: #f97316;
}
.calc-list-item h3 {
  font-size: 16px;
  margin: 0 0 6px;
  font-weight: 600;
}
.calc-list-item h3 a {
  color: var(--h3-color);
  text-decoration: none;
}
.calc-list-item:hover h3 a {
  color: #f97316;
}
.calc-list-item p {
  font-size: 13px;
  margin: 0;
  line-height: 1.4;
  color: var(--text-color); opacity: 0.8;
}

/* Footer */
#footer {
  background: var(--footer-color-gradient);
  color: #fff;
  text-align: center;
  padding: 20px 10px 40px;
  font-size: 14px;
  margin-top: auto;
}
#footerBlock {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  text-align: left;
  gap: 20px;
}
#footerBlock > div {
  flex: 1;
}
#footerBlock h4 {
  color: gold;
  font-size: 20px;
  margin-bottom: 15px;
}
#footerBlock a {
  color: #eee;
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
}
#footerAddress {
  max-width: 1100px;
  margin: 20px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.3);
  text-align: left;
  font-size: 12px;
  color: #eee;
}

/* Category Header */
.category-header {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 6px;
  margin: 30px 0 10px 0;
  text-align: left;
  box-shadow: 0 4px 10px -3px rgba(234, 88, 12, 0.4);
  letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 950px) {
  #title {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    gap: 5px;
  }
  .site-logo { flex: 1; min-width: 0; }
  .site-logo svg { max-width: 220px !important; height: auto; }
  .theme-toggle {
    margin: 0;
  }
  .nav-toggle { display: flex; margin-left: 5px; }

  #topmenu { display: none; }
  #topmenu.active { display: block; margin-top: 15px; width: 100%; }
  
  .calculator_form_wrapper { padding: 0; border: none; background: transparent; margin-bottom: 20px; }
  .calculator_form_wrapper form { padding: 15px; border-radius: 8px; border: none; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

  #mainContent { flex-direction: column; padding: 0 16px; }
  #rightCol { width: auto; margin-top: 30px; }
  .single-field label { width: 100%; margin-bottom: 5px; }
  input[type="number"], input[type="text"], input[type="time"], select { max-width: 100%; }
  
  /* Typography Overhaul for Mobile */
  body { font-size: 15px; line-height: 1.6; }
  h1 { font-size: 24px !important; line-height: 1.25; margin-bottom: 15px; }
  h2 { font-size: 20px !important; line-height: 1.3; margin: 18px 0 !important; }
  h3 { font-size: 18px !important; line-height: 1.3; margin: 16px 0 !important; }
  .intro { font-size: 15px; line-height: 1.5; }
  .category-header { font-size: 18px; padding: 12px 15px; margin: 20px 0 15px 0; }
  p { margin-bottom: 12px; }

  .mobile-label {
    display: block !important;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 3px;
    color: var(--text-color);
  }
  .input-wrapper {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0 !important;
  }
  .input-wrapper input { width: 100%; }
}

.mobile-label { display: none; }

/* Form Grids and Utilities (Migrated for new layout) */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 15px; }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 14px;
}
.form-group input, .form-group select {
  width: 100%;
}

.stat-card {
  background: var(--form-input-bg);
  border: 1px solid var(--border-med);
  border-radius: 5px;
  padding: 15px;
  text-align: center;
}
.stat-card-label {
  font-size: 13px;
  color: var(--text-color);
  text-transform: uppercase;
  margin-bottom: 5px;
}
.stat-card-value {
  font-size: 24px;
  font-weight: bold;
  color: var(--form-text);
}
.stat-card-sub {
  font-size: 12px;
  color: var(--text-color);
  margin-top: 5px;
}

.text-pine { color: var(--pine); }
.text-brick { color: var(--brick); }
.text-brass { color: var(--brass); }
.mono-value { font-family: "Courier New", Courier, monospace; }

/* Time Card Specifics */
.time-card-grid {
  display: grid;
  grid-template-columns: 120px 1fr 1fr 100px 100px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.time-card-header {
  font-weight: 600;
  font-size: 14px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.day-label {
  font-weight: 600;
}
@media (max-width: 768px) {
  .time-card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: var(--form-bg);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--border-med);
    margin-bottom: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  }
  .time-card-header {
    display: none;
  }
  .time-card-grid .day-label {
    grid-column: 1;
    order: 1;
    font-size: 1.1rem !important;
    font-weight: 700;
    color: var(--h1-color);
    margin: 0;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
  }
  .time-card-grid .daily-total-col {
    grid-column: 2;
    order: 2;
    text-align: right;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
  }
  .time-card-grid .daily-total-col::before {
    content: "Total: ";
    font-size: 0.82rem;
    color: var(--text-color);
    opacity: 0.8;
    font-weight: 600;
    margin-right: 4px;
  }
  .time-card-grid .daily-total-col::after {
    content: " hrs";
    font-size: 0.82rem;
    font-weight: 600;
  }
  .time-card-grid .time-in-wrapper {
    grid-column: 1;
    order: 3;
  }
  .time-card-grid .time-out-wrapper {
    grid-column: 2;
    order: 4;
  }
  .time-card-grid .break-wrapper {
    grid-column: 1 / -1;
    order: 5;
  }
  .time-card-grid .input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
    gap: 5px !important;
    margin-top: 4px;
  }
  .time-card-grid .input-wrapper label.mobile-label {
    width: auto;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
  }
  .time-card-grid .input-wrapper input {
    width: 100%;
    padding: 10px;
    font-size: 0.95rem;
    border-radius: 6px;
    border: 1px solid var(--border-med);
    background: var(--form-input-bg);
    color: var(--text-color);
  }
}

/* Info Box and Search Box */
.info-box {
  background: var(--form-bg);
  border: 1px solid var(--border-med);
  padding: 15px;
  margin: 20px 0;
  border-radius: 5px;
}
.info-box h2 {
  margin-top: 0;
  font-size: 20px;
  color: var(--h2-color);
}
.info-box h3 {
  font-size: 16px;
  color: var(--h3-color);
  margin: 15px 0 5px;
}
.info-box p {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-color);
  line-height: 1.6;
}
.search-box-container {
  margin-bottom: 20px;
  padding: 10px;
  background: var(--form-outer-bg);
  border: 1px solid var(--border-med);
  border-radius: 8px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.search-box-container label {
  font-weight: bold;
  margin-right: 15px;
  color: var(--text-color);
  font-size: 16px;
}
.search-box-container input {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border-med);
  border-radius: 6px;
  font-size: 16px;
  background: var(--form-input-bg);
  color: var(--form-text);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

/* Pay Raise Specifics */
.input-with-symbol {
  display: flex;
  align-items: center;
}
.currency-symbol, .percent-symbol {
  padding: 0 10px;
  background: var(--form-bg);
  border: 1px solid var(--border-dark);
  height: 40px;
  line-height: 40px;
  color: var(--text-color);
}
.currency-symbol { border-right: none; border-radius: 5px 0 0 5px; }
.percent-symbol { border-left: none; border-radius: 0 5px 5px 0; }
.input-with-symbol input {
  border-radius: 0 5px 5px 0;
}
.input-with-symbol input[id="inp-raise-percent"] {
  border-radius: 5px 0 0 5px;
}


.sidebar_featurebox {
  background: var(--form-input-bg);
  border: 1px solid var(--border-med);
  padding: 15px;
  border-radius: 5px;
}
.sidebar_featurebox ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar_featurebox ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
}
.sidebar_featurebox ul li:last-child {
  border-bottom: none;
}
.sidebar_featurebox ul li a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
}
.sidebar_featurebox ul li a:hover {
  color: var(--h3-color);
}

/* DARK MODE OVERRIDES */
body.theme-premium {
  --background-color: #0f172a;
  --masthead-color: #1e293b;
  --topmenu-bg: #1e293b;
  --text-color: #94a3b8;
  --h1-color: #f8fafc;
  --form-outer-bg: #0f172a;
  --form-bg: #1e293b;
  --form-text: #f8fafc;
  --form-input-bg: #334155;
  --border-light: #334155;
  --border-med: #334155;
  --border-dark: #475569;
  --highlight-bg: #1e293b;
  --button-bg: #334155;
  --button-text: #f8fafc;
  --button-hover: #475569;
}

body.theme-premium .site-logo, 
body.theme-premium .site-logo:hover {
  color: #f8fafc;
}
body.theme-premium .calc-list-item {
  background: #334155;
  border: 1px solid #475569;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
body.theme-premium .calc-list-item:hover {
  background: #475569;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}
body.theme-premium .calc-list-item p {
  color: #cbd5e1;
}
body.theme-premium .calc-list-item h3 a {
  color: #f8fafc;
}
body.theme-premium .calc-list-item .iconbox_left svg {
  fill: #e2e8f0;
}
body.theme-premium .calc-list-item:hover .iconbox_left svg {
  fill: #fb923c;
  transform: scale(1.1);
}
body.theme-premium .sidebar_featurebox ul li svg { width: 20px; height: 20px; fill: currentColor; vertical-align: text-bottom; margin-right: 8px; }
.sidebar_featurebox {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}
body.theme-premium .sidebar_featurebox ul li {
  border-bottom-color: #334155;
}
body.theme-premium .sidebar_featurebox ul li a {
  color: #cbd5e1;
}
body.theme-premium .sidebar_featurebox ul li a:hover {
  color: #fb923c;
}
body.theme-premium .text-pine { color: #4ade80; }
body.theme-premium .text-brass { color: #facc15; }
body.theme-premium .text-brick { color: #f87171; }
body.theme-premium .info-box {
  background: #1e293b;
  border: 1px solid #334155;
}

body.theme-premium-light .site-logo, body.theme-premium-light .site-logo:hover { color: #ffffff; }

/* LIGHT MODE OVERRIDES */
body.theme-premium-light {
  --background-color: #f8fafc;
  --masthead-color: #1e40af;
  --topmenu-bg: #ffffff;
  --text-color: #334155;
  --h1-color: #0f172a;
  --form-outer-bg: #f1f5f9;
  --form-bg: #f0f9ff;
  --form-text: #0f172a;
  --form-input-bg: #ffffff;
  --border-light: #e2e8f0;
  --border-med: #cbd5e1;
  --border-dark: #94a3b8;
  --highlight-bg: #f1f5f9;
  --button-bg: #e2e8f0;
  --button-text: #0f172a;
  --button-hover: #cbd5e1;
  --pine: #16a34a;
  --brass: #ca8a04;
  --brick: #dc2626;
}
body.theme-premium-light .calc-list-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
body.theme-premium-light .calc-list-item:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
body.theme-premium-light .calc-list-item p {
  color: #475569;
}
body.theme-premium-light .calc-list-item h3 a {
  color: #0f172a;
}
body.theme-premium-light .calc-list-item .iconbox_left svg {
  fill: #475569;
}
body.theme-premium-light .calc-list-item:hover .iconbox_left svg {
  fill: #ea580c;
  transform: scale(1.1);
}
body.theme-premium-light .sidebar_featurebox {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}
body.theme-premium-light .sidebar_featurebox ul li {
  border-bottom-color: #e2e8f0;
}
body.theme-premium-light .sidebar_featurebox ul li a {
  color: #475569;
}
body.theme-premium-light .sidebar_featurebox ul li a:hover {
  color: #ea580c;
}
body.theme-premium-light .info-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.sidebar_featurebox ul li svg { width: 20px; height: 20px; fill: currentColor; vertical-align: text-bottom; margin-right: 8px; }

#resultDiv h4 {
  background: var(--form-outer-bg);
  padding: 12px 15px;
  border-left: 4px solid var(--h3-color);
  border-radius: 4px;
  color: var(--h1-color);
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
