/* =============================================
   LOLIPOP! AIサイトエージェント — 共通スタイル
   ============================================= */

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

body {
  font-family: Noto Sans JP,Hiragino Sans,Meiryo,sans-serif;
  font-size: 14px;
  color: #10131c;
  background: #f5f3f3;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =============================================
   Header
   ============================================= */

.header {
  height: 52px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.btn-logout {
  padding: 6px 18px;
  border: 1px solid #10131c;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  font-family: inherit;
  transition: background 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}


.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  border: 1px solid #10131c;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  font-family: inherit;
  transition: background 0.15s;
  text-decoration: none;
}


/* =============================================
   Layout: Sidebar + Main
   ============================================= */

.body-wrap {
  display: flex;
  margin-top: 52px;
  min-height: calc(100vh - 52px);
}

/* =============================================
   Sidebar
   ============================================= */

.sidebar {
  width: 244px;
  border-right: 1px solid #e2dbda;
  position: fixed;
  top: 52px;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  flex-shrink: 0;
}

.nav-main {
  padding: 18px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.1s;
  text-decoration: none;
}

.nav-item:hover {
  background: #eceaea;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-sub {
  padding: 6px 0;
  border-top: 1px solid #e2dbda;
  border-bottom: 1px solid #e2dbda;
}

.nav-item-sub {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  color: #10131c;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
}

/* =============================================
   Main Content
   ============================================= */

.main {
  margin-left: 244px;
  flex: 1;
  padding: 32px 36px;
  min-width: 0;
}

.page-title {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 24px;
  color: #10131c;
}

/* =============================================
   Card（汎用）
   ============================================= */

.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 24px;
}

.card-title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 20px;
}

/* =============================================
   サイトカード（サイト一覧 / 契約商品）
   ============================================= */

.site-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.site-card:last-child {
  margin-bottom: 0;
}

.site-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8e8e8;
  margin-bottom: 14px;
}

.site-name {
  font-size: 17px;
  font-weight: 700;
}

.site-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: #333;
}

.site-meta-row {
  display: flex;
  gap: 8px;
}

.site-meta-label {
  white-space: nowrap;
}

/* =============================================
   ボタン
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: 1px solid #10131c;
  border-radius: 4px;
  background: #fff;
  color: #10131c;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  text-decoration: none;
}

.btn:hover,
.btn-link:hover,
.btn-logout:hover {
  background: #f5f5f5;
}

.btn-primary {
  background: #10131c;
  color: #fff;
  border-color: #10131c;
  padding: 10px 24px;
  font-size: 14px;
  border-radius: 6px;
}

.btn-danger {
  background: #fff;
  color: #c31b21;
  border-color: #c31b21;
}

.btn-danger:hover {
  background: #fff5f5;
}

/* =============================================
   空状態カード（サイト一覧 Empty）
   ============================================= */

.empty-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 56px 32px;
  text-align: center;
}

.empty-card-title {
  font-size: 20px;
  font-weight: 500;
}

.empty-card-desc {
  font-size: 14px;
  margin-bottom: 28px;
}

.price-display {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 28px;
}

.price-display .unit {
  font-size: 20px;
  font-weight: 500;
}

/* =============================================
   フォーム
   ============================================= */

.form-block {
  margin-bottom: 22px;
}

.form-block-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #10131c;
}

.form-block-label .required {
  color: #c0392b;
  margin-left: 2px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-input,
.form-select {
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
  font-family: inherit;
  background: #fff;
  width: 100%;
  max-width: 420px;
  display: block;
}

.form-group input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-select {
  max-width: 240px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-input:focus,
.form-select:focus,
.form-group input:focus {
  outline: 2px solid #10131c;
  outline-offset: 0;
  border-color: #10131c;
}

.form-input.form-input-sm {
  max-width: 200px;
}

.form-input.form-input-md {
  max-width: 240px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
}

/* =============================================
   タブ（契約・お支払い）
   ============================================= */

.tabs {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 24px;
}

.tab-content {
  background: #fff;
  border-radius: 8px;
  padding: 20px 24px 24px;
  border: 1px solid #ddd;
}

.tab-link {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: #555;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.15s;
  text-decoration: none;
}

.tab-link:hover {
  color: #10131c;
}

.tab-link.active {
  color: #10131c;
  border-bottom-color: #10131c;
  font-weight: 600;
}

/* =============================================
   お支払い履歴テーブル
   ============================================= */

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

.payment-table th {
  text-align: left;
  padding: 10px 16px;
  color: #666;
  font-weight: 500;
  background: #f8f8f8;
  border-bottom: 1px solid #e0e0e0;
}

.payment-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #ebebeb;
  color: #333;
}

.payment-table tr:last-child td {
  border-bottom: none;
}

.payment-table-wrap {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

/* =============================================
   モーダル
   ============================================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.modal-box {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.modal-title {
  font-size: 22px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 13px;
  color: #666;
  text-align: center;
  margin-bottom: 16px;
}

.modal-desc {
  font-size: 14px;
  color: #333;
  margin-bottom: 12px;
}

.modal-list {
  font-size: 14px;
  color: #333;
  padding-left: 20px;
  margin-bottom: 20px;
  line-height: 2;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* =============================================
   アラート（フラッシュメッセージ）
   ============================================= */

.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
}

.alert-success {
  background: #f0faf4;
  border: 1px solid #a3d9b1;
  color: #1e6e3e;
}

.alert-error {
  background: #fff5f5;
  border: 1px solid #f5a5a5;
  color: #c0392b;
}

/* =============================================
   ログイン画面
   ============================================= */

.login-container {
  width: 100%;
  max-width: 600px;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
}

.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.login-box {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 32px;
}

.login-title {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 11px;
}

.login-title-message {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 23px;
}

.error-message {
  background: #fff5f5;
  border: 1px solid #f5a5a5;
  color: #c0392b;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 16px;
}

.submit-btn {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  color: #fff;
  background-color: #10131c;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-family: inherit;
}

.submit-btn:hover {
  background-color: #2a2d3a;
}

.message {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.message-action {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 35px;
}

.message-email {
  font-weight: bold;
  color: #333;
}

.back-link {
  display: block;
  width: 100%;
  padding: 12px;
  font-size: 16px;
  color: #fff;
  background-color: #10131c;
  border: none;
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s;
}

.back-link:hover {
  background-color: #10131c;
  color: #fff;
}

.login-footer {
  text-align: center;
  margin-top: 40px;
  font-size: 14px;
}

.login-footer a {
  color: #10131c;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

.status-failed {
  color: #c31b21;
  font-weight: 600;
}
