* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 1200px;
    min-height: 600px;
}

/* 헤더 */
.header {
    background: #ffffff;
    color: #2c3e50;
    padding: 20px 30px;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header .user-name {
    font-size: 14px;
    font-weight: 500;
}

.header .logout-btn {
    background: #3498db;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.header .logout-btn:hover {
    background: #2980b9;
}

/* 로그인 페이지 */
.login-container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.login-header p {
    color: #7f8c8d;
    font-size: 14px;
}

.login-box {
    background: white;
    padding: 50px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

/* 메인 컨텐츠 */
.main-content {
    padding: 30px;
}

/* 탭 네비게이션 */
.tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 30px;
}

.tab {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab:hover {
    color: #3498db;
}

/* 탭 컨텐츠 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 검색 바 */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.search-bar button {
    padding: 12px 24px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.search-bar button:hover {
    background: #2980b9;
}

/* 카드 그리드 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
}

.card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.card .meta {
    color: #6c757d;
    font-size: 13px;
    margin-bottom: 15px;
}

.card .stock {
    display: inline-block;
    padding: 4px 12px;
    background: #e7f3ff;
    color: #0066cc;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
}

.card .stock.out {
    background: #ffe7e7;
    color: #cc0000;
}

.card .actions {
    display: flex;
    gap: 10px;
}

.card .actions button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

/* 테이블 */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    font-size: 14px;
    color: #333;
}

table tr:hover {
    background: #f8f9fa;
}

/* 상태 배지 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* 통계 카드 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.stat-card .number {
    font-size: 32px;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 5px;
}

.stat-card .label {
    color: #6c757d;
    font-size: 14px;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 20px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
}

.modal-close:hover {
    color: #333;
}

/* 알림 메시지 */
.alert {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
}

/* 반응형 */
@media (max-width: 768px) {
    .container {
        margin: 0;
        border-radius: 0;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tabs {
        overflow-x: auto;
    }

    .search-bar {
        flex-direction: column;
    }
}
