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

/* 관리자 네비게이션 바 */
.admin-nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-nav-content {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 뒤로가기 버튼 */
.btn-back {
    width: 40px !important;
    height: 40px !important;
    border: none !important;
    background: #f3f4f6 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #374151 !important;
    transition: all 0.2s !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
}

.btn-back:hover {
    background: #e5e7eb !important;
    color: #111 !important;
}

.btn-back:active {
    transform: scale(0.95) !important;
}

.btn-back i {
    font-size: 18px !important;
}

/* 관리자 네비게이션 메인 버튼 */
.admin-nav-bar .btn.btn-sm {
    padding: 8px 16px !important;
    font-size: 14px !important;
    background: var(--primary) !important;
    color: white !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.admin-nav-bar .btn.btn-sm:hover {
    background: var(--primary-dark) !important;
    opacity: 0.9 !important;
}

.admin-nav-bar .btn.btn-sm i {
    font-size: 14px !important;
}

.admin-nav-title {
    flex: 1;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-nav-title i {
    color: var(--primary);
}

/* 기존 스타일 유지 */
.admin-page .page-header {
    padding: 16px;
}

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
}

.admin-menu-item:active {
    transform: scale(0.98);
}

.admin-menu-item i {
    font-size: 32px;
    color: var(--primary);
    flex-shrink: 0;
}

.admin-menu-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.admin-menu-item p {
    font-size: 13px;
    color: var(--gray-600);
}

/* 관리자 탭 */
.admin-tabs {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: white;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
}

.admin-tab {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

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

.admin-tab:hover:not(.active) {
    background: #f5f5f5;
}

/* 삭제된 항목 리스트 */
.deleted-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.deleted-item-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 16px;
    border-left: 4px solid #dc2626;
}

.deleted-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.deleted-item-header strong {
    font-size: 16px;
    color: #333;
    display: block;
    margin-bottom: 4px;
}

.deleted-item-header small {
    display: inline-block;
    padding: 2px 8px;
    background: #fee;
    color: #dc2626;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.deleted-item-meta {
    font-size: 12px;
    color: #999;
}

.deleted-item-body {
    margin-bottom: 12px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
}

.deleted-item-body p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.deleted-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* 데이터 관리 그리드 */
.data-management-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
}

@media (min-width: 768px) {
    .data-management-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .data-management-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.data-management-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.data-management-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.data-management-card:active {
    transform: translateY(0);
}

.data-management-card i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 16px;
}

.data-management-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.data-management-card p {
    font-size: 14px;
    color: #666;
    margin: 0 0 4px 0;
}

.data-management-card small {
    font-size: 12px;
    color: #999;
}

/* 관리자 툴바 */
.admin-toolbar {
    padding: 16px;
    background: white;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* 관리자 정보 박스 */
.admin-info-box {
    padding: 16px;
    margin: 16px;
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    align-items: start;
}

.admin-info-box i {
    font-size: 20px;
    color: #3b82f6;
    flex-shrink: 0;
    margin-top: 2px;
}

.admin-info-box strong {
    display: block;
    font-size: 14px;
    color: #1e40af;
    margin-bottom: 4px;
}

.admin-info-box p {
    font-size: 13px;
    color: #1e40af;
    margin: 0;
}

/* 데이터 항목 리스트 */
.data-items-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.data-item-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: move;
    transition: all 0.2s;
}

.data-item-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.drag-handle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    cursor: grab;
    flex-shrink: 0;
}

.drag-handle:active {
    cursor: grabbing;
}

.data-item-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.data-item-content {
    flex: 1;
    min-width: 0;
}

.data-item-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.data-item-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.data-item-meta .badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.data-item-meta span {
    font-size: 12px;
    color: #666;
}

.data-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* 반응형 */
@media (max-width: 768px) {
    .admin-nav-title {
        font-size: 1rem;
    }
    
    .data-item-card {
        flex-wrap: wrap;
    }
    
    .data-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* 담당자 카드 계정 정보 */
.owner-account-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #666;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.owner-account-info div {
    display: flex;
    align-items: center;
    gap: 4px;
}

.owner-account-info i {
    color: #999;
    font-size: 11px;
}

.owner-account-info strong {
    font-weight: 600;
    color: #333;
}

/* 모달 오버레이 */
.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;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.owner-modal {
    max-width: 700px;
}

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

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header h3 i {
    color: var(--primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #eee;
    color: #333;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* 담당자 상세 정보 */
.owner-detail-section {
    text-align: center;
    padding: 24px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 24px;
}

.owner-detail-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.owner-detail-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    margin: 0 0 12px 0;
}

.owner-detail-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.info-row label {
    font-weight: 600;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-row label i {
    color: var(--primary);
}

.info-row span {
    font-weight: 500;
    color: #333;
}

/* 폼 섹션 */
.form-section {
    margin-bottom: 24px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.form-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section h4 i {
    color: var(--primary);
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.form-group .required {
    color: #ef4444;
}

.form-group small {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

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

.form-control:read-only {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.password-input-group {
    display: flex;
    gap: 8px;
}

.password-input-group .form-control {
    flex: 1;
}

.password-input-group .btn-icon {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .owner-account-info {
        grid-template-columns: 1fr;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* 관리자 섹션 */
.admin-section {
    margin-bottom: 32px;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px 16px 16px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 16px;
}

.admin-section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #111;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-section-header h2 i {
    color: var(--primary);
}

.admin-section-header .admin-toolbar {
    padding: 0;
    border: none;
    background: transparent;
}

@media (max-width: 768px) {
    .admin-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .admin-section-header .admin-toolbar {
        width: 100%;
    }
}

/* 캘린더 설정 스타일 */
.admin-subsection {
    margin-top: 24px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
}

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

.admin-subsection-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-subsection-header h3 i {
    color: var(--primary);
    font-size: 14px;
}

.data-items-list-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.data-item-card-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.data-item-card-compact:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}

.compact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    flex-shrink: 0;
}

.compact-icon span {
    font-size: 18px;
}

.compact-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.compact-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.compact-id {
    font-size: 11px;
    color: var(--gray-500);
    font-family: 'Courier New', monospace;
}

.compact-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn-icon-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--gray-600);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.btn-icon-sm:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.btn-icon-sm.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* ================================ */
/* 2열 그리드 레이아웃 */
/* ================================ */

.admin-two-col-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 0 24px;
}

.admin-col-section {
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.admin-col-section .admin-section-header {
    padding: 0 0 12px 0;
    margin-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.admin-col-section .admin-section-header h2,
.admin-col-section .admin-section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-col-section .admin-section-header h2 i,
.admin-col-section .admin-section-header h3 i {
    color: var(--primary);
}

.admin-col-section .admin-info-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(79, 70, 229, 0.05);
    border-left: 3px solid var(--primary);
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #555;
}

.admin-col-section .admin-info-box i {
    color: var(--primary);
    flex-shrink: 0;
}

/* 모바일 반응형 */
@media (max-width: 1024px) {
    .admin-two-col-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .admin-two-col-grid {
        padding: 0 16px;
    }
    
    .admin-col-section {
        min-height: auto;
    }
}

