:root{
  --bg:#f7f7fb; --card:#fff; --text:#111; --muted:#6b7280;
  --brand:#2563eb; --brand-2:#1d4ed8; --border:#e5e7eb; --danger:#ef4444;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  background:var(--bg); color:var(--text); line-height:1.6}
a{color:var(--brand); text-decoration:none} a:hover{text-decoration:underline}

.container{max-width:960px;margin:24px auto;padding:0 16px}
.header{display:flex;align-items:center;justify-content:space-between;margin:16px 0}
.brand{font-weight:700;font-size:20px}
.nav a{margin-left:12px}

/* Login brand hero */
.brand-hero{margin:12px 0 20px;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:16px;text-align:left;padding:12px;border-radius:0;
    background: transparent;
    border:0}
.brand-hero.has-photo{position:relative;overflow:hidden;color:#fff;border-color:transparent}
.brand-hero.has-photo::before{content:"";position:absolute;inset:0;background-image:var(--hero);background-size:cover;background-position:center;filter:saturate(105%) contrast(105%)}
.brand-hero.has-photo::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.45));}
.brand-hero.has-photo > *{position:relative}
.brand-hero.has-photo .brand-badge{background:rgba(255,255,255,.15);border-color:rgba(255,255,255,.35);color:#fff}
.brand-hero.has-photo .brand-tagline{color:#f3f4f6}
.brand-hero .brand-logo{width:48px;height:48px;border-radius:12px;background:linear-gradient(135deg,#2563eb,#1d4ed8);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:22px;box-shadow:0 6px 18px rgba(37,99,235,.24)}
.brand-hero .brand-logo-img{width:48px;height:48px;border-radius:12px;display:block}
.brand-hero .brand-logo-fallback{width:100%;height:100%;display:none;align-items:center;justify-content:center}
.brand-hero .brand-name{margin-top:0;font-size:36px;line-height:1.2;font-weight:900;letter-spacing:.3px;color:#0f172a;text-align:left}

@media (max-width: 768px){
    .brand-hero{flex-direction:column;gap:10px;text-align:center}
    .brand-hero .brand-name{text-align:center}
}
.brand-hero .brand-badge{margin-top:6px;font-size:15px;color:#1d4ed8;background:#eef5ff;border:1px solid #dbeafe;padding:5px 12px;border-radius:999px;font-weight:700}
.brand-hero .brand-tagline{margin-top:8px;font-size:14px;color:#475569;font-weight:600}

/* Brand hero soft background options (pairs well with logo blue) */
.brand-hero.bg-soft-amber{background:#FEF3C7} /* amber-100 */
.brand-hero.bg-soft-sky{background:#EFF6FF}   /* indigo/blue-50 */
.brand-hero.bg-soft-mint{background:#ECFEFF}  /* cyan-50 */
.brand-hero.bg-soft-lavender{background:#F5F3FF} /* violet-50 */
.brand-hero.bg-soft-sand{background:#FFF7ED}  /* orange-50 */

/* When a soft background is set, disable photo overlays completely */
.brand-hero[class*="bg-soft-"]::before,
.brand-hero[class*="bg-soft-"]::after{content:none !important}
.brand-hero[class*="bg-soft-"]{color:inherit}

.card{background:var(--card); border:1px solid var(--border); border-radius:14px;
  padding:20px; box-shadow:0 4px 20px rgba(0,0,0,.04)}

h1{font-size:22px;margin:0 0 16px}
label{display:block;margin:10px 0 6px;color:var(--muted)}
input,textarea{width:100%;padding:10px 12px;border:1px solid var(--border);
  border-radius:10px;background:#fff;outline:none}
select{width:100%;padding:10px 12px;border:1px solid var(--border);
  border-radius:10px;background:#fff;outline:none}
input:focus,select:focus,textarea:focus{border-color:var(--brand); box-shadow:0 0 0 3px rgba(37,99,235,.15)}

.btn{display:inline-block;border:none;padding:10px 14px;border-radius:10px;cursor:pointer}
.btn-primary{background:var(--brand);color:#fff} .btn-primary:hover{background:var(--brand-2)}
.btn-ghost{background:transparent;border:1px solid var(--border)}
.row{display:flex;gap:12px;align-items:center}
.mt-2{margin-top:8px} .mt-3{margin-top:12px} .mt-4{margin-top:16px}

.list{list-style:none;margin:0;padding:0}
.list li{background:#fff;border:1px solid var(--border);border-radius:12px;padding:12px;margin-bottom:10px}

.badge{font-size:12px;background:#eef;border:1px solid #dbeafe;color:#1d4ed8;border-radius:999px;padding:2px 8px}
.muted{color:var(--muted)}

.chat-box{height:55vh;overflow:auto;border:1px solid var(--border);border-radius:12px;background:#fff;padding:12px}
.msg{margin-bottom:12px}
.msg .meta{font-size:12px;color:var(--muted);margin-bottom:4px}
.msg .bubble{background:#f3f4f6;border:1px solid var(--border);border-radius:10px;padding:10px}

/* チェックボックスコンテナ */
.checkbox-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
  max-width: 80px;
}

.checkbox-container input[type="checkbox"] {
  margin: 0 0 4px 0;
  cursor: pointer;
}

.checkbox-text {
  font-size: 12px;
  color: #374151;
  text-align: center;
  line-height: 1.2;
}

.checkbox-container:hover .checkbox-text {
  color: #1f2937;
}

/* Dashboard styles */
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.search-filters {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.filter-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.supplier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.supplier-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.supplier-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.supplier-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.supplier-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.supplier-info span {
    font-size: 0.9rem;
    color: #666;
}

.supplier-regions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.region-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.supplier-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-detail {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.btn-detail:hover {
    background: #5a6268;
}

.btn-chat {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.btn-chat:hover {
    background: #218838;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

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

.pagination button.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-results h3 {
    margin-bottom: 1rem;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section h4 {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.1rem;
}

.detail-info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
}

.detail-label {
    font-weight: 600;
    color: #666;
}

.detail-value {
    color: #333;
}

.coverage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.coverage-region {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
}

.coverage-region h5 {
    margin: 0 0 0.5rem 0;
    color: #495057;
}

.coverage-countries {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.country-tag {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
}

/* Prospects table styles */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    border: 1px solid #e5e7eb;
    padding: 8px;
}

.badge-missing {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
}

/* エリア・国セレクトボックスの改善 */
select#regionSel, select#countrySel {
    height: 40px !important;
    font-size: 15px !important;
    padding: 10px 16px !important;
    line-height: 1.4 !important;
    border: 1px solid #d1d5db !important;
}

select#regionSel option, select#countrySel option {
    font-size: 15px !important;
    padding: 8px 12px !important;
}

@media (max-width: 768px) {
    .supplier-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 95%;
    }
}

/* === Request tab styles (追加) === */
.tabs{display:flex;gap:8px;margin:8px 0 12px}
.tab{padding:8px 12px;border-radius:8px;border:1px solid var(--border);background:transparent;cursor:pointer}
.tab.active{background:var(--brand);color:#fff;border-color:var(--brand)}
#tab-content-request{margin-top:12px}
#requestList .list{margin-top:8px}
@media (max-width:768px){.tabs{flex-direction:row;overflow:auto}}
