* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  background: #f0f2f5;
  color: #333;
  min-height: 100vh;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.container.wide {
  max-width: 960px;
}

/* ヘッダー */
.header {
  background: #1a73e8;
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  font-size: 18px;
  font-weight: 600;
}

.header .user-info {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-logout {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.btn-logout:hover {
  background: rgba(255,255,255,0.3);
}

/* カード */
.card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card h2 {
  font-size: 16px;
  margin-bottom: 16px;
  color: #333;
  border-bottom: 2px solid #1a73e8;
  padding-bottom: 8px;
}

/* フォーム */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #555;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #1a73e8;
}

/* ボタン */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  text-align: center;
}

.btn:hover {
  opacity: 0.85;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: #1a73e8;
  color: white;
  width: 100%;
}

.btn-clock-in {
  background: #34a853;
  color: white;
  width: 100%;
  padding: 20px;
  font-size: 20px;
  margin-bottom: 12px;
}

.btn-clock-out {
  background: #ea4335;
  color: white;
  width: 100%;
  padding: 20px;
  font-size: 20px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-secondary {
  background: #5f6368;
  color: white;
}

.btn-success {
  background: #34a853;
  color: white;
}

/* 時計 */
.clock {
  text-align: center;
  padding: 20px 0;
}

.clock .time {
  font-size: 48px;
  font-weight: 700;
  color: #1a73e8;
  font-variant-numeric: tabular-nums;
}

.clock .date {
  font-size: 16px;
  color: #666;
  margin-top: 4px;
}

/* テーブル */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table th,
table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}

table td {
  color: #333;
}

table tr:hover {
  background: #f8f9fa;
}

/* メッセージ */
.msg {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.msg-success {
  background: #e6f4ea;
  color: #137333;
}

.msg-error {
  background: #fce8e6;
  color: #c5221f;
}

.msg-info {
  background: #e8f0fe;
  color: #1a73e8;
}

/* 打刻ステータス */
.punch-status {
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

/* フィルター行 */
.filter-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-row .form-group {
  flex: 1;
  min-width: 140px;
  margin-bottom: 0;
}

/* ログイン画面 */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: white;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.login-card h1 {
  text-align: center;
  font-size: 22px;
  margin-bottom: 8px;
  color: #1a73e8;
}

.login-card .subtitle {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin-bottom: 24px;
}

/* タブ */
.tabs {
  display: flex;
  border-bottom: 2px solid #eee;
  margin-bottom: 20px;
}

.tab {
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 500;
  color: #666;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab.active {
  color: #1a73e8;
  border-bottom-color: #1a73e8;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* GPS情報 */
.gps-info {
  font-size: 12px;
  color: #888;
}

/* レスポンシブ */
@media (max-width: 480px) {
  .container {
    padding: 12px;
  }

  .card {
    padding: 16px;
    border-radius: 8px;
  }

  .clock .time {
    font-size: 36px;
  }

  .filter-row {
    flex-direction: column;
  }

  .login-card {
    padding: 24px;
  }
}
