/**
 * PMS 메인 스타일시트
 * 프로젝트 전체에서 사용하는 공통 스타일
 */

/* ========== 기본 설정 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 색상 변수 */
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #7c93ff;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;

    /* 중립 색상 */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* 배경 색상 */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f7fa;
    --bg-tertiary: #f8f9fa;

    /* 텍스트 색상 */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;

    /* 그림자 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* 간격 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* 반경 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* 트랜지션 */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

a, a:link, a:visited, a:hover, a:active,
[role="button"], [onclick], .clickable {
    cursor: pointer !important;
}

/* ========== 레이아웃 ========== */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-secondary);
}

/* ========== 사이드바 ========== */
.sidebar {
    width: 250px;
    background: #ffffff;
    color: #374151;
    position: fixed;
    left: 16px;
    top: 2rem;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
    transition: width 0.3s ease;
    overflow: hidden;
}

.sidebar-header {
    padding: 2rem 1rem 1rem;
    border-bottom: none;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-toggle {
    position: absolute;
    top: 1rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: block;
    color: #1f2937;
    transition: opacity 0.2s ease, visibility 0.2s ease, max-height 0.2s ease;
    max-height: 100px;
    overflow: hidden;
}

.sidebar-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 0 0 1rem 0;
    margin: 0 0.75rem 0.5rem;
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-weight: 600;
    font-size: 20px;
    color: #1f2937;
}

.profile-role {
    font-size: 0.75rem;
    color: #6b7280;
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 0;
}

/* jQuery Scrollbar 적용 시 sidebar-nav 스타일 */
.sidebar-nav.scroll-wrapper {
    overflow: hidden !important;
}

.sidebar-nav.scroll-wrapper > .scroll-content {
    padding: 0.5rem 1rem !important;
    box-sizing: border-box;
}

/* table-scroll-wrapper 내 scroll-content 인라인 마진 제거 */
.table-scroll-wrapper.scroll-wrapper > .scroll-content {
    margin: 0 !important;
}

/* 사이드바 내 macOS 스타일 스크롤바 커스터마이징 */
.sidebar-nav.scrollbar-macosx > .scroll-element {
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-nav.scrollbar-macosx:hover > .scroll-element.scroll-y {
    opacity: 1;
}

/* 가로 스크롤바 완전히 숨김 */
.sidebar-nav.scrollbar-macosx > .scroll-element.scroll-x {
    display: none !important;
}

.sidebar-nav.scrollbar-macosx > .scroll-element .scroll-bar {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.sidebar-nav.scrollbar-macosx > .scroll-element .scroll-bar:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.sidebar-section-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 0 0.5rem 0;
    margin-top: 2rem;
}

.sidebar-section-label:first-child {
    margin-top: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-left: 0;
    color: #4b5563;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.9375rem;
}

.sidebar-link:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
}

.sidebar-link.active {
    background: #3b82f6;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.sidebar-icon {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    color: inherit;
}

.sidebar-icon svg {
    width: 22px;
    height: 22px;
}

.sidebar-link.active .sidebar-icon {
    color: white;
}

.sidebar-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    max-width: 200px;
    opacity: 1;
    transition: max-width 0.3s ease, opacity 0.2s ease 0.15s;
}

.sidebar-group {
    margin-bottom: 0.5rem;
}

.sidebar-parent {
    font-weight: 500;
    background: transparent;
    border-left: 3px solid transparent;
    position: relative;
    cursor: pointer;
    pointer-events: auto;
}

.sidebar-parent.active {
    background: rgba(255, 255, 255, 0.2);
    border-left-color: transparent;
    font-weight: 600;
}

.sidebar-submenu {
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-group.expanded .sidebar-submenu {
    display: block;
    max-height: 500px;
}

.sidebar-sublink {
    padding-left: 70px;
    font-size: 0.875rem;
    margin-top: 0;
    margin-bottom: 0;
    background: transparent;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-sublink::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 50%;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translateY(-50%);
}

.sidebar-sublink:hover {
    background: transparent;
}

.sidebar-sublink.active {
    background: transparent;
    border-left-color: transparent;
}

.sidebar-sublink.active .sidebar-text {
    color: white;
    font-weight: 600;
}

.sidebar-sublink.active::before {
    background: white;
}

.sidebar-sublink .sidebar-icon {
    font-size: 1rem;
    opacity: 0.9;
}

.sidebar-sublink .sidebar-text {
    opacity: 0.95;
}

.sidebar-footer {
    padding: 1rem 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
    flex-shrink: 0;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 1.5rem));
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-user-avatar.with-photo {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-user-info {
    flex: 1;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
}

.sidebar-user-role {
    font-size: 0.75rem;
    opacity: 0.8;
}

.sidebar-link.logout {
    color: #6b7280;
}

.sidebar-link.logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* ========== 메인 컨텐츠 ========== */
.main-content {
    margin-left: 282px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

.content-wrapper {
    padding: 2rem 2rem 0.9rem 0.9rem;
    flex: 1;
}

/* 기존 헤더 스타일 제거됨 - 사이드바 레이아웃으로 변경 */

/* ========== 페이지 헤더 ========== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* 페이지 헤더 좌측 (타이틀 + 서브메뉴) */
.page-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* 페이지 서브메뉴 (탭 스타일) */
.page-submenu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: #dfe3e9;
    padding: 6px;
    border-radius: 10px;
}

.submenu-link {
    padding: 0.5rem 1.5rem;
    font-size: 0.925rem;
    font-weight: 500;
    color: #1f2937;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.submenu-link:hover {
    color: #1f2937;
    background: #e5e7eb;
}

.submenu-link.active {
    color: #1f2937;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* ========== Breadcrumb ========== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-base);
}

.breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--gray-400);
}

/* ========== 카드 ========== */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    transition: box-shadow var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    color: var(--text-secondary);
}

.card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
}

/* ========== 버튼 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

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

/* 버튼 내부 요소 클릭 이벤트를 부모로 전달 */
.btn svg,
.btn span,
.btn-outline svg,
.btn-outline span {
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--gray-500);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-600);
}

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

.btn-success:hover:not(:disabled) {
    background: #059669;
}

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

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

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

.btn-warning:hover:not(:disabled) {
    background: #d97706;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base);
    text-align: center;
    white-space: nowrap;
}

.btn-outline:hover:not(:disabled) {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.btn-outline.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-danger:hover:not(:disabled) {
    color: #fff;
    background: #dc3545;
    border-color: #dc3545;
}

.btn-outline-info {
    color: #17a2b8;
    border-color: #17a2b8;
}

.btn-outline-info:hover:not(:disabled) {
    color: #fff;
    background: #17a2b8;
    border-color: #17a2b8;
}

.btn-outline-secondary {
    color: var(--gray-600);
    border-color: var(--gray-400);
}

.btn-outline-secondary:hover:not(:disabled) {
    color: #fff;
    background: var(--gray-400);
    border-color: var(--gray-400);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: var(--radius-full);
}

/* ========== 폼 요소 ========== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: #bbb;
    opacity: 1;
}

.form-control::-webkit-input-placeholder {
    color: #bbb;
}

.form-control::-moz-placeholder {
    color: #bbb;
    opacity: 1;
}

.form-control:-ms-input-placeholder {
    color: #bbb;
}

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

/* 날짜 입력 필드 스타일 */
input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 1;
}

.form-control:disabled {
    background: var(--gray-100);
    cursor: not-allowed;
}

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

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.form-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--danger-color);
}

/* ========== 테이블 ========== */
.table-container {
    overflow-x: auto;
    margin: -1.75rem;
    padding: 1.75rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--gray-50);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 2px solid var(--gray-200);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--text-secondary);
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: background-color var(--transition-base);
}

tbody tr:hover {
    background: var(--gray-50);
}

tbody tr.clickable {
    cursor: pointer;
}

/* ========== 배지 ========== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    box-sizing: border-box;
}

.badge-review {
    background: #7c3aed;
    color: #ffffff;
}

.badge-planning {
    background: #1e40af;
    color: #ffffff;
}

.badge-active {
    background: #ff6000;
    color: #ffffff;
}

.badge-on_hold {
    background: #fed7aa;
    color: #92400e;
}

.badge-completed {
    background: #9b9b9b;
    color: #ffffff;
}

.badge-cancelled {
    background: #fecaca;
    color: #991b1b;
}

/* ========== Alert ========== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ========== 통계 카드 ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.75rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-change {
    font-size: 0.875rem;
    margin-top: 0.75rem;
    opacity: 0.9;
}

/* ========== 정보 그리드 ========== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

.info-item {
    padding: 1.25rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    transition: background-color var(--transition-base);
}

.info-item:hover {
    background: var(--gray-100);
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* ========== 빈 상태 ========== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-tertiary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: var(--text-tertiary);
}

/* ========== 페이지네이션 ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all var(--transition-base);
}

.pagination a:hover {
    background: var(--gray-50);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination .active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ========== 필터 ========== */
.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filters .form-control {
    flex: 1;
    min-width: 200px;
}

/* ========== 요약 카드 ========== */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition-fast);
}

.summary-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.summary-card.active {
    box-shadow: var(--shadow-md);
    background: var(--gray-50);
}

.summary-card.success { border-left-color: var(--success-color); }
.summary-card.warning { border-left-color: var(--warning-color); }
.summary-card.danger { border-left-color: var(--danger-color); }

.summary-card-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-weight: 600;
}

.summary-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.25rem;
}

/* ========== 유틸리티 클래스 ========== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.d-flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-1 { gap: var(--spacing-xs); }
.gap-2 { gap: var(--spacing-sm); }
.gap-3 { gap: var(--spacing-md); }
.gap-4 { gap: var(--spacing-lg); }

/* ========== 반응형 ========== */
@media (max-width: 768px) {
    .header {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        flex-direction: column;
    }

    .filters .form-control {
        width: 100%;
    }

    .card {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        flex: 1;
    }
}

/* ========== 사이드바 축소 상태 ========== */
.sidebar.collapsed {
    width: 80px !important;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
}

.sidebar.collapsed *::-webkit-scrollbar {
    display: none;
    width: 0;
}

.sidebar.collapsed * {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar.collapsed .sidebar-header {
    padding: 1.5rem 0.5rem 1rem !important;
    overflow: visible !important;
    min-height: auto !important;
    height: 52px !important;
    box-sizing: border-box !important;
}

.sidebar.collapsed .sidebar-logo {
    display: none !important;
}

.sidebar.collapsed .sidebar-toggle {
    position: static;
    margin: 0 auto;
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-profile {
    padding: 0.5rem 0 !important;
    margin: 0 0.5rem 0.5rem !important;
    height: 64px !important;
    box-sizing: border-box !important;
}

.sidebar.collapsed .profile-avatar {
    width: 48px !important;
    height: 48px !important;
}

.sidebar.collapsed .profile-name,
.sidebar.collapsed .profile-role {
    display: none;
}

.sidebar.collapsed .sidebar-nav {
    padding: 0.5rem !important;
    overflow: visible !important;
    overflow-y: visible !important;
    overflow-x: visible !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
}

/* 축소 상태에서 scroll-content 스타일 (jQuery Scrollbar 초기화 시) */
.sidebar.collapsed .sidebar-nav.scroll-wrapper > .scroll-content {
    padding: 0.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
}

.sidebar.collapsed .sidebar-nav > * {
    width: 48px;
}

/* 접힌 상태에서 jQuery Scrollbar 요소 숨김 */
.sidebar.collapsed .sidebar-nav > .scroll-element {
    display: none !important;
}

.sidebar.collapsed .sidebar-section-label {
    display: none !important;
}

/* 접힌 상태에서 일반 텍스트 숨김 (툴팁용 텍스트는 .sidebar-link .sidebar-text에서 별도 처리) */
.sidebar.collapsed .sidebar-text {
    max-width: 0;
    opacity: 0;
    transition: none !important;
}

.sidebar.collapsed .sidebar-link {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 0 0.25rem 0 !important;
    position: relative !important;
    border-radius: 12px !important;
    transition: none !important;
    gap: 0 !important;
    width: 48px !important;
    height: 48px !important;
}

.sidebar.collapsed .sidebar-link .sidebar-text {
    position: absolute;
    left: 83%;
    top: 0;
    bottom: 0;
    margin-left: 0;
    padding: 0 1rem;
    background: #3b82f6;
    color: white;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 0 12px 12px 0;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    z-index: 1001;
    display: flex;
    align-items: center;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
    transition: none !important;
    max-width: none;
}

.sidebar.collapsed .sidebar-link .sidebar-icon {
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    flex-shrink: 0 !important;
    width: 22px !important;
    height: 22px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sidebar.collapsed .sidebar-link .sidebar-icon svg {
    width: 22px !important;
    height: 22px !important;
}

.sidebar.collapsed .sidebar-link:hover {
    background: #3b82f6;
    color: white;
    border-radius: 12px 0 0 12px;
}

.sidebar.collapsed .sidebar-link:hover .sidebar-text {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    max-width: none !important;
    transition: none !important;
}

.sidebar.collapsed .sidebar-link:active .sidebar-text {
    opacity: 0;
    visibility: hidden;
}

.sidebar.collapsed .sidebar-link.active:hover {
    background: #3b82f6;
}

.sidebar.collapsed .sidebar-footer {
    padding: 0.75rem 0.5rem 1rem;
    overflow: visible !important;
    flex-shrink: 0;
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 메인 컨텐츠 조정 */
.sidebar.collapsed + .main-content,
body.sidebar-collapsed .main-content {
    margin-left: 112px;
}

/* ========== 사이드바 접힘 상태 (html 클래스 기반) ========== */
html.sidebar-collapsed .sidebar {
    width: 80px !important;
}

html.sidebar-collapsed .main-content {
    margin-left: 112px !important;
}

html.sidebar-collapsed .sidebar-header {
    padding: 1.5rem 0.5rem 1rem !important;
    overflow: visible !important;
    min-height: auto !important;
    height: 52px !important;
    box-sizing: border-box !important;
}

html.sidebar-collapsed .sidebar-logo {
    display: none !important;
}

html.sidebar-collapsed .sidebar-toggle {
    position: static !important;
    margin: 0 auto !important;
}

html.sidebar-collapsed .sidebar-toggle svg {
    transform: rotate(180deg) !important;
}

html.sidebar-collapsed .sidebar-section-label {
    display: none !important;
}

html.sidebar-collapsed .sidebar-nav {
    padding: 0.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
}

html.sidebar-collapsed .sidebar-nav.scroll-wrapper > .scroll-content {
    padding: 0.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
}

html.sidebar-collapsed .sidebar-nav > * {
    width: 48px !important;
}

html.sidebar-collapsed .sidebar-link {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 0 0.25rem 0 !important;
    position: relative !important;
    border-radius: 12px !important;
    width: 48px !important;
    height: 48px !important;
    box-sizing: border-box !important;
    gap: 0 !important;
}

html.sidebar-collapsed .sidebar-icon {
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    flex-shrink: 0 !important;
    width: 22px !important;
    height: 22px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

html.sidebar-collapsed .sidebar-icon svg {
    width: 22px !important;
    height: 22px !important;
}

html.sidebar-collapsed .sidebar-footer {
    padding: 0.75rem 0.5rem 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

html.sidebar-collapsed .sidebar-text {
    max-width: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
}

html.sidebar-collapsed .sidebar-link:hover .sidebar-text {
    max-width: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    overflow: visible !important;
}

/* 프로필 영역 - 깜빡임 방지 (페이지 로드 시 즉시 적용) */
html.sidebar-collapsed .sidebar-profile {
    padding: 0.5rem 0 !important;
    margin: 0 0.5rem 0.5rem !important;
    height: 64px !important;
    box-sizing: border-box !important;
}

html.sidebar-collapsed .profile-avatar {
    width: 48px !important;
    height: 48px !important;
}

html.sidebar-collapsed .profile-name,
html.sidebar-collapsed .profile-role {
    display: none !important;
}

html.sidebar-collapsed .sidebar-user {
    justify-content: center !important;
}

html.sidebar-collapsed .sidebar-user-info {
    display: none !important;
}

html.sidebar-collapsed .sidebar-user-avatar {
    width: 48px !important;
    height: 48px !important;
}

/* ========== 전역 토스트 알림 ========== */
.global-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 28px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    max-width: 500px;
    min-width: 320px;
}

.global-toast--visible {
    transform: translateX(0);
    opacity: 1;
}

.global-toast--hiding {
    transform: translateX(120%);
    opacity: 0;
}

.global-toast__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.global-toast__icon svg {
    width: 24px;
    height: 24px;
}

.global-toast__message {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: pre-line;
}

.global-toast__close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
}

.global-toast__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.global-toast__close svg {
    width: 18px;
    height: 18px;
}

/* 토스트 타입별 스타일 - 배경색 적용 */
.global-toast--success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.global-toast--success .global-toast__icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.global-toast--success .global-toast__close {
    color: #ffffff;
}

.global-toast--error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.global-toast--error .global-toast__icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.global-toast--error .global-toast__close {
    color: #ffffff;
}

.global-toast--warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
}

.global-toast--warning .global-toast__icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.global-toast--warning .global-toast__close {
    color: #ffffff;
}

.global-toast--info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
}

.global-toast--info .global-toast__icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.global-toast--info .global-toast__close {
    color: #ffffff;
}

/* ========== 공통 탭 버튼 스타일 ========== */
.filter-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 0 1.5rem 0;
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

.filter-tabs.no-border {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 1.5rem;
}

.filter-tabs.with-padding {
    padding: 0 0 1.5rem 0;
}

.filter-tabs .tab-group {
    display: flex;
    align-items: center;
    gap: 0;
}

.filter-tabs .tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: white;
    border: 1px solid var(--gray-300);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
    margin-left: -1px;
}

.filter-tabs .tab-btn:first-child {
    border-radius: 6px 0 0 6px;
    margin-left: 0;
}

.filter-tabs .tab-btn:last-child {
    border-radius: 0 6px 6px 0;
}

.filter-tabs .tab-btn:hover {
    background: var(--gray-50);
    z-index: 1;
}

.filter-tabs .tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    z-index: 2;
}

.filter-tabs .tab-divider {
    width: 1px;
    height: 24px;
    background: var(--gray-300);
    margin: 0 0.75rem;
}

/* ========== 공통 인라인 필터 스타일 ========== */
.filter-inline-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.filter-inline-select {
    padding: 0.712rem 2rem 0.712rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 0.75rem center;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.filter-inline-select:hover {
    background-color: var(--gray-50);
}

.filter-inline-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-inline-input {
    padding: 0.692rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    transition: all 0.15s ease;
    min-width: 180px;
}

.filter-inline-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-inline-input::placeholder {
    color: #9ca3af;
}

.filter-inline-btn {
    padding: 0.554rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-inline-btn-primary {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.filter-inline-btn-primary:hover {
    background: #5a6fd6;
    border-color: #5a6fd6;
}

.filter-inline-btn-secondary {
    padding: 0.49rem 1rem;
    background: var(--gray-700);
    color: white;
    border: 1px solid var(--gray-700);
}

.filter-inline-btn-secondary:hover {
    background: var(--gray-800);
    border-color: var(--gray-800);
}

/* 체크박스 라벨 스타일 */
.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    margin-left: 8px;
    white-space: nowrap;
}

.filter-checkbox-label input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

/* ========== 필터 버튼 그룹 (Pill 스타일) ========== */
.filter-btn-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--gray-100);
    padding: 4px;
    border-radius: var(--radius-lg);
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
}

.filter-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* ========== 대시보드 스크롤바 커스텀 스타일 ========== */
.employee-status-list.scroll-wrapper > .scroll-element.scroll-y,
.activity-timeline.scroll-wrapper > .scroll-element.scroll-y {
    right: 2px;
}

.employee-status-list.scroll-wrapper > .scroll-element.scroll-y .scroll-bar,
.activity-timeline.scroll-wrapper > .scroll-element.scroll-y .scroll-bar {
    width: 8px;
    left: 0;
    background-color: rgba(0, 0, 0, 0.15);
}

.employee-status-list.scroll-wrapper:hover > .scroll-element.scroll-y .scroll-bar,
.activity-timeline.scroll-wrapper:hover > .scroll-element.scroll-y .scroll-bar {
    background-color: rgba(0, 0, 0, 0.25);
}

/* ========== 프로필 모달 ========== */
/* 프로필 이미지 클릭 가능 스타일 */
.profile-avatar.clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-avatar.clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* 프로필 모달 오버레이 */
.profile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.profile-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: profileModalIn 0.2s ease-out;
}

@keyframes profileModalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.profile-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.profile-modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--gray-500);
    border-radius: 8px;
    transition: all 0.2s;
}

.profile-modal-close:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.profile-modal-body {
    padding: 1.5rem;
}

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

.profile-section:last-child {
    margin-bottom: 0;
}

.profile-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-100);
}

/* 프로필 사진 업로드 */
.profile-photo-container {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.profile-photo-preview {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.profile-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 100%;
    background: var(--gray-100);
}

.profile-photo-delete {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    border: 2px solid white;
    font-size: 1.125rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.profile-photo-delete:hover {
    background: #c82333;
    transform: scale(1.1);
}

.profile-photo-dropzone {
    flex: 1;
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
    background: var(--gray-50);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.profile-photo-dropzone:hover,
.profile-photo-dropzone.dragover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.profile-photo-dropzone .dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.profile-photo-dropzone .dropzone-icon {
    color: var(--gray-400);
}

.profile-photo-dropzone .dropzone-text {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.4;
}

.profile-photo-dropzone .dropzone-text small {
    color: var(--gray-400);
}

/* 프로필 폼 */
.profile-form-group {
    margin-bottom: 1rem;
}

.profile-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.profile-form-group .form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.profile-form-group .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-block {
    width: 100%;
    margin-top: 0.5rem;
}

/* ========== 상태 변경 히스토리 ========== */
.status-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-history-item {
    display: flex;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-color);
}

.status-history-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    flex-shrink: 0;
}

.status-history-date .history-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-history-date .history-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.status-history-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.status-history-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-history-change svg {
    color: var(--text-tertiary);
}

.status-history-change .status-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
}

.status-history-change .status-badge--prev {
    background: var(--gray-400);
}

.status-history-reason {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
}

.status-history-reason svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: var(--text-tertiary);
}

.status-history-by {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ========== 공통 아바타 스타일 ========== */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar--sm {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
}

.user-avatar--lg {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

.user-avatar--xl {
    width: 64px;
    height: 64px;
    font-size: 1.25rem;
}

/* ========== 포탈 모바일 뷰포트 수정 ========== */
@media (max-width: 768px) {
    /* 포탈 페이지에서 content-wrapper min-width 무효화 */
    .portal-layout .content-wrapper,
    body.is-mobile .content-wrapper {
        min-width: 0 !important;
        width: 100% !important;
    }

    /* 포탈 레이아웃 모바일 대응 */
    .portal-layout {
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
    }

    .portal-layout * {
        max-width: 100vw;
    }

    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
}

/* ========== Breadcrumb URL 복사 버튼 ========== */
.btn-copy-url {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 24px;
    height: 24px;
    margin-left: 8px;
    padding: 0 6px;
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
    vertical-align: middle;
    font-size: 12px;
    font-weight: 500;
}

.btn-copy-url:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--gray-700);
}

.btn-copy-url:active {
    transform: scale(0.95);
}

.btn-copy-url.copied {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.btn-copy-url .copy-text {
    margin-left: 2px;
}
