/* =============================================================
   Rocket Value Tokyo - メインスタイルシート
   ============================================================= */

:root {
    --primary:     #1a237e;
    --primary-lt:  #3949ab;
    --primary-dk:  #0d1b5e;
    --accent:      #f57f17;
    --accent-lt:   #ffa726;
    --success:     #2e7d32;
    --warning:     #e65100;
    --danger:      #c62828;
    --info:        #01579b;
    --bg:          #f0f2f5;
    --bg-card:     #ffffff;
    --border:      #dde1ea;
    --text:        #1c1c2e;
    --text-muted:  #6b7280;
    --sidebar-w:   240px;
    --radius:      8px;
    --shadow:      0 2px 8px rgba(0,0,0,.08);
    --shadow-md:   0 4px 16px rgba(0,0,0,.12);
}

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

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a { color: var(--primary-lt); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* =============================================================
   公開ページ（ログイン・申込）
   ============================================================= */

.public-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-lt) 50%, #283593 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.public-logo {
    text-align: center;
    margin-bottom: 32px;
}

.public-logo img {
    height: 64px;
}

.public-logo h1 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin-top: 12px;
    letter-spacing: .05em;
}

.public-logo p {
    color: rgba(255,255,255,.75);
    font-size: 13px;
    margin-top: 4px;
}

.public-card {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 40px;
    width: 100%;
    max-width: 480px;
}

.public-card h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
    text-align: center;
}

/* =============================================================
   会員レイアウト
   ============================================================= */

.site-wrapper {
    display: flex;
    min-height: 100vh;
}

/* サイドバー */
.sidebar {
    width: var(--sidebar-w);
    background: var(--primary);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-logo {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.15);
}

.sidebar-logo a {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: .04em;
}

.sidebar-logo span {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255,255,255,.6);
    margin-top: 2px;
}

.sidebar-user {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,.15);
    font-size: 12px;
}

.sidebar-user .plan-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
}

.badge-business  { background: var(--accent); color: #fff; }
.badge-premium   { background: #6a1b9a; color: #fff; }

.sidebar-user .user-name { font-weight: 600; font-size: 13px; }
.sidebar-user .user-pts  { color: rgba(255,255,255,.75); font-size: 12px; margin-top: 2px; }

.sidebar nav {
    flex: 1;
    padding: 8px 0;
}

.nav-section-label {
    padding: 12px 16px 4px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,.45);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: rgba(255,255,255,.85);
    font-size: 13px;
    text-decoration: none;
    transition: background .15s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(255,255,255,.15);
    color: #fff;
}

.sidebar nav a .nav-icon { width: 18px; text-align: center; }

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,.15);
    font-size: 12px;
}

.sidebar-footer a {
    color: rgba(255,255,255,.7);
    text-decoration: none;
}

.sidebar-footer a:hover { color: #fff; }

/* メインコンテンツ */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar h1 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.page-body {
    padding: 24px;
    flex: 1;
}

/* =============================================================
   カード・コンテナ
   ============================================================= */

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.card-body { }

/* グリッド */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* 統計カード */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

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

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group label .required {
    color: var(--danger);
    margin-left: 4px;
    font-size: 11px;
}

.form-group label .optional {
    color: var(--text-muted);
    margin-left: 4px;
    font-size: 11px;
    font-weight: 400;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    line-height: 1.5;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-lt);
    box-shadow: 0 0 0 3px rgba(57,73,171,.12);
}

.form-control[readonly] {
    background: #f8f9fa;
    color: var(--text-muted);
}

textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group { flex: 1; }

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: opacity .15s, transform .1s;
    white-space: nowrap;
    line-height: 1;
}

.btn:hover { opacity: .88; }
.btn:active { transform: scale(.98); }

.btn-primary   { background: var(--primary);    color: #fff; }
.btn-secondary { background: var(--border);     color: var(--text); }
.btn-accent    { background: var(--accent);     color: #fff; }
.btn-success   { background: var(--success);    color: #fff; }
.btn-danger    { background: var(--danger);     color: #fff; }
.btn-warning   { background: var(--warning);    color: #fff; }
.btn-info      { background: var(--info);       color: #fff; }
.btn-outline   { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 15px; }
.btn-full { width: 100%; }

/* =============================================================
   テーブル
   ============================================================= */

.table-wrap { overflow-x: auto; }

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

table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-muted);
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

table tr:last-child td { border-bottom: none; }
table tr:hover td { background: #fafbff; }

.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* =============================================================
   バッジ・ステータス
   ============================================================= */

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
}

.badge-pending    { background: #fff3e0; color: #e65100; }
.badge-active     { background: #e8f5e9; color: #2e7d32; }
.badge-suspended  { background: #fce4ec; color: #c62828; }
.badge-withdrawn  { background: #f3f4f6; color: #6b7280; }
.badge-banned     { background: #1c1c2e; color: #fff; }
.badge-draft      { background: #eceff1; color: #546e7a; }
.badge-public     { background: #e3f2fd; color: #01579b; }
.badge-closed     { background: #fce4ec; color: #c62828; }
.badge-private    { background: #f3e5f5; color: #6a1b9a; }
.badge-approved   { background: #e8f5e9; color: #2e7d32; }
.badge-rejected   { background: #fce4ec; color: #c62828; }
.badge-completed  { background: #e8f5e9; color: #2e7d32; }

/* =============================================================
   アラート
   ============================================================= */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
}

.alert-success { background: #e8f5e9; border-left: 4px solid var(--success); color: #1b5e20; }
.alert-error   { background: #fce4ec; border-left: 4px solid var(--danger);  color: #b71c1c; }
.alert-warning { background: #fff3e0; border-left: 4px solid var(--accent);  color: #bf360c; }
.alert-info    { background: #e3f2fd; border-left: 4px solid var(--info);    color: #01579b; }

/* =============================================================
   プロフィール・会員カード
   ============================================================= */

.member-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.member-card .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--border);
}

.member-card .avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-lt);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
}

.member-info .company { font-weight: 700; font-size: 15px; }
.member-info .person  { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.member-info .url     { font-size: 12px; color: var(--primary-lt); }

/* サービスカード */
.service-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow .2s;
}

.service-card:hover { box-shadow: var(--shadow-md); }

.service-card-body { padding: 16px; }
.service-card-title { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.service-card-desc  { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.service-card-footer {
    padding: 10px 16px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

/* =============================================================
   レビュー表示
   ============================================================= */

.review-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary-lt);
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.review-meta { font-size: 12px; color: var(--text-muted); }

.review-field { margin-bottom: 14px; }
.review-field-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-lt);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 4px;
}
.review-field-value { font-size: 13px; line-height: 1.7; }

.numeric-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.numeric-table th { background: var(--bg); padding: 6px 10px; font-size: 12px; font-weight: 600; }
.numeric-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: center; }

/* =============================================================
   ポイント
   ============================================================= */

.pt-positive { color: var(--success); font-weight: 700; }
.pt-negative { color: var(--danger);  font-weight: 700; }

/* =============================================================
   お知らせ
   ============================================================= */

.notice-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.notice-item:last-child { border-bottom: none; }
.notice-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.notice-title { font-size: 13px; font-weight: 600; }

/* =============================================================
   ページネーション
   ============================================================= */

.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 24px;
}

.page-btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    text-decoration: none;
    transition: background .15s;
}

.page-btn:hover { background: var(--bg); text-decoration: none; }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* =============================================================
   フィルター・検索バー
   ============================================================= */

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-bar .form-group { margin-bottom: 0; }
.filter-bar .form-control { min-width: 160px; }

/* =============================================================
   ページヘッダー
   ============================================================= */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

/* =============================================================
   空状態
   ============================================================= */

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: .4;
}

.empty-state p { font-size: 14px; }

/* =============================================================
   ハンバーガーメニュー（モバイル）
   ============================================================= */

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text);
    padding: 4px;
}

/* =============================================================
   ウィジェットプレビュー
   ============================================================= */

.widget-code-box {
    background: #1c1c2e;
    color: #a8d8a8;
    padding: 16px;
    border-radius: var(--radius);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    word-break: break-all;
    white-space: pre-wrap;
}

/* =============================================================
   レスポンシブ
   ============================================================= */

@media (max-width: 768px) {
    :root { --sidebar-w: 0px; }

    .sidebar {
        transform: translateX(-240px);
        transition: transform .25s;
        width: 240px;
    }

    .sidebar.open { transform: translateX(0); }

    .main-content { margin-left: 0; }

    .sidebar-toggle { display: block; }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .public-card { padding: 24px; }

    .page-body { padding: 16px; }

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