/* ========================================
   DBMC Common Stylesheet
   共通CSSファイル
   ======================================== */
/* ========== Reset & Base ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    min-height: 100vh;
    font-family: 'Segoe UI', 'Hiragino Sans', sans-serif;
    background: #f8f9fb;
    display: flex;
}

/* ========== Sidebar ========== */
.sidebar {
    width: 260px;
    background: #fff;
    min-height: 100vh;
    padding: 28px 20px;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #eef0f5;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 8px;
    margin-bottom: 16px;
}

.sidebar-logo img {
    width: 120px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.sidebar-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo-icon i { font-size: 16px; color: #fff; }

.sidebar-logo h1 {
    font-size: 17px;
    color: #1a1d26;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.sidebar-menu { flex: 1; }

.menu-label {
    color: #9ca3b4;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0 12px;
    margin-bottom: 14px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #5f6880;
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
    cursor: pointer;
}

.menu-item:hover { background: #f4f5f9; color: #1a1d26; }
.menu-item.active { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
.menu-item i { width: 18px; text-align: center; font-size: 15px; }
.menu-item span { font-weight: 500; }

.sidebar-footer { border-top: 1px solid #eef0f5; padding-top: 20px; }

/* ========== Owner Switcher (Admin Only) ========== */
.owner-switcher {
    background: #f8f9fb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.owner-switcher-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.owner-switcher-label i {
    font-size: 11px;
}

.owner-switcher-select-wrapper {
    position: relative;
    width: 100%;
}

.owner-switcher-select {
    width: 100%;
    padding: 8px 28px 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #1a1d26;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%236366f1' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: all 0.2s;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.owner-switcher-select:hover {
    border-color: #6366f1;
}

.owner-switcher-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.owner-switcher-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
    padding: 5px 8px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    color: #d97706;
}

.owner-switcher-status.switched {
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* レスポンシブ対応 */
@media (max-width: 900px) {
    .owner-switcher {
        padding: 8px;
    }
    .owner-switcher-label {
        justify-content: center;
        margin-bottom: 6px;
    }
    .owner-switcher-label span {
        display: none;
    }
    .owner-switcher-select {
        padding: 6px 24px 6px 6px;
        font-size: 10px;
    }
    .owner-switcher-status {
        padding: 4px 6px;
        font-size: 9px;
    }
    .owner-switcher-status span {
        display: none;
    }
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fb;
    border-radius: 12px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.user-info h4 { color: #1a1d26; font-size: 13px; font-weight: 600; }
.user-info p { color: #9ca3b4; font-size: 11px; }

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px;
    background: transparent;
    border: 1px solid #eef0f5;
    border-radius: 10px;
    color: #5f6880;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-logout:hover { background: #fef2f2; border-color: #fecaca; color: #ef4444; }

/* ========== Main Content ========== */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 32px 40px;
}

.page-header { margin-bottom: 32px; }
.page-header h2 {
    font-size: 24px;
    color: #1a1d26;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}
.page-header p { color: #9ca3b4; font-size: 14px; }

/* ========== Breadcrumb ========== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}
.breadcrumb a {
    color: #9ca3b4;
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover { color: #6366f1; }
.breadcrumb span { color: #9ca3b4; }
.breadcrumb .current { color: #5f6880; font-weight: 500; }

/* ========== Stats Grid ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 36px;
}

.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    border: 1px solid #eef0f5;
}

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

.stat-card h3 {
    color: #9ca3b4;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .value {
    font-size: 26px;
    font-weight: 700;
    color: #1a1d26;
    letter-spacing: -0.5px;
}

.stat-card .change {
    font-size: 12px;
    color: #10b981;
    margin-top: 6px;
    font-weight: 500;
}

/* ========== Mini Stats Row ========== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.mini-stat {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid #eef0f5;
    display: flex;
    align-items: center;
    gap: 14px;
}

.mini-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.mini-stat-content h4 {
    font-size: 12px;
    color: #9ca3b4;
    font-weight: 500;
    margin-bottom: 4px;
}

.mini-stat-content .value {
    font-size: 22px;
    font-weight: 700;
    color: #1a1d26;
}

/* ========== Section Title ========== */
.section-title {
    font-size: 16px;
    color: #1a1d26;
    font-weight: 600;
    margin-bottom: 18px;
    letter-spacing: -0.2px;
}

/* ========== Action Grid ========== */
.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.action-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #eef0f5;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.action-card:hover {
    border-color: #e0e2ea;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.action-content h4 {
    color: #1a1d26;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
}

.action-content p {
    color: #9ca3b4;
    font-size: 13px;
    line-height: 1.5;
}

/* ========== Icons (Common) ========== */
.stat-icon,
.action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.stat-icon { width: 40px; height: 40px; font-size: 16px; }
.action-icon { width: 46px; height: 46px; font-size: 18px; border-radius: 12px; flex-shrink: 0; }

/* ========== Color Variants ========== */
.purple { background: #f3f0ff; color: #6366f1; }
.blue { background: #eff6ff; color: #3b82f6; }
.green { background: #ecfdf5; color: #10b981; }
.amber { background: #fffbeb; color: #f59e0b; }
.pink { background: #fdf2f8; color: #ec4899; }
.violet { background: #faf5ff; color: #8b5cf6; }
.teal { background: #f0fdfa; color: #14b8a6; }
.red { background: #fef2f2; color: #ef4444; }
.indigo { background: #eef2ff; color: #6366f1; }
.cyan { background: #ecfeff; color: #06b6d4; }
.orange { background: #fff7ed; color: #f97316; }
.rose { background: #fff1f2; color: #f43f5e; }

/* ========== Buttons ========== */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: #f4f5f9;
    color: #5f6880;
    border: 1px solid #e5e7eb;
}
.btn-secondary:hover {
    background: #e5e7eb;
    color: #1a1d26;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #fff;
}
.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: #fff;
}
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-outline-primary {
    background: transparent;
    color: #6366f1;
    border: 1px solid #6366f1;
}

.btn-outline-primary:hover {
    background: #f5f3ff;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

/* ========== Filter Section ========== */
.filter-section {
    background: #fff;
    border-radius: 14px;
    padding: 20px 24px;
    border: 1px solid #eef0f5;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ========== Search Box ========== */
.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 14px 10px 40px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    width: 280px;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-box > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3b4;
}

/* ========== Filter Select ========== */
.filter-select {
    padding: 10px 36px 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #1a1d26;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3b4' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.filter-select:focus {
    outline: none;
    border-color: #6366f1;
}

/* ========== Table Container ========== */
.table-container {
    display: block;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eef0f5;
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 380px);
    min-height: 300px;
    position: relative;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.data-table thead th {
    background: #f8f9fb;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #5f6880;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table thead th.center { text-align: center; }
.data-table thead th.right { text-align: right; }

.data-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #eef0f5;
    color: #1a1d26;
}

.data-table tbody tr:hover { background: #f8f9fb; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody td.center { text-align: center; }
.data-table tbody td.right { text-align: right; }

/* Sticky columns */
.data-table th.sticky-id,
.data-table td.sticky-id {
    position: sticky;
    left: 0;
    z-index: 12;
    background: #f8f9fb;
}

.data-table td.sticky-id {
    background: #fff;
    z-index: 5;
}

.data-table th.sticky-name,
.data-table td.sticky-name {
    position: sticky;
    left: 60px;
    z-index: 12;
    background: #f8f9fb;
    box-shadow: 2px 0 4px rgba(0,0,0,0.05);
}

.data-table td.sticky-name {
    background: #fff;
    z-index: 5;
}

/* ========== Badges ========== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: #ecfdf5;
    color: #10b981;
}

.badge-secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.badge-warning {
    background: #fffbeb;
    color: #f59e0b;
}

.badge-danger {
    background: #fef2f2;
    color: #ef4444;
}

.badge-info {
    background: #eff6ff;
    color: #3b82f6;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.draft { background: #f3f4f6; color: #6b7280; }
.status-badge.scheduled { background: #eff6ff; color: #3b82f6; }
.status-badge.sending { background: #fef3c7; color: #d97706; }
.status-badge.completed { background: #ecfdf5; color: #10b981; }
.status-badge.error { background: #fef2f2; color: #ef4444; }
.status-badge.published { background: #ecfdf5; color: #10b981; }

/* ========== Action Buttons ========== */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.action-btn-group {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: #f4f5f9;
    color: #5f6880;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.action-btn:hover { background: #e5e7eb; color: #1a1d26; }

/* Action button color variants */
.action-btn.view { background: #eff6ff; color: #3b82f6; }
.action-btn.view:hover { background: #dbeafe; }
.action-btn.edit { background: #fef3c7; color: #d97706; }
.action-btn.edit:hover { background: #fde68a; }
.action-btn.test { background: #fffbeb; color: #f59e0b; }
.action-btn.test:hover { background: #fde68a; }
.action-btn.send { background: #ecfdf5; color: #10b981; }
.action-btn.send:hover { background: #d1fae5; }
.action-btn.delete { background: #fef2f2; color: #ef4444; }
.action-btn.delete:hover { background: #fecaca; }
.action-btn.duplicate { background: #ecfdf5; color: #10b981; }
.action-btn.duplicate:hover { background: #d1fae5; }

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eef0f5;
}

.empty-state i {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    color: #1a1d26;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: #9ca3b4;
    margin-bottom: 24px;
}

/* ========== Modal ========== */
.modal,
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.show,
.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

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

.modal-header h3 {
    font-size: 18px;
    color: #1a1d26;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3b4;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.modal-close:hover { color: #ef4444; }

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 140px);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #eef0f5;
}

/* ========== Alerts ========== */
.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #d97706;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
}

/* ========== Pagination ========== */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 16px 0;
}

.pagination-info {
    font-size: 13px;
    color: #6b7280;
}

.pagination-buttons {
    display: flex;
    gap: 8px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #5f6880;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #6366f1;
    color: #6366f1;
}

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

.pagination-btn.active {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}

/* ========== Form Section ========== */
.form-section {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eef0f5;
    margin-bottom: 24px;
    overflow: hidden;
    padding: 24px;
}

.form-section .section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section .section-title i {
    color: #6366f1;
}

.section-header {
    background: linear-gradient(135deg, #374151, #4b5563);
    color: #fff;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header i {
    font-size: 16px;
    opacity: 0.9;
}

.section-body {
    padding: 12px;
}

/* ========== Form Table ========== */
.form-table {
    width: 100%;
    border-collapse: collapse;
}

.form-table th {
    text-align: left;
    padding: 7px 8px;
    background: #f8f9fb;
    font-weight: 500;
    font-size: 13px;
    color: #5f6880;
    width: 160px;
    vertical-align: middle;
    border-bottom: 1px solid #eef0f5;
}

.form-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #eef0f5;
}

.form-table tr:last-child th,
.form-table tr:last-child td {
    border-bottom: none;
}

/* ========== Form Elements ========== */
.form-input {
    padding: 5px 7px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input.small { width: 100px; }
.form-input.medium { width: 200px; }

.form-select {
    padding: 5px 36px 5px 7px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3b4' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-select:focus {
    outline: none;
    border-color: #6366f1;
}

.form-textarea {
    padding: 6px 7px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.form-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ========== Radio & Checkbox ========== */
.radio-group,
.checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #1a1d26;
}

.radio-label input,
.checkbox-label input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ========== Check List (Modal) ========== */
.check-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.check-item:hover { background: #f3f4f6; }

.check-item input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.check-item-label {
    font-size: 14px;
    color: #1a1d26;
}

/* ========== Button Area ========== */
.button-area {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid #eef0f5;
    margin-top: 24px;
}

/* ========== Card Container ========== */
.upload-container,
.mapping-container,
.preview-container {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #eef0f5;
    margin-bottom: 24px;
}

/* ========== Detail Grid ========== */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item.full-width {
    grid-column: span 2;
}

.detail-label {
    font-size: 12px;
    color: #9ca3b4;
    font-weight: 500;
}

.detail-value {
    font-size: 14px;
    color: #1a1d26;
}

/* ========== Responsive ========== */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    
    .detail-grid { grid-template-columns: 1fr; }
    .detail-item.full-width { grid-column: span 1; }
}

@media (max-width: 900px) {
    .sidebar { width: 72px; padding: 20px 12px; }
    .sidebar-logo { justify-content: center; }
    .sidebar-logo h1,
    .menu-label,
    .menu-item span,
    .user-info,
    .btn-logout span { display: none; }
    .menu-item { justify-content: center; padding: 14px; }
    .user-card { justify-content: center; padding: 10px; }
    .main-content { margin-left: 72px; padding: 24px 20px; }
    .action-grid { grid-template-columns: 1fr; }
    
    .filter-section { flex-direction: column; align-items: stretch; }
    .filter-left, .filter-right { justify-content: center; }
    .search-box input { width: 100%; }
}

@media (max-width: 768px) {
    .stats-row { grid-template-columns: 1fr; }
    .action-buttons { flex-direction: column; }
    .button-area { flex-direction: column; }
}