/* 한국형 ERP 스타일 - 오밀조밀하고 고급스러운 디자인 */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --bg-color: #ecf0f1;
    --sidebar-bg: #2c3e50;
    --header-bg: #ffffff;
    --border-color: #dcdcdc;
    --table-header-bg: #f5f6fa;
    --hover-color: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Malgun Gothic', '맑은 고딕', 'Apple SD Gothic Neo', sans-serif;
    font-size: 12px;
    color: #333;
    background-color: var(--bg-color);
    line-height: 1.4;
}

/* 로그인 페이지 */
.login-container {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-left {
    flex: 1;
    padding: 60px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-logo {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 40px;
}

.login-banner {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.login-banner h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

.login-banner ul {
    list-style: none;
    padding-left: 0;
}

.login-banner ul li {
    padding: 8px 0;
    font-size: 14px;
}

.login-banner ul li:before {
    content: "✓ ";
    margin-right: 8px;
}

.login-notice {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
}

.login-notice h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.notice-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
}

.notice-item:last-child {
    border-bottom: none;
}

.login-right {
    width: 450px;
    background: white;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.login-form-wrapper h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.login-form-wrapper p {
    color: #777;
    margin-bottom: 30px;
    font-size: 13px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
    font-size: 13px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 12px;
}

.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
    line-height: 1.4;
}

.btn .icon {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
}

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

.btn-primary:hover {
    background: #2980b9;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

/* 메인 레이아웃 */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* 사이드바 */
.sidebar {
    width: 220px;
    background: var(--sidebar-bg);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: width 0.3s ease;
}

/* 사이드바 스크롤바 스타일 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 최소화된 사이드바 */
.sidebar.minimized {
    width: 60px;
}

.sidebar.minimized .logo-text,
.sidebar.minimized .menu-text,
.sidebar.minimized .submenu,
.sidebar.minimized .sub-submenu {
    display: none;
}

.sidebar.minimized .menu-item {
    justify-content: center;
    padding: 12px;
}

.sidebar.minimized .menu-item i {
    margin-right: 0;
}

.sidebar.minimized .sidebar-toggle-btn .toggle-icon {
    transform: rotate(180deg);
}

.sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.sidebar.minimized .sidebar-header {
    padding: 20px 10px;
    justify-content: center;
}

.sidebar-logo {
    font-size: 18px;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 20px;
}

.logo-text {
    transition: opacity 0.3s ease;
}

/* 사이드바 토글 버튼 */
.sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
    position: absolute;
    right: 10px;
}

.sidebar.minimized .sidebar-toggle-btn {
    position: static;
    margin-top: 10px;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.toggle-icon {
    transition: transform 0.3s ease;
    display: block;
}

.sidebar-menu {
    padding: 10px 0;
}

.menu-item {
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.menu-item:hover, .menu-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--accent-color);
}

.menu-item i {
    margin-right: 10px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    font-size: 16px;
}

.menu-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.submenu {
    display: none;
    background: rgba(0, 0, 0, 0.2);
}

.submenu.active {
    display: block;
}

.submenu-item {
    padding: 10px 20px 10px 45px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: block;
    font-size: 11px;
    transition: all 0.3s;
    position: relative;
}

.submenu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* 2단계 서브메뉴 */
.submenu-item.has-children {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.submenu-arrow {
    font-size: 10px;
    transition: transform 0.3s;
    margin-right: 10px;
}

.submenu-item.has-children.open .submenu-arrow {
    transform: rotate(90deg);
}

.sub-submenu {
    display: none;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.sub-submenu.active {
    display: block;
}

.sub-submenu-item {
    display: block;
    padding: 8px 20px 8px 65px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 11px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sub-submenu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-color);
    padding-left: 70px;
}

.sub-submenu-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
}

/* 메인 컨텐츠 */
.main-content {
    flex: 1;
    margin-left: 0;
    background: var(--bg-color);
    transition: margin-left 0.3s ease;
}

/* 사이드바 완전 숨김 (no-sidebar 모드) */
.sidebar {
    display: none !important;
}

.mobile-menu-btn {
    display: none !important;
}

.mobile-overlay {
    display: none !important;
}

/* 헤더 */
.header {
    background: var(--header-bg);
    padding: 8px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    height: 50px;
}

.header-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.header-left h1 {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-item {
    position: relative;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    color: #555;
    position: relative;
}

.header-btn:hover {
    background: var(--bg-color);
}

.header-btn .icon {
    font-size: 16px;
    display: flex;
    align-items: center;
}

.header-btn .icon-arrow {
    font-size: 9px;
    opacity: 0.6;
}

/* 알림 배지 */
.badge-notify {
    position: absolute;
    top: 2px;
    right: 6px;
    background: #e74c3c;
    color: white;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 8px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* 사용자 버튼 */
.user-btn {
    padding: 4px 8px;
    gap: 8px;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}

.user-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.user-role {
    font-size: 10px;
    color: #999;
}

/* 실시간 날짜/시간 스타일 */
.datetime-wrapper {
    margin-right: 15px;
}

.datetime-display {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
    height: 38px;
    box-sizing: border-box;
}

.datetime-date {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.datetime-time {
    font-size: 15px;
    font-weight: 700;
    color: #FFD700;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 퀵메뉴 버튼 스타일 */
.quick-menu-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 6px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
    transition: all 0.3s;
}

.quick-menu-btn:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
}

.quick-menu-btn:active {
    transform: translateY(0);
}

.quick-menu-icon {
    font-size: 16px;
    line-height: 1;
}

.quick-menu-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

/* 드롭다운 공통 스타일 */
.notification-dropdown,
.user-dropdown,
.favorite-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-height: 400px;
    overflow: hidden;
    display: none;
    z-index: 1000;
}

.notification-dropdown.active,
.user-dropdown.active,
.favorite-dropdown.active {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

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

/* 즐겨찾기 드롭다운 */
.favorite-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 13px;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFECB3 100%);
}

.favorite-add-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 18px;
}

.favorite-add-btn:hover {
    background: rgba(255, 215, 0, 0.2);
}

.favorite-add-btn.active {
    background: rgba(255, 215, 0, 0.3);
}

.favorite-list {
    max-height: 350px;
    overflow-y: auto;
}

.favorite-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 15px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}

.favorite-item:hover {
    background: #f8f9fa;
}

.favorite-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
}

.favorite-item a:hover {
    color: var(--accent-color);
}

.favorite-item .icon {
    font-size: 16px;
}

.favorite-delete-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 20px;
    line-height: 1;
    color: #999;
    transition: all 0.2s;
}

.favorite-delete-btn:hover {
    background: #fee;
    color: #e74c3c;
}

/* 알림 드롭다운 */
.notification-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 13px;
}

.mark-all-read {
    font-size: 11px;
    color: var(--accent-color);
    text-decoration: none;
}

.mark-all-read:hover {
    text-decoration: underline;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 10px;
    padding: 12px 15px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
    cursor: pointer;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #f0f7ff;
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.notification-icon.info {
    background: #e3f2fd;
}

.notification-icon.warning {
    background: #fff3e0;
}

.notification-icon.success {
    background: #e8f5e9;
}

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

.notification-title {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.notification-text {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-time {
    font-size: 10px;
    color: #999;
}

.notification-footer {
    padding: 10px 15px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.notification-footer a {
    font-size: 11px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.notification-footer a:hover {
    text-decoration: underline;
}

/* 사용자 드롭다운 */
.user-dropdown {
    min-width: 240px;
}

.user-dropdown-header {
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-large {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.user-dropdown-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.user-dropdown-email {
    font-size: 11px;
    opacity: 0.9;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 5px 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 12px;
    transition: background 0.2s;
}

.user-dropdown-item:hover {
    background: #f8f9fa;
}

.user-dropdown-item .icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.user-dropdown-item.logout {
    color: #e74c3c;
}

.user-dropdown-item.logout:hover {
    background: #fee;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 11px;
}

.btn-icon {
    padding: 4px 8px;
    font-size: 11px;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* 컨텐츠 영역 */
.content {
    padding: 15px 20px;
}

.page-header {
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

.page-header h2 {
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 600;
}

/* 카드 */
.card {
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    margin-bottom: 15px;
}

.card-header {
    padding: 10px 15px;
    background: var(--table-header-bg);
    border-bottom: 1px solid var(--border-color);
    border-radius: 6px 6px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
}

.card-body {
    padding: 15px;
}

/* 검색 폼 */
.search-form {
    background: var(--table-header-bg);
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.form-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

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

.form-label {
    min-width: 70px;
    font-weight: 500;
    color: #555;
    font-size: 12px;
}

.form-input {
    flex: 1;
}

.form-input input, .form-input select, 
.data-table input, .data-table select {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    height: 28px;
}

/* 테이블 내 input/select 특수 스타일 */
.data-table td input[type="number"],
.data-table td input[type="text"],
.data-table td select {
    padding: 4px 6px;
    height: 26px;
    font-size: 11px;
}

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

.btn-success:hover {
    background: #229954;
}

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

.btn-danger:hover {
    background: #c0392b;
}

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

.btn-warning:hover {
    background: #d68910;
}

/* 테이블 */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table thead {
    background: var(--table-header-bg);
}

.data-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tbody tr:hover {
    background: var(--hover-color);
}

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

/* 텍스트 정렬 */
.text-center {
    text-align: center;
}

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

/* 배지 */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
}

.badge-active {
    background: #d4edda;
    color: #155724;
}

.badge-inactive {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a, .pagination span {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
}

.pagination a:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

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

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

.modal[style*="display: block"] {
    display: flex !important;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog,
.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    margin: auto;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-header .close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

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

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 25px;
    background: white;
}

.modal-body p {
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.modal-body .form-group {
    margin-bottom: 0;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
}

/* 대시보드 위젯 */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.widget {
    background: white;
    padding: 12px 15px;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    border-left: 3px solid var(--accent-color);
}

.widget-title {
    font-size: 11px;
    color: #777;
    margin-bottom: 6px;
}

.widget-value {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 4px;
    line-height: 1.2;
}

.widget-change {
    font-size: 10px;
    color: var(--success-color);
}

/* 액션 버튼 */
.action-buttons {
    display: flex;
    gap: 4px;
}

/* 유틸리티 */
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.gap-10 { gap: 10px; }

.d-flex {
    display: flex;
}

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

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

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ========================================= */
/* 모바일 반응형 스타일 */
/* ========================================= */

/* 데스크톱/모바일 전용 클래스 */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: flex !important;
}

/* 햄버거 메뉴 버튼 */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    color: var(--primary-color);
    transition: all 0.3s;
}

.mobile-menu-btn:hover {
    background: #f0f0f0;
    border-radius: 4px;
}

/* 사이드바 닫기 버튼 (모바일) */
.sidebar-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 모바일 오버레이 */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-overlay.active {
    display: block;
}

/* 반응형 - 태블릿 */
@media (max-width: 1024px) {
    .header-right .datetime-wrapper {
        display: none;
    }
    
    .user-details {
        display: none;
    }
    
    .dashboard-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 반응형 - 모바일 */
@media (max-width: 768px) {
    /* 데스크톱/모바일 전용 클래스 전환 */
    .mobile-only {
        display: flex !important;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    /* 햄버거 메뉴 버튼 표시 */
    .mobile-menu-btn {
        display: block;
    }
    
    /* 사이드바 숨김 및 슬라이드 */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 1001;
    }
    
    .sidebar.mobile-active {
        transform: translateX(0);
    }
    
    /* 메인 컨텐츠 전체 너비 */
    .main-content {
        margin-left: 0 !important;
    }
    
    /* 헤더 모바일 최적화 */
    .header {
        padding: 8px 12px;
        height: auto;
        flex-wrap: wrap;
    }
    
    .header-left {
        flex: 1;
    }
    
    .header-left h1 {
        font-size: 13px;
        display: none;
    }
    
    .header-right {
        gap: 3px;
    }
    
    .header-btn {
        padding: 5px 8px;
    }
    
    .quick-menu-btn {
        padding: 6px 10px !important;
        font-size: 12px;
    }
    
    .quick-menu-text {
        display: none;
    }
    
    /* 퀵슬롯 숨김 */
    .quick-slots-wrapper {
        display: none;
    }
    
    /* 컨텐츠 영역 */
    .content {
        padding: 10px;
    }
    
    .page-header h2 {
        font-size: 14px;
    }
    
    /* 대시보드 위젯 */
    .dashboard-widgets {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .widget {
        padding: 10px 12px;
    }
    
    .widget-title {
        font-size: 10px;
    }
    
    .widget-value {
        font-size: 18px;
    }
    
    /* 카드 */
    .card {
        margin-bottom: 10px;
    }
    
    .card-header {
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .card-title {
        font-size: 12px;
    }
    
    .card-body {
        padding: 10px;
    }
    
    /* 검색 폼 */
    .search-form .form-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .form-row[style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
    }
    
    .form-row[style*="grid-template-columns"] > div {
        width: 100%;
    }
    
    /* 테이블 반응형 */
    .table-responsive {
        margin: 0 -10px;
    }
    
    .data-table {
        font-size: 11px;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 8px;
        white-space: nowrap;
    }
    
    /* 모달 */
    .modal-dialog,
    .modal-content {
        width: 95% !important;
        max-width: none !important;
        margin: 10px;
        max-height: 85vh;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    /* 버튼 */
    .btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .btn-sm {
        padding: 4px 6px;
        font-size: 10px;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
    
    /* 통계 카드 */
    .content > div[style*="grid-template-columns: repeat(2"] {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
    }
    
    .content > div[style*="grid-template-columns: repeat(2"] > .card {
        margin-bottom: 0;
    }
    
    .content > div[style*="grid-template-columns: repeat(2"] .card-body {
        padding: 15px;
    }
    
    .content > div[style*="grid-template-columns: repeat(2"] .card-body div:last-child {
        font-size: 24px !important;
    }
    
    /* 로그인 페이지 */
    .login-container {
        flex-direction: column;
    }
    
    .login-left {
        padding: 20px;
        display: none;
    }
    
    .login-right {
        width: 100%;
        padding: 30px 20px;
        min-height: 100vh;
    }
    
    .login-form-wrapper h2 {
        font-size: 20px;
    }
    
    /* 드롭다운 */
    .notification-dropdown,
    .user-dropdown,
    .favorite-dropdown {
        position: fixed;
        top: 55px;
        left: 10px;
        right: 10px;
        width: auto;
        min-width: auto;
        max-height: 70vh;
    }
    
    /* 폼 그룹 모바일 */
    .form-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* 페이지네이션 */
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination a, .pagination span {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    /* 알림 그리드 */
    .all-notifications-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* 검색 폼 버튼 */
    .search-form .btn {
        width: 100%;
        margin-top: 5px;
    }
    
    /* 카드 헤더 버튼 */
    .card-header .btn {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    /* 정보 그리드 */
    .info-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* 사이드바 메뉴 텍스트 */
    .sidebar.mobile-active .menu-text,
    .sidebar.mobile-active .submenu {
        display: block;
    }
    
    .sidebar.mobile-active .sidebar-toggle-btn {
        display: none;
    }
}

/* 반응형 - 작은 모바일 */
@media (max-width: 480px) {
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
    
    .widget-value {
        font-size: 20px;
    }
    
    .header-btn .icon {
        font-size: 18px;
    }
    
    .user-avatar {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 5px 6px;
        font-size: 10px;
    }
}

/* 대시보드 2열 그리드 모바일 대응 */
.dashboard-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 1024px) {
    .dashboard-grid-2 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    /* 대시보드의 인라인 스타일 그리드 오버라이드 */
    .content > div[style*="grid-template-columns"] {
        display: block !important;
    }
    
    .content > div[style*="grid-template-columns"] > .card {
        margin-bottom: 15px;
    }
}

/* 반응형 그리드 */
.form-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 15px;
}

.form-grid > .form-group {
    margin-bottom: 0;
}

/* 태블릿 */
@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 모바일 */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr !important;
    }
    
    .modal-dialog {
        max-width: 95% !important;
        margin: 10px auto;
    }
}

/* ============================================= */
/* 퀵 슬롯 스타일 */
/* ============================================= */

/* 헤더 좌측 레이아웃 조정 */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 퀵 슬롯 래퍼 */
.quick-slots-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

/* 개별 퀵 슬롯 */
.quick-slot {
    width: 36px;
    height: 36px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.quick-slot:hover {
    border-color: var(--accent-color);
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.quick-slot .slot-content {
    font-size: 18px;
    color: #999;
    font-weight: bold;
    user-select: none;
}

/* 활성화된 슬롯 */
.quick-slot.active {
    border-style: solid;
    border-width: 2px;
    background: white;
}

.quick-slot.active:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.quick-slot.active .slot-content {
    font-size: 20px;
}

/* 퀵 슬롯 관리 버튼 */
.quick-slot .slot-actions {
    position: absolute;
    top: -8px;
    right: -8px;
    display: none;
    gap: 2px;
    z-index: 10;
}

.quick-slot.active:hover .slot-actions {
    display: flex;
}

.slot-action-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    padding: 0;
    line-height: 1;
}

.slot-edit-btn {
    background: #3498db;
    color: white;
}

.slot-edit-btn:hover {
    background: #2980b9;
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(52, 152, 219, 0.4);
}

.slot-delete-btn {
    background: #e74c3c;
    color: white;
}

.slot-delete-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(231, 76, 60, 0.4);
}

/* 퀵 슬롯 설정 모달 */
.quick-slot-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.quick-slot-modal[style*="display: flex"] {
    display: flex !important;
}

.quick-slot-modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quick-slot-modal-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.quick-slot-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.quick-slot-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: white;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.quick-slot-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.quick-slot-modal-body {
    padding: 25px;
}

.quick-slot-modal-body .form-group {
    margin-bottom: 20px;
}

.quick-slot-modal-body .form-group:last-child {
    margin-bottom: 0;
}

.quick-slot-modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.quick-slot-modal-body input[type="text"],
.quick-slot-modal-body input[type="url"],
.quick-slot-modal-body select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s;
}

.quick-slot-modal-body input:focus,
.quick-slot-modal-body select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 아이콘 선택기 */
.icon-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.icon-selector input {
    text-align: center;
    font-size: 20px;
}

.icon-presets {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.icon-presets button {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-presets button:hover {
    border-color: var(--accent-color);
    background: #f8f9fa;
    transform: scale(1.1);
}

/* 색상 선택기 */
.color-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-selector input[type="color"] {
    width: 60px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}

.color-presets {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.color-presets button {
    width: 32px;
    height: 32px;
    border: 2px solid white;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 0 0 1px #ddd;
    transition: all 0.2s;
}

.color-presets button:hover {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px var(--accent-color);
}

.quick-slot-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.quick-slot-modal-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.quick-slot-modal-footer .btn-delete {
    background: var(--danger-color);
    color: white;
}

.quick-slot-modal-footer .btn-delete:hover {
    background: #c0392b;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.quick-slot-modal-footer .btn-cancel {
    background: #95a5a6;
    color: white;
}

.quick-slot-modal-footer .btn-cancel:hover {
    background: #7f8c8d;
}

.quick-slot-modal-footer .btn-save {
    background: var(--accent-color);
    color: white;
}

.quick-slot-modal-footer .btn-save:hover {
    background: #2980b9;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* 반응형 퀵 슬롯 */
@media (max-width: 768px) {
    .quick-slots-wrapper {
        gap: 6px;
        margin-left: 8px;
    }
    
    .quick-slot {
        width: 32px;
        height: 32px;
    }
    
    .quick-slot .slot-content {
        font-size: 16px;
    }
    
    .quick-slot.active .slot-content {
        font-size: 18px;
    }
}

