/* admin.css - Raonpick style Dashboard */
:root {
  --primary-color: #105dd2;
  --bg-color: #f4f6f9;
  --sidebar-bg: #1e2432;
  --sidebar-text: #a0a5b1;
  --sidebar-active: #ffffff;
  --card-bg: #ffffff;
  --text-main: #333333;
  --text-muted: #777777;
  --border-color: #e5e7eb;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Pretendard', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background-color: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}

.sidebar-logo {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.sidebar-logo img {
  max-width: 150px;
}

.sidebar-menu {
  list-style: none;
  padding: 20px 0;
  margin: 0;
  flex: 1;
}

.sidebar-menu li {
  padding: 0;
}

.sidebar-menu a {
  display: block;
  padding: 15px 25px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  color: var(--sidebar-active);
  background-color: rgba(255,255,255,0.05);
  border-left: 3px solid var(--primary-color);
}

.sidebar-menu a i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer a {
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.9rem;
}

.sidebar-footer a:hover {
  color: var(--sidebar-active);
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-header {
  height: 60px;
  background-color: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 30px;
  justify-content: space-between;
}

.top-header h1 {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 600;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-body {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

/* Dashboard Cards */
.card {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  padding: 25px;
  margin-bottom: 25px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #444;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(16, 93, 210, 0.1);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #0d4eb0;
}

.btn-primary:disabled {
  background-color: #a0c0f0;
  cursor: not-allowed;
}

/* Results Area */
.result-area {
  display: none;
  margin-top: 30px;
  animation: fadeIn 0.5s;
}

.result-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
}

.result-box pre {
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
}

.result-box h1, .result-box h2, .result-box h3 {
  margin-top: 0;
}

.loading-spinner {
  display: none;
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(16, 93, 210, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Provider Selector */
.provider-selector {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.provider-option {
  flex: 1;
  position: relative;
}

.provider-option input[type="radio"] {
  display: none;
}

.provider-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  font-weight: 600;
}

.provider-option input[type="radio"]:checked + label {
  border-color: var(--primary-color);
  background-color: rgba(16, 93, 210, 0.05);
  color: var(--primary-color);
}

/* Raonpick Style Table */
.raon-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: center;
  white-space: nowrap;
}

.raon-table th {
  background-color: #2b3345;
  color: #fff;
  padding: 12px 10px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.raon-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #d0d5e0;
}

.raon-table tbody tr:hover {
  background-color: rgba(255,255,255,0.02);
}

.raon-table .td-title {
  text-align: left;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exposure-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

.badge-strong { background-color: #00b894; } /* 강성 - 초록 */
.badge-good { background-color: #0984e3; }   /* 양호 - 파랑 */
.badge-weak { background-color: #d63031; }   /* 약성 - 빨강 */
.badge-normal { background-color: #636e72; } /* 일반 - 회색 */

.btn-link {
  color: #fff;
  background-color: rgba(255,255,255,0.1);
  padding: 5px 10px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.8rem;
}
.btn-link:hover {
  background-color: rgba(255,255,255,0.2);
}
