/* 관리자 페이지 스타일 */

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

.admin-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* 탭 네비게이션 */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
    overflow-x: auto;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border: none;
    background: none;
    color: #6b7280;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: #4f46e5;
    background: #f3f4f6;
}

.tab-btn.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    background: linear-gradient(to bottom, #f5f3ff, transparent);
}

.tab-btn i {
    font-size: 1rem;
}

/* 탭 콘텐츠 */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

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

.tab-header h3 {
    font-size: 1.25rem;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-header h3 i {
    color: #4f46e5;
}

/* 대기중 배지 */
.pending-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

/* 연차 승인 필터 */
.approval-filters {
    margin-bottom: 1.5rem;
}

.approval-filters .filter-group {
    display: flex;
    gap: 0.75rem;
}

.approval-filters select {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    background: white;
    cursor: pointer;
}

.approval-filters select:focus {
    outline: none;
    border-color: #4f46e5;
}

/* 연차 승인 목록 */
.approval-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 연차 승인 카드 */
.approval-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border-left: 4px solid #fbbf24;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.approval-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.approval-card.pending {
    border-left-color: #fbbf24;
}

.approval-card.approved {
    border-left-color: #10b981;
}

.approval-card.rejected {
    border-left-color: #ef4444;
}

.approval-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(to right, #f9fafb, transparent);
    border-bottom: 1px solid #f3f4f6;
}

.approval-employee-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.approval-employee-info .employee-name {
    font-weight: 600;
    font-size: 1rem;
    color: #1f2937;
}

.approval-employee-info .employee-branch {
    font-size: 0.8125rem;
    color: #6b7280;
}

.approval-status {
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.approval-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.approval-status.approved {
    background: #d1fae5;
    color: #065f46;
}

.approval-status.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.approval-card-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.approval-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: #4b5563;
}

.approval-detail i {
    width: 18px;
    color: #6366f1;
}

.approval-detail strong {
    color: #1f2937;
}

.leave-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.leave-type-badge.annual {
    background: #ede9fe;
    color: #6d28d9;
}

.leave-type-badge.welfare {
    background: #d1fae5;
    color: #059669;
}

.approval-card-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
    align-items: center;
    justify-content: center;
}

.approval-card-actions .btn {
    flex: 1;
    padding: 0.625rem 1rem;
}

.approval-card-actions .text-muted {
    color: #9ca3af;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.approval-detail .fa-user-check {
    color: #10b981;
}

.approval-card-footer {
    display: flex;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
    font-size: 0.8125rem;
    color: #6b7280;
}

/* 검색 및 필터 바 */
.search-filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #4f46e5;
}

.filter-group {
    display: flex;
    gap: 0.75rem;
}

.filter-group select {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    background: white;
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: #4f46e5;
}

/* 데이터 테이블 */
.data-table-container {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

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

.data-table thead {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    border-bottom: 2px solid #e5e7eb;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #4b5563;
    font-size: 0.9375rem;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* 역할 배지 */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.role-badge.admin {
    background: #fef2f2;
    color: #dc2626;
}

.role-badge.manager {
    background: #fefce8;
    color: #ca8a04;
}

.role-badge.supervisor {
    background: #ecfeff;
    color: #0891b2;
}

.role-badge.user {
    background: #f0fdf4;
    color: #16a34a;
}

/* 액션 버튼들 */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon.edit {
    background: #dbeafe;
    color: #2563eb;
}

.btn-icon.edit:hover {
    background: #bfdbfe;
}

.btn-icon.delete {
    background: #fee2e2;
    color: #dc2626;
}

.btn-icon.delete:hover {
    background: #fecaca;
}

/* 지점 그리드 */
.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.branch-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.branch-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.branch-card-header {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    padding: 1.25rem;
}

.branch-card-header h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.branch-card-header p {
    font-size: 0.875rem;
    opacity: 0.9;
}

.branch-card-body {
    padding: 1.25rem;
}

.branch-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: #4b5563;
    font-size: 0.9375rem;
}

.branch-info-item i {
    width: 20px;
    color: #6366f1;
}

.branch-teams {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.branch-teams h5 {
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.team-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.team-tag {
    background: #f3f4f6;
    color: #4b5563;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
}

.branch-card-footer {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.branch-card-footer .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.875rem;
}

/* 복지휴가 폼 */
.welfare-form-container {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.welfare-form .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.welfare-form .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.welfare-form .form-group label i {
    color: #6366f1;
}

.welfare-form .form-group input,
.welfare-form .form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
}

.welfare-form .form-group input:focus,
.welfare-form .form-group select:focus {
    outline: none;
    border-color: #4f46e5;
}

.welfare-form .form-actions {
    margin-top: 1rem;
}

/* 복지휴가 내역 */
.welfare-history {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.welfare-history h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.welfare-history h4 i {
    color: #6366f1;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border-left: 4px solid #10b981;
}

.history-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-item-name {
    font-weight: 600;
    color: #1f2937;
}

.history-item-details {
    font-size: 0.875rem;
    color: #6b7280;
}

.history-item-days {
    font-size: 1.25rem;
    font-weight: 700;
    color: #10b981;
}

/* 권한 카드들 */
.roles-overview {
    margin-bottom: 2rem;
}

.roles-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.role-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-left: 4px solid;
}

.role-card.admin { border-left-color: #dc3545; }
.role-card.supervisor { border-left-color: #17a2b8; }
.role-card.manager { border-left-color: #ffc107; }
.role-card.user { border-left-color: #28a745; }

.role-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.role-card-title {
    font-weight: 600;
    color: #1f2937;
}

.role-card-level {
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.role-card-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.role-card-permissions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.permission-tag {
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: #f0fdf4;
    color: #16a34a;
}

.permission-tag.disabled {
    background: #f3f4f6;
    color: #9ca3af;
}

/* 권한 변경 폼 */
.role-assignment {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.role-assignment h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.role-assignment h4 i {
    color: #6366f1;
}

.role-form .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.role-form .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.role-form .form-group label i {
    color: #6366f1;
}

.role-form .form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
}

.role-form .form-group select:focus {
    outline: none;
    border-color: #4f46e5;
}

/* 통계 개요 */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card-large {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card-large .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.employees {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #2563eb;
}

.stat-icon.leaves {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #059669;
}

.stat-icon.pending {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}

.stat-icon.approved {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
}

.stat-info h4 {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
}

/* 통계 상세 */
.stats-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.stats-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stats-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.stats-section h4 i {
    color: #6366f1;
}

.branch-stats,
.leave-type-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-bar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-bar-label {
    min-width: 100px;
    font-size: 0.9375rem;
    color: #374151;
}

.stat-bar-container {
    flex: 1;
    height: 24px;
    background: #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #6366f1);
    border-radius: 9999px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
    font-size: 0.75rem;
    color: white;
    font-weight: 600;
    min-width: 40px;
}

.stat-bar.annual {
    background: linear-gradient(90deg, #6366f1, #818cf8);
}

.stat-bar.welfare {
    background: linear-gradient(90deg, #10b981, #34d399);
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.modal-content.modal-large {
    max-width: 700px;
}

@keyframes slideIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    font-size: 1.125rem;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h3 i {
    color: #6366f1;
}

.modal-header .close {
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-header .close:hover {
    color: #4b5563;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
}

/* 폼 그리드 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: #6366f1;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4f46e5;
}

/* 버튼 스타일 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca, #4f46e5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #10b981);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

/* 알림 메시지 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    background: #4f46e5;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
    z-index: 2000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #10b981;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.notification.error {
    background: #ef4444;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.8;
}

.notification-close:hover {
    opacity: 1;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #9ca3af;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1rem;
}

/* 반응형 */
@media (max-width: 768px) {
    .admin-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .search-filter-bar {
        flex-direction: column;
    }

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

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

    .welfare-form .form-row,
    .role-form .form-row {
        grid-template-columns: 1fr;
    }

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

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

    .data-table-container {
        overflow-x: auto;
    }

    .data-table {
        min-width: 800px;
    }
}

