/* ===== DataShield Dashboard Styles ===== */

/* ===== Layout ===== */
.ds-layout {
    display: flex;
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.ds-sidebar {
    width: 260px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    background: linear-gradient(180deg, #1e40af, #2563eb);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

.ds-sidebar-header {
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.ds-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.ds-logo span {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.ds-logo:hover {
    opacity: 0.9;
}

/* ===== Hamburger & Mobile Sidebar ===== */
.ds-hamburger {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 200;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.ds-sidebar-close {
    display: none;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
}

.ds-sidebar-close:hover {
    color: #fff;
}

.ds-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
}

.ds-nav {
    list-style: none;
    padding: 16px 12px;
    flex: 1;
}

.ds-nav li {
    margin-bottom: 4px;
}

.ds-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ds-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.ds-nav a.active {
    background: #fff;
    color: #2563eb;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.ds-nav a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* ===== Main Content ===== */
.ds-main {
    margin-left: 260px;
    padding: 32px;
    background: #f8fafc;
    min-height: 100vh;
    flex: 1;
}

/* ===== Header ===== */
.ds-header {
    margin-bottom: 28px;
}

.ds-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.ds-header p {
    font-size: 0.92rem;
    color: #6b7280;
}

/* ===== Card ===== */
.ds-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 24px;
}

.ds-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

.ds-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

/* ===== Metric Cards Grid ===== */
.ds-metric-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.ds-metric-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    text-align: center;
}

.ds-metric-card .metric-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.ds-metric-card .metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.ds-metric-card .metric-value.amber {
    color: #d97706;
}

.ds-metric-card .metric-label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 4px;
}

/* ===== Chart Row ===== */
.ds-chart-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

/* ===== Score Gauge ===== */
.ds-score-gauge {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 8px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 0 auto 16px;
    position: relative;
}

.ds-score-gauge.amber {
    border-color: #f59e0b;
}

.ds-score-gauge.green {
    border-color: #10b981;
}

.ds-score-gauge.red {
    border-color: #ef4444;
}

.ds-score-gauge .score-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.ds-score-gauge .score-label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 4px;
}

/* ===== Badges ===== */
.ds-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.5;
}

.ds-badge.green {
    background: #dcfce7;
    color: #166534;
}

.ds-badge.amber {
    background: #fef3c7;
    color: #92400e;
}

.ds-badge.red {
    background: #fee2e2;
    color: #991b1b;
}

.ds-badge.blue {
    background: #dbeafe;
    color: #1e40af;
}

/* ===== Recommendation Cards ===== */
.ds-recommendation-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px 24px;
    margin-bottom: 12px;
    border-left: 4px solid #e5e7eb;
}

.ds-recommendation-card.critical {
    border-left-color: #ef4444;
}

.ds-recommendation-card.warning {
    border-left-color: #f59e0b;
}

.ds-recommendation-card.info {
    border-left-color: #2563eb;
}

.ds-recommendation-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.ds-recommendation-card p {
    font-size: 0.88rem;
    color: #6b7280;
    line-height: 1.6;
}

.ds-recommendation-card .rec-meta {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Service Cards ===== */
.ds-service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.ds-service-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px 24px;
    border-left: 4px solid #e5e7eb;
}

.ds-service-card.risk-low {
    border-left-color: #10b981;
}

.ds-service-card.risk-medium {
    border-left-color: #f59e0b;
}

.ds-service-card.risk-high {
    border-left-color: #ef4444;
}

.ds-service-card .service-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ds-service-card .service-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
}

.ds-service-card .service-detail {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.ds-service-card .service-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 0.82rem;
    color: #9ca3af;
}

/* ===== Risk Bar ===== */
.ds-risk-bar {
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    overflow: hidden;
    margin-top: 8px;
}

.ds-risk-bar .bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.ds-risk-bar .bar-fill.low {
    background: #10b981;
}

.ds-risk-bar .bar-fill.medium {
    background: #f59e0b;
}

.ds-risk-bar .bar-fill.high {
    background: #ef4444;
}

/* ===== Data Table ===== */
.ds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.ds-table thead th {
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid #e5e7eb;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ds-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s ease;
}

.ds-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.ds-table tbody tr:hover {
    background: #f0f5ff;
}

.ds-table tbody td {
    padding: 12px 16px;
    color: #374151;
    vertical-align: middle;
}

.ds-table-empty {
    text-align: center;
    padding: 48px 24px;
    color: #9ca3af;
    font-size: 0.95rem;
}

/* ===== Filter Bar ===== */
.ds-filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ds-filter-bar select,
.ds-filter-bar input {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #374151;
    background: #fff;
    transition: border-color 0.2s ease;
    min-width: 140px;
}

.ds-filter-bar select:focus,
.ds-filter-bar input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ds-filter-bar input[type="text"] {
    flex: 1;
    min-width: 180px;
}

/* ===== Buttons ===== */
.ds-btn {
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ds-btn.primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.ds-btn.primary:hover {
    background: #1d4ed8;
}

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

.ds-btn.danger:hover {
    background: #fef2f2;
}

.ds-btn.outline {
    background: #fff;
    color: #374151;
    border-color: #d1d5db;
}

.ds-btn.outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* ===== Stats Bar ===== */
.ds-stats-bar {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.ds-stats-bar .stat-item {
    flex: 1;
    text-align: center;
    padding: 20px 16px;
    border-right: 1px solid #f3f4f6;
}

.ds-stats-bar .stat-item:last-child {
    border-right: none;
}

.ds-stats-bar .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.ds-stats-bar .stat-label {
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 4px;
}

/* ===== Toggle Switch ===== */
.ds-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.ds-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ds-toggle .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #d1d5db;
    border-radius: 24px;
    transition: 0.3s;
}

.ds-toggle .toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.ds-toggle input:checked + .toggle-slider {
    background: #2563eb;
}

.ds-toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ===== Slider ===== */
.ds-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    transition: opacity 0.2s;
}

.ds-slider:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 4px;
}

.ds-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.ds-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ===== Settings Section ===== */
.ds-settings-section {
    margin-bottom: 24px;
}

.ds-settings-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.ds-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f9fafb;
}

.ds-settings-row:last-child {
    border-bottom: none;
}

.ds-settings-row .setting-label {
    font-size: 0.92rem;
    color: #374151;
    font-weight: 500;
}

.ds-settings-row .setting-sub {
    font-size: 0.82rem;
    color: #9ca3af;
    margin-top: 2px;
}

.ds-settings-row .setting-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ds-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 6px;
}

/* ===== Pagination ===== */
.ds-pagination {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.ds-pagination button {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s ease;
}

.ds-pagination button:hover {
    background: #f3f4f6;
}

.ds-pagination button.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* ===== Footer ===== */
.ds-footer {
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 40px;
}

.ds-footer a {
    color: #6b7280;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.ds-footer a:hover {
    color: #2563eb;
}

/* ===== Score Section ===== */
.ds-score-section {
    text-align: center;
    padding: 20px 0;
}

.ds-score-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.ds-sub-metrics {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 20px;
}

.ds-sub-metrics .sub-metric {
    text-align: center;
}

.ds-sub-metrics .sub-metric-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
}

.ds-sub-metrics .sub-metric-label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 2px;
}

/* ===== Category Risk Bars ===== */
.ds-category-risk-item {
    margin-bottom: 16px;
}

.ds-category-risk-item .risk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.ds-category-risk-item .risk-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
}

.ds-category-risk-item .risk-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
}

/* ===== Alert Cards ===== */
.ds-alert-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px 24px;
    margin-bottom: 12px;
    border-left: 4px solid #e5e7eb;
}

.ds-alert-card.critical {
    border-left-color: #ef4444;
}

.ds-alert-card.warning {
    border-left-color: #f59e0b;
}

.ds-alert-card.info {
    border-left-color: #2563eb;
}

.ds-alert-card .alert-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.ds-alert-card .alert-desc {
    font-size: 0.88rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 8px;
}

.ds-alert-card .alert-recommendation {
    font-size: 0.85rem;
    color: #2563eb;
    font-weight: 500;
}

/* ===== Checkbox Group ===== */
.ds-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ds-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    color: #374151;
    cursor: pointer;
}

.ds-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    cursor: pointer;
}

/* ===== Settings Actions ===== */
.ds-settings-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* ===== Select (standalone) ===== */
.ds-select {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #374151;
    background: #fff;
    transition: border-color 0.2s ease;
}

.ds-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== Data Management Row ===== */
.ds-data-mgmt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.ds-data-mgmt-row:last-child {
    border-bottom: none;
}

.ds-data-mgmt-row .mgmt-label {
    font-size: 0.92rem;
    color: #374151;
    font-weight: 500;
}

.ds-data-mgmt-row .mgmt-desc {
    font-size: 0.82rem;
    color: #9ca3af;
    margin-top: 2px;
}

.ds-data-mgmt-row .mgmt-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ds-warning-text {
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: 8px;
}

/* ===== Sidebar Footer ===== */
.ds-sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: auto;
}

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

.ds-user-info .user-avatar {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.9);
}

.ds-user-info .user-detail {
    display: flex;
    flex-direction: column;
}

.ds-user-info .user-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
}

.ds-user-info .user-logout {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.ds-user-info .user-logout:hover {
    color: #fff;
}

.ds-demo-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    color: #fbbf24;
    font-size: 0.85rem;
    font-weight: 500;
}

.ds-demo-banner i {
    font-size: 0.9rem;
}

.ds-demo-login-link {
    margin-left: auto;
    color: #fff;
    font-size: 0.78rem;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.ds-demo-login-link:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ===== Login Page ===== */
.ds-login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
    padding: 20px;
}

.ds-login-container {
    width: 100%;
    max-width: 420px;
}

.ds-login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ds-login-header {
    text-align: center;
    margin-bottom: 32px;
}

.ds-login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #fff;
    font-size: 1.8rem;
}

.ds-login-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.ds-login-header p {
    font-size: 0.9rem;
    color: #6b7280;
}

.ds-login-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ds-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ds-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid #e5e7eb;
}

.ds-login-btn.google {
    background: #fff;
    color: #374151;
}

.ds-login-btn.google:hover {
    background: #f9fafb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ds-login-btn.kakao {
    background: #fee500;
    color: #000;
    border-color: #fee500;
}

.ds-login-btn.kakao:hover {
    background: #fdd835;
}

.ds-login-btn.demo {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
    font-weight: 500;
}

.ds-login-btn.demo:hover {
    background: #e5e7eb;
    color: #374151;
}

.ds-login-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    color: #9ca3af;
    font-size: 0.82rem;
}

.ds-login-divider::before,
.ds-login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.ds-login-footer {
    text-align: center;
    margin-top: 24px;
}

.ds-login-footer a {
    color: #6b7280;
    font-size: 0.88rem;
}

.ds-login-footer a:hover {
    color: #2563eb;
}

/* ===== Upload Section ===== */
.ds-upload-section {
    margin-bottom: 24px;
}

.ds-upload-section h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ds-upload-desc {
    font-size: 0.88rem;
    color: #6b7280;
    margin-bottom: 20px;
}

.ds-upload-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ds-upload-platform-select label {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.ds-upload-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #9ca3af;
}

.ds-upload-dropzone:hover,
.ds-upload-dropzone.dragover {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
}

.ds-upload-dropzone i {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.ds-upload-dropzone p {
    font-size: 0.92rem;
    margin-bottom: 4px;
}

.ds-upload-hint {
    font-size: 0.78rem;
}

.ds-upload-progress {
    padding: 12px 0;
}

.ds-upload-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.ds-upload-progress-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 0;
}

.ds-upload-progress span {
    font-size: 0.82rem;
    color: #6b7280;
}

.ds-upload-success {
    background: #dcfce7;
    color: #166534;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
}

.ds-upload-success a {
    color: #166534;
    font-weight: 600;
    margin-left: 8px;
}

.ds-upload-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
}

.ds-upload-history {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

.ds-upload-history h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.ds-upload-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f9fafb;
}

.ds-upload-history-item:last-child {
    border-bottom: none;
}

.ds-upload-history-item .upload-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ds-upload-history-item .upload-platform {
    font-weight: 600;
    font-size: 0.88rem;
    color: #111827;
}

.ds-upload-history-item .upload-filename {
    font-size: 0.82rem;
    color: #6b7280;
}

.ds-upload-history-item .upload-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ds-upload-history-item .upload-date {
    font-size: 0.78rem;
    color: #9ca3af;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .ds-hamburger {
        display: flex;
    }

    .ds-sidebar-close {
        display: block;
    }

    .ds-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

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

    .ds-sidebar-overlay.open {
        display: block;
    }

    .ds-sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .ds-main {
        margin-left: 0;
        padding: 60px 16px 20px;
    }

    .ds-metric-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .ds-chart-row {
        grid-template-columns: 1fr;
    }

    .ds-service-grid {
        grid-template-columns: 1fr;
    }

    .ds-stats-bar {
        flex-direction: column;
    }

    .ds-stats-bar .stat-item {
        border-right: none;
        border-bottom: 1px solid #f3f4f6;
    }

    .ds-stats-bar .stat-item:last-child {
        border-bottom: none;
    }

    .ds-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .ds-filter-bar select,
    .ds-filter-bar input {
        min-width: 100%;
    }

    .ds-sub-metrics {
        flex-direction: column;
        gap: 16px;
    }

    .ds-settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ds-settings-actions {
        flex-direction: column;
    }

    .ds-data-mgmt-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ds-table {
        font-size: 0.82rem;
    }

    .ds-table thead th,
    .ds-table tbody td {
        padding: 10px 10px;
    }
}

@media (max-width: 480px) {
    .ds-metric-cards {
        grid-template-columns: 1fr;
    }
}

/* ===== Toast Notifications ===== */
.ds-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ds-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 360px;
}

.ds-toast.show {
    transform: translateX(0);
}

.ds-toast-success { background: #dcfce7; color: #166534; border-left: 4px solid #22c55e; }
.ds-toast-error { background: #fef2f2; color: #991b1b; border-left: 4px solid #ef4444; }
.ds-toast-warning { background: #fffbeb; color: #92400e; border-left: 4px solid #f59e0b; }
.ds-toast-info { background: #eff6ff; color: #1e40af; border-left: 4px solid #2563eb; }

/* ===== Confirm Modal ===== */
.ds-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ds-modal-overlay.show {
    opacity: 1;
}

.ds-modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.ds-modal h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.ds-modal p {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 24px;
}

.ds-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ===== Loading State ===== */
.ds-btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.ds-btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ds-spin 0.6s linear infinite;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
}

.ds-btn.outline.loading::after,
.ds-btn.danger.loading::after {
    border-color: rgba(0, 0, 0, 0.15);
    border-top-color: #374151;
}

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

/* ===== Table Action Column ===== */
.ds-btn-icon {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s ease;
}

.ds-btn-icon:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #dc2626;
}

.ds-bulk-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #eff6ff;
    border-radius: 8px;
    margin-bottom: 12px;
}

.ds-bulk-actions span {
    font-size: 0.88rem;
    color: #1e40af;
    font-weight: 500;
}

/* ===== Alert Card Actions ===== */
.ds-alert-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* ===== Header Actions ===== */
.ds-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ===== API Connect Section ===== */
.ds-connect-section {
    margin-bottom: 24px;
}

.ds-connect-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.ds-connect-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.ds-connect-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.ds-connect-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ds-connect-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
}

.ds-connect-icon.google {
    background: linear-gradient(135deg, #4285f4, #34a853);
}

.ds-connect-icon.kakao {
    background: #fee500;
    color: #3c1e1e;
}

.ds-connect-info {
    flex: 1;
    min-width: 0;
}

.ds-connect-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

.ds-connect-scope {
    font-size: 0.75rem;
    color: #6b7280;
}

.ds-connect-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.ds-connect-status.connected {
    background: #dcfce7;
    color: #166534;
}

.ds-connect-status.disconnected {
    background: #f3f4f6;
    color: #6b7280;
}

.ds-connect-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.75rem;
    color: #6b7280;
    border-top: 1px solid #f3f4f6;
}

.ds-connect-meta {
    font-size: 0.75rem;
    color: #9ca3af;
}

.ds-connect-sync-status {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b7280;
}

.ds-connect-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.ds-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.ds-btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.ds-btn-primary {
    background: #2563eb;
    color: #fff;
}

.ds-btn-primary:hover {
    background: #1d4ed8;
}

.ds-btn-success {
    background: #16a34a;
    color: #fff;
}

.ds-btn-success:hover {
    background: #15803d;
}

.ds-btn-danger {
    background: #fff;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.ds-btn-danger:hover {
    background: #fef2f2;
}

.ds-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .ds-connect-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== HIBP Breach Check ===== */
.ds-breach-check {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ds-breach-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ds-breach-email {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #111827;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.ds-breach-email i {
    color: #6b7280;
}

.ds-breach-desc {
    font-size: 0.82rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.ds-breach-result {
    margin-top: 4px;
}

.ds-breach-safe {
    background: #dcfce7;
    color: #166534;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ds-breach-warning {
    background: #fef3c7;
    color: #92400e;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ds-breach-error {
    background: #f3f4f6;
    color: #6b7280;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
