*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', sans-serif;
       background: #f5f5f7; color: #1d1d1f; font-size: 15px; line-height: 1.6; }

/* ナビ */
nav { background: #1d1d1f; color: #fff; padding: 0 24px;
      display: flex; align-items: center; height: 48px; gap: 24px; }
nav a { color: #f5f5f7; text-decoration: none; font-size: 14px; }
nav a:hover { color: #fff; }
nav a.active { color: #fff; font-weight: 600; }
nav .brand { font-weight: 600; font-size: 16px; }
nav .spacer { flex: 1; }

/* コンテナ */
.container { max-width: 960px; margin: 32px auto; padding: 0 16px; }
.container-sm { max-width: 480px; margin: 60px auto; padding: 0 16px; }

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

/* ログインフォーム */
.login-card { background: #fff; border-radius: 16px; padding: 40px;
              box-shadow: 0 2px 12px rgba(0,0,0,.1); }
.login-card h1 { font-size: 22px; margin-bottom: 8px; }
.login-card .sub { color: #6e6e73; font-size: 14px; margin-bottom: 28px; }

/* フォーム部品 */
.form-group { margin-bottom: 16px; }
label { display: block; font-size: 13px; font-weight: 500;
        color: #6e6e73; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], select, textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #d2d2d7;
    border-radius: 8px; font-size: 15px; outline: none;
    transition: border-color .15s; }
input:focus, select:focus, textarea:focus { border-color: #0071e3; }

/* ボタン */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px;
       border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer;
       border: none; text-decoration: none; transition: opacity .15s; }
.btn:hover { opacity: .85; }
.btn-primary { background: #0071e3; color: #fff; }
.btn-secondary { background: #e8e8ed; color: #1d1d1f; }
.btn-danger { background: #ff3b30; color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* アラート */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fff0f0; color: #cc0000; border: 1px solid #ffcccc; }
.alert-success { background: #f0fff4; color: #006600; border: 1px solid #ccffcc; }

/* テーブル */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: #6e6e73; font-weight: 500;
     padding: 8px 12px; border-bottom: 1px solid #e5e5ea; }
td { padding: 12px; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f9f9fb; }

/* バッジ */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px;
         font-size: 12px; font-weight: 500; }
.badge-green { background: #d4f4dd; color: #1a7a3a; }
.badge-red { background: #ffd4d4; color: #9b1c1c; }
.badge-blue { background: #ddeeff; color: #0055cc; }
.badge-gray { background: #e8e8ed; color: #555; }

/* ページヘッダー */
.page-header { display: flex; align-items: center; justify-content: space-between;
               margin-bottom: 20px; }
.page-header h2 { font-size: 20px; }

/* master_admin 専用: ヘッダー色を区別 */
nav.master-nav { background: #1a3a5c; }

/* company_manager 専用: ヘッダー色を区別 */
nav.company-nav { background: #1a5c3a; }

/* パンくずリスト */
.breadcrumb { font-size: 0.85em; color: #666; margin-bottom: 20px; line-height: 1.4; }
.breadcrumb a { color: #0071e3; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; color: #bbb; }

/* Lucide Icons (ISC License — see /LICENSES/lucide.txt) */
.lucide { width: 1em; height: 1em; stroke-width: 2; stroke: currentColor; fill: none;
          stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.125em; flex-shrink: 0; }
.lucide-fill { width: 1em; height: 1em; vertical-align: -0.125em; flex-shrink: 0; }

/* パスワード可視化トグル */
.pw-wrap { position: relative; }
.pw-wrap input[type="password"], .pw-wrap input[type="text"] { padding-right: 44px; }
.pw-toggle {
  position: absolute; top: 0; right: 0; bottom: 0; width: 44px;
  background: transparent; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #6b7280; padding: 0;
}
.pw-toggle:hover { color: #1f2937; }
.pw-toggle:focus-visible { outline: 2px solid #0071e3; outline-offset: -2px; border-radius: 6px; }
.pw-toggle svg { width: 20px; height: 20px; }
