:root {
    --primary-color: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --secondary-bg: #f3f4f6;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --text-main: #111827;
    --text-muted: #6b7280;
}

body {
    background-color: var(--secondary-bg);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    padding: 1rem 0;
    z-index: 1020;
}

.navbar-brand {
    color: var(--primary-color) !important;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn-group .btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-btn-group .btn-light {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.nav-btn-group .btn-light:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.nav-btn-group .btn-primary-gradient {
    background: var(--primary-gradient);
    color: white;
    border: none;
}

.nav-btn-group .btn-primary-gradient:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Fix click issues on icons */
.btn i {
    pointer-events: none;
}

/* Stats Cards */
.stat-card {
    border: none;
    border-radius: 1rem;
    background: white;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.stat-card .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-card .card-title {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-card h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-icon {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 4rem;
    opacity: 0.05;
    transform: rotate(15deg);
}

/* Main Table Card */
.main-card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    background: white;
    overflow: hidden;
}

.main-card .card-header {
    background: white;
    border-bottom: 1px solid #f3f4f6;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-card .card-header h5 {
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Table Styling */
.table {
    margin-bottom: 0;
}

.table th {
    background-color: #f9fafb;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem;
}

.table td {
    padding: 0.35rem;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    font-size: 0.8rem;
}

.table-hover tbody tr:hover {
    background-color: #f9fafb;
    cursor: pointer;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
    border-radius: 9999px;
}

.status-badge {
    font-size: 0.75rem;
}

.status-pending {
    background-color: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
}

.status-in-progress {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
}

.status-completed {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #dcfce7;
}

.location-badge {
    background-color: #eff6ff;
    color: #4f46e5;
    border: 1px solid #e0e7ff;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    display: inline-block;
}

/* Utilities */
.symptoms-preview {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #6b7280;
}

.action-btn {
    padding: 0.4rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    color: #9ca3af;
    background-color: transparent;
    border: none;
}

.action-btn:hover {
    background-color: #eff6ff;
    color: var(--primary-color);
}

/* Action Buttons in Cell */
.action-buttons {
    text-align: right;
    white-space: nowrap;
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
    border-bottom: 1px solid #f3f4f6;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

/* 텍스트 포맷 유지 유틸리티 */
.text-pre-wrap {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
}


.modal-footer {
    border-top: 1px solid #f3f4f6;
    padding: 1.5rem;
}

/* Pagination */
.pagination {
    gap: 0.25rem;
}

.page-item .page-link {
    border: none;
    border-radius: 0.375rem;
    color: #4b5563;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    color: white;
}

.page-item .page-link:hover:not(.active) {
    background-color: #f3f4f6;
    color: #111827;
}

.page-item.disabled .page-link {
    background-color: transparent;
    color: #d1d5db;
}

/* Form Styles */
.form-label {
    margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Toast */
.toast {
    font-size: 0.95rem;
    font-weight: 500;
}