@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  body {
    font-family: 'Inter', system-ui, sans-serif;
    overflow-x: hidden;
    position: relative;
  }
}

@layer utilities {
  .content-auto {
    content-visibility: auto;
  }
  
  .sidebar-item-active {
    @apply bg-primary/10 text-primary border-l-4 border-primary;
  }
  
  .nav-hover {
    @apply hover:bg-neutral-100 transition-colors duration-200 rounded;
  }
  
  .card-hover {
    @apply hover:shadow-card-hover hover:-translate-y-1 transition-all duration-300;
  }
  
  .animate-fade-in {
    animation: fadeIn 0.3s ease-in-out;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

/* 水印样式 */
.watermark {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.1;
}

.watermark-text {
  position: absolute;
  color: #000;
  font-size: 18px;
  transform: rotate(-30deg);
  white-space: nowrap;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c0c6cf;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #909399;
}

/* 过渡动画 */
.transition-all {
  transition: all 0.25s ease;
}

/* 图表容器最小高度 */
.chart-container {
  min-height: 120px;
}

/* 自定义滚动条 */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: #c0c6cf #f1f1f1;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 2px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #c0c6cf;
  border-radius: 2px;
}

/* 待售执照区域样式 */
.license-container {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.license-pages {
  display: flex;
  transition: transform 0.5s ease;
  width: 200%; /* 两页的总宽度 */
}

.license-page {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 50%; /* 每页占容器的一半 */
  flex-shrink: 0;
}

.license-item {
  flex: 0 0 calc(25% - 0.75rem);
}

.license-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* 最新信息动态区域样式 */
.dynamic-scroll-container {
  max-height: 320px;
  overflow-y: auto;
}

/* 进度条颜色调整 */
.progress-yellow {
  background-color: #FFC53D;
}

.progress-gray {
  background-color: #86909C;
}

.progress-orange {
  background-color: #FF7D00;
}

.progress-blue {
  background-color: #3491FA;
}

.progress-green {
  background-color: #00B42A;
}

/* 王冠样式 */
.crown {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  color: #FFC53D;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  z-index: 5;
}

.silver-crown {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  color: #C0C6CF;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  z-index: 5;
}

/* 图片模态框样式 */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.image-modal.active {
  display: flex;
}

.modal-image {
  max-width: 80%;
  max-height: 80%;
  transform: scale(1);
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  z-index: 1001;
}

.modal-info {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px 15px;
  border-radius: 5px;
}

/* 动态项样式 */
.dynamic-item {
  transition: all 0.2s ease;
}

.dynamic-item:hover {
  background-color: #f8fafc;
}

/* 折叠/展开功能样式 */
.material-details {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s ease;
}

.material-details.expanded {
  display: block;
  -webkit-line-clamp: unset;
}

.progress-details {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s ease;
}

.progress-details.expanded {
  display: block;
  -webkit-line-clamp: unset;
}

.toggle-icon {
  transition: transform 0.3s ease;
}

.toggle-icon.rotated {
  transform: rotate(180deg);
}

/* 缩略图样式 */
.thumb-image {
  width: 40px;
  height: 30px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e4e7ed;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.thumb-image:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 驳回状态样式 */
.status-rejected {
  background-color: #fef0f0;
  color: #f53f3f;
}

/* 顶部通知公告区域样式 */
.announcement-container {
  max-height: 120px;
  overflow-y: auto;
}

/* 悬浮记事本样式 */
.floating-notepad {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 300px;
  height: 400px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 100;
  display: flex;
  flex-direction: column;
  resize: both;
  overflow: auto;
  min-width: 250px;
  min-height: 300px;
}

.notepad-header {
  background: #165DFF;
  color: white;
  padding: 10px 15px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  cursor: move;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notepad-controls {
  display: flex;
  gap: 10px;
}

.notepad-controls button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 14px;
}

.notepad-content {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
}

/* 悬浮记事本最小化状态样式 - 改为小球 */
.floating-notepad.notepad-minimized {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  min-height: 50px !important;
  overflow: hidden;
  border-radius: 50% !important;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #165DFF;
  box-shadow: 0 4px 12px rgba(22, 93, 255, 0.3);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 100;
  resize: none;
}

.floating-notepad.notepad-minimized:hover {
  width: 60px !important;
  height: 60px !important;
  background-color: #0E42D2;
  box-shadow: 0 6px 20px rgba(22, 93, 255, 0.4);
  transform: scale(1.1);
}

.floating-notepad.notepad-minimized .notepad-header {
  background: transparent !important;
  border-radius: 50% !important;
  padding: 0;
  font-size: 0;
  justify-content: center;
  align-items: center;
  display: flex;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.floating-notepad.notepad-minimized .notepad-header span {
  display: none;
}

.floating-notepad.notepad-minimized .notepad-controls {
  display: none;
}

.floating-notepad.notepad-minimized .notepad-content {
  display: none;
}

/* 小球图标样式 */
.floating-notepad.notepad-minimized .notepad-header::after {
  content: "📝";
  font-size: 20px;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 小球消息提示样式（显示未保存字数） */
.floating-notepad.notepad-minimized .notepad-header::before {
  content: attr(data-count);
  position: absolute;
  top: -5px;
  right: -5px;
  background: #F53F3F;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.floating-notepad.notepad-minimized .notepad-header.has-unsaved::before {
  opacity: 1;
}

