html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Theme variables are provided by theme.css which defines :root (light) and [data-theme="dark"] overrides */

body {
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-sans);
}
.theme-toggle {
    background-color: var(--on-surface)!important;
    color: var(--surface)!important;
    border-radius: var(--radius-md);
    padding:8px 16px;
}

[data-theme="dark"] .theme-toggle {
    background-color: var(--on-surface) !important;
    color: var(--surface) !important;
}

/* Login / auth-specific styles */
.auth-page{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:48px 16px;
  min-height: calc(100vh - 160px);
}
.auth-container{
  width:100%;
  max-width:420px;
}
.auth-brand .auth-logo{
  max-width:260px;
}
.auth-card{
  background: linear-gradient(135deg, var(--surface), var(--surface-elevated));
  border-radius: var(--radius-md);
  padding:28px;
  box-shadow: 0 4px 20px var(--shadow-1);
}

.auth-label {
    display: block;
    font-size: 0.9rem;
    color: var(--on-surface);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
    opacity: 0.8;
}

.auth-input{
  width:100%;
  padding:12px 10px;
  border: none;
  border-bottom: 1px solid rgba(11,39,57,0.06);
  background: transparent;
  border-radius:0;
  outline: none;
  transition: all 160ms ease-in-out;
  color: var(--on-surface);
  font-size: 1rem;
}
.auth-input:focus{
  box-shadow: none;
  border-bottom: 2px solid var(--color-primary);
  background: var(--surface-elevated);
}

.auth-btn-primary{
  display:inline-block;
  background: linear-gradient(135deg,var(--color-primary),var(--color-primary-container));
  color: #ffffff;
  border: none;
  padding:12px 16px;
  border-radius: var(--radius-md);
  font-weight:600;
  letter-spacing:0.02em;
}
.auth-btn-primary:focus{outline:none; box-shadow: 0 0 0 4px var(--focus-ring);}

/* small responsive tweaks */
@media (max-width: 576px){
  .auth-card{padding:20px}
}

/* User page styles derived from CSS/LightMode.md */
.page-surface{
  padding:48px 16px;
  display:block;
  max-width:1100px;
  margin:0 auto;
}

.action-panel{
  display:flex;
  justify-content:center;
  margin-bottom:44px;
}
.action-stack{
  display:flex;
  flex-direction:column;
  gap:20px;
  width:320px;
}

.btn-action-primary{
  background: linear-gradient(135deg,var(--color-primary),var(--color-primary-container));
  color:#fff;
  border:none;
  padding:18px 20px;
  border-radius: var(--radius-md);
  font-size:1.25rem;
  font-weight:700;
}
.btn-action-primary:focus{outline:none; box-shadow:0 0 0 4px rgba(0,77,108,0.12)}

.btn-action-secondary{
  background: transparent;
  color: var(--color-tertiary);
  border:none;
  padding:14px 18px;
  border-radius: var(--radius-md);
  font-size:1.1rem;
  font-weight:600;
}
.btn-action-secondary:hover{background: rgba(123,48,0,0.04)}

.boxes-container{
  display:flex;
  justify-content:center;
  gap:32px;
  padding:0 16px;
}

.info-card, .status-card{
  background: var(--surface-elevated); /* surface-container-lowest */
  border-radius: var(--radius-md);
  padding:28px 32px;
  width:320px;
  box-shadow: 0 4px 20px var(--shadow-1);
  text-align:center;
}
.info-title{font-size:1rem; color: var(--on-surface); opacity:0.8; text-transform:capitalize; margin-bottom:12px}
.info-value{font-size:1.25rem; font-weight:700; color:var(--on-surface)}

.app-toast{
  margin: 20px auto;
  padding: 12px 20px;
  border-radius: 12px;
  color: var(--on-surface);
  font-size: 0.98rem;
  font-weight:700;
  width: fit-content;
  z-index:1000;
  box-shadow: 0 6px 20px var(--shadow-2);
}
.app-toast.success{ background: linear-gradient(90deg,var(--toast-success-start),var(--toast-success-end)); color:var(--surface-elevated) }
.app-toast.error{ background: linear-gradient(90deg,var(--toast-error-start),var(--toast-error-end)); color:var(--surface-elevated) }
.app-toast.overtime{ background: linear-gradient(90deg,var(--toast-overtime-start),var(--toast-overtime-end)); color:var(--surface-elevated) }

@media (min-width: 992px){
  .action-stack{ flex-direction:row; gap:20px; width:auto }
}

/* Admin page specific styles (LightMode) */
.admin-page{padding:48px 16px; max-width:1100px; margin:0 auto}
.admin-card{background: linear-gradient(135deg,var(--surface),var(--surface-elevated)); border-radius:var(--radius-md); padding:28px; box-shadow: 0 6px 30px var(--shadow-1); margin-bottom:28px}
.admin-actions{display:flex; gap:16px; justify-content:center; margin-bottom:28px}
.primary-cta{background: linear-gradient(135deg,var(--color-primary),var(--color-primary-container)); color:#fff; border:none; padding:16px 20px; border-radius:var(--radius-md); font-weight:700}
.secondary-cta{background:transparent; color:var(--color-secondary); border:none; padding:14px 18px; border-radius:var(--radius-md); box-shadow:none}
.primary-cta:focus, .secondary-cta:focus{outline:none; box-shadow:0 0 0 6px var(--focus-ring-strong)}

.cards-row{display:flex; gap:24px; justify-content:center}
.info-card{width:320px; padding:28px; border-radius:var(--radius-md); background:var(--surface-elevated); text-align:center}
.card-title{font-size:0.95rem; color:var(--on-surface);opacity:0.8; margin-bottom:10px; text-transform:uppercase; letter-spacing:0.04em}
.card-value{font-size:1.25rem; font-weight:700}

/* Employee table styles */
.table-card{overflow:auto; background:transparent; padding:8px}
.table-reset{width:100%; border-collapse:collapse; font-size:0.95rem}
.table-reset thead th{ text-align:left; padding:12px 16px; color:var(--on-surface);opacity:0.8; font-weight:600}
.table-reset tbody td{ padding:12px 16px; border-top:1px solid var(--outline-variant); vertical-align:middle }
.action-cell{ display:flex; gap:8px; align-items:center }
.link-btn{ background:transparent; border:none; color:var(--color-primary); cursor:pointer; padding:6px 10px; border-radius:8px }
.link-btn.danger{ color:var(--color-tertiary) }

.edit-form{ display:flex; gap:8px; align-items:center }
.is-hidden{ display:none }
.ghost-input{ padding:10px 12px; border:none; border-bottom:1px solid rgba(6,38,58,0.06); background:transparent; border-radius:0 }
.ghost-input:focus{ outline:none; border-bottom:2px solid var(--color-primary); background:var(--surface-elevated) }

.add-employee-form{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin-top:18px }
.add-employee-form .ghost-input{ min-width:180px }

.status-message{ padding:10px 14px; border-radius:12px; display:inline-block; margin-bottom:16px; font-weight:600 }
.status-message.success{ background: linear-gradient(90deg,#0ea539,#2ec866); color:#fff }
.status-message.error{ background: linear-gradient(90deg,#d64545,#a32b2b); color:#fff }

@media (max-width: 640px){
  .cards-row{flex-direction:column; align-items:center}
  .admin-actions{flex-direction:column}
  .add-employee-form{flex-direction:column; align-items:stretch}
}

/* Theme toggle styles */
.navbar{position:relative}
.navbar {
    background: var(--surface-elevated) !important;
}

    .navbar .nav-link,
    .navbar .navbar-brand {
        color: var(--on-surface) !important;
    }
.theme-toggle-wrapper{position:absolute; right:12px; top:50%; transform:translateY(-50%)}
.theme-toggle{font-size:1.15rem; padding:6px 8px; border-radius:8px; color:var(--on-surface)}
.theme-toggle:hover{background:rgba(0,0,0,0.03)}


input, select, textarea {
    background: var(--surface-elevated) !important;
    color: var(--on-surface) !important;
    border-color: var(--outline-variant) !important;
}

footer.footer {
    background: var(--surface) !important;
    color: var(--on-surface) !important;
    opacity: 0.8;
}

.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: inline-block;
}

[data-theme="dark"] .logo-light {
    display: none;
}