* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #121212;
  color: #e0e0e0;
  padding-bottom: 75px;
}

.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.login-overlay.active {
  display: flex;
}

.login-modal {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  color: #e0e0e0;
}

.login-modal h2 {
  margin-bottom: 8px;
  color: #3b82f6;
}

.login-modal p {
  color: #aaa;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.login-modal input[type="password"],
.login-modal input[type="text"] {
  width: 100%;
  padding: 12px;
  background-color: #2a2a2a;
  color: #fff;
  border: 1px solid #444;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 12px;
}

.login-modal input[type="password"]:focus,
.login-modal input[type="text"]:focus {
  outline: none;
  border-color: #3b82f6;
}

.btn-login {
  width: 100%;
  background-color: #1a73e8;
  padding: 12px;
  font-size: 1rem;
}

.login-error {
  color: #d32f2f;
  font-size: 0.85rem;
  margin-top: 10px;
  min-height: 1.2em;
}

header {
  background-color: #1f1f1f;
  color: #fff;
  border-bottom: 1px solid #2d2d2d;
  padding: 16px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

header h1 {
  font-size: 1.25rem;
}

main {
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  padding: 20px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  text-decoration: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.98);
}

.btn-icon {
  font-size: 2rem;
  margin-bottom: 6px;
}

.btn-work-start {
  background-color: #28a745;
}

.btn-work-stop {
  background-color: #dc3545;
}

.btn-checkin {
  background-color: #0288d1;
}

.btn-scan {
  background-color: #673ab7;
}

.status-box {
  display: none;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  text-align: center;
}

.status-box.info {
  display: block;
  background-color: #1e3a5f;
  color: #90caf9;
}

.status-box.success {
  display: block;
  background-color: #1b3e2b;
  color: #a5d6a7;
}

.status-box.error {
  display: block;
  background-color: #4a1c1c;
  color: #ef9a9a;
}

.today-summary h2, .view-header h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #aaa;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.card {
  background: #1e1e1e;
  border: 1px solid #2d2d2d;
  padding: 14px 8px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.card h3 {
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 6px;
}

.card div {
  font-size: 1.1rem;
  font-weight: bold;
  color: #3b82f6;
}

.item-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.month-group {
  background: #1e1e1e;
  border: 1px solid #2d2d2d;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2d2d2d;
}

.month-title {
  font-size: 1.05rem;
  font-weight: bold;
  color: #3b82f6;
}

.month-summary {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ccc;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.sessions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.sessions-table th,
.sessions-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #2d2d2d;
  white-space: nowrap;
}

.sessions-table th {
  background-color: #252525;
  color: #aaa;
  font-weight: 600;
}

.list-item {
  background: #1e1e1e;
  border: 1px solid #2d2d2d;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  color: #e0e0e0;
}

.list-item .title {
  font-weight: 600;
  margin-bottom: 4px;
}

.list-item .subtitle {
  font-size: 0.85rem;
  color: #aaa;
}

a {
  color: #60a5fa;
  text-decoration: underline;
}

a:hover {
  color: #93c5fd;
}

.list-item img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-top: 8px;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #1e1e1e;
  display: flex;
  border-top: 1px solid #2d2d2d;
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #888;
  font-size: 0.75rem;
  cursor: pointer;
}

.nav-item.active {
  color: #3b82f6;
  font-weight: 600;
}

.nav-icon {
  font-size: 1.25rem;
  margin-bottom: 2px;
}
