/* GUFF Design System CSS */

/* Pretendard Font */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* CSS Variables */
:root {
  /* Colors */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --blue-500: #3b82f6;
  --blue-600: #1d4ed8;
  --green-500: #10b981;
  --green-600: #059669;
  --orange-500: #f59e0b;
  --orange-600: #d97706;
  --red-500: #ef4444;
  --red-600: #dc2626;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Base Styles */
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Noto Sans KR", "Malgun Gothic", sans-serif;
  background-color: #F1F4F5;
  color: var(--slate-900);
  margin: 0;
  padding: 0;
}

/* Sidebar Styles */
.sidebar-item {
  position: relative;
}

.sidebar-item>div {
  position: relative;
}

.sidebar-item.active>a {
  background-color: var(--slate-50);
  position: relative;
}

.sidebar-item.active>a::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: linear-gradient(180deg, var(--red-500) 0%, var(--red-600) 100%);
  border-radius: 2px;
}

.sidebar-item.active i {
  color: var(--gray-700) !important;
}

.sidebar-item:not(.active) i {
  color: var(--gray-400);
}

.sidebar-item:not(.active):hover > div:first-child {
  background-color: var(--slate-100);
}

.sidebar-item:not(.active):hover i {
  color: var(--gray-600);
}

/* Submenu Styles */
.submenu {
  margin-left: 1.5rem;
  display: block !important;
}

.submenu-item {
  color: var(--gray-600);
  transition: all 0.2s ease;
}

.submenu-item:hover {
  background-color: var(--slate-100);
  color: var(--gray-800);
}

.submenu-item i {
  color: var(--gray-400);
}

.submenu-item:hover i {
  color: var(--gray-600);
}

.chevron-icon {
  transition: transform 0.2s ease;
}


/* Card Hover Effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

/* Gradient Backgrounds */
.gradient-purple {
  background: linear-gradient(135deg, var(--purple-500) 0%, var(--purple-600) 100%);
}

.gradient-blue {
  background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-600) 100%);
}

.gradient-mint {
  background: linear-gradient(135deg, var(--green-500) 0%, var(--green-600) 100%);
}

.gradient-orange {
  background: linear-gradient(135deg, var(--orange-500) 0%, var(--orange-600) 100%);
}

.gradient-rose {
  background: linear-gradient(135deg, var(--red-500) 0%, var(--red-600) 100%);
}

/* Chart Animations */
.mini-chart-bg {
  background: rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.chart-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: rgba(255, 255, 255, 0.4);
  clip-path: polygon(0% 100%, 10% 80%, 25% 85%, 40% 70%, 55% 75%, 70% 60%, 85% 65%, 100% 50%, 100% 100%);
  animation: slideUp 1s ease-out;
}

@keyframes slideUp {
  from {
    height: 0%;
  }

  to {
    height: 60%;
  }
}

.number-animation {
  animation: countUp 0.8s ease-out;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Calendar Styles */
.calendar-day {
  transition: all 0.2s ease;
}

.calendar-day:hover {
  background-color: var(--slate-200);
  transform: scale(1.02);
}

.calendar-event {
  position: relative;
}

.calendar-event::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.event-blue::after {
  background-color: var(--blue-500);
}

.event-purple::after {
  background-color: var(--purple-500);
}

.event-green::after {
  background-color: var(--green-500);
}

.event-orange::after {
  background-color: var(--orange-500);
}

/* Custom Scrollbar */
.custom-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.custom-scroll::-webkit-scrollbar {
  display: none;
}

/* Button Styles */
.btn-primary {
  background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-600) 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.btn-danger {
  background: linear-gradient(135deg, var(--red-500) 0%, var(--red-600) 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Form Styles */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-label {
  display: block;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

/* Ant Design Style Dropdown */
.ant-dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
}

.ant-dropdown-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.ant-dropdown-trigger:hover {
  border-color: var(--gray-300);
}

.ant-dropdown-trigger:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ant-dropdown-trigger.open {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ant-dropdown-arrow {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s ease;
  color: var(--gray-400);
}

.ant-dropdown-trigger.open .ant-dropdown-arrow {
  transform: rotate(180deg);
}

.ant-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  margin-top: 0.25rem;
  background-color: white;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  max-height: 12rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.5rem);
  transition: all 0.2s ease;
}

.ant-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ant-dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--gray-700);
  font-size: 0.875rem;
}

.ant-dropdown-item:hover {
  background-color: var(--gray-50);
  color: var(--gray-900);
}

.ant-dropdown-item.selected {
  background-color: var(--blue-50);
  color: var(--blue-700);
}

.ant-dropdown-item.disabled {
  color: var(--gray-400);
  cursor: not-allowed;
}

.ant-dropdown-item.disabled:hover {
  background-color: transparent;
  color: var(--gray-400);
}

.ant-dropdown-divider {
  height: 1px;
  background-color: var(--gray-200);
  margin: 0.25rem 0;
}

/* Status Indicators */
.status-online {
  color: var(--green-500);
}

.status-offline {
  color: var(--gray-400);
}

.status-busy {
  color: var(--orange-500);
}

.status-error {
  color: var(--red-500);
}

/* Loading States */
.loading-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--gray-200);
  border-top: 2px solid var(--blue-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    font-size: 0.875rem;
  }

  .card-hover:hover {
    transform: none;
  }

  .sidebar-item:not(.active):hover>div {
    background-color: transparent;
  }

  .tooltip {
    display: none !important;
  }
}

/* Print Styles */
@media print {

  .sidebar-item,
  .tooltip,
  .card-hover {
    box-shadow: none !important;
    transform: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}

/* Floating Action Button */
.floating-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-600) 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.5), 0 8px 10px -6px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
  z-index: 40;
  cursor: pointer;
}

.floating-btn:hover {
  transform: scale(1.05) translateY(-1px);
  box-shadow: 0 8px 20px -4px rgba(59, 130, 246, 0.4), 0 4px 8px -2px rgba(59, 130, 246, 0.3);
}

.floating-btn:active {
  transform: scale(1.05);
}

/* Floating Action Button Group */
.floating-btn-group {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 40;
}

.floating-btn-group .floating-main-btn {
  width: 3.5rem;
  height: 3.5rem;
  background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-600) 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.5), 0 8px 10px -6px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  align-self: flex-end;
}

.floating-btn-group .floating-main-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px -4px rgba(59, 130, 246, 0.4), 0 4px 8px -2px rgba(59, 130, 246, 0.3);
}

.floating-btn-group.active .floating-main-btn {
  transform: scale(1.05) rotate(45deg);
  box-shadow: 0 8px 20px -4px rgba(59, 130, 246, 0.4), 0 4px 8px -2px rgba(59, 130, 246, 0.3);
}

.floating-btn-group .floating-sub-btns {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(0.5rem);
  pointer-events: none;
  transition: all 0.3s ease;
}

.floating-btn-group.active .floating-sub-btns {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.floating-btn-group .floating-sub-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: white;
  color: var(--gray-700);
  border-radius: 1.5rem;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 500;
  align-self: flex-end;
}

.floating-btn-group .floating-sub-btn:hover {
  transform: translateX(-2px);
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.2);
  background: var(--slate-50);
}

.floating-btn-group .floating-sub-btn i {
  width: 1rem;
  height: 1rem;
}

.floating-btn-group .floating-sub-btn.download {
  color: var(--green-600);
}

.floating-btn-group .floating-sub-btn.download:hover {
  background: var(--green-50);
}

/* Ant Design Style Pagination */
.ant-pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.ant-pagination-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border: 1px solid #d9d9d9;
  border-radius: 0.375rem;
  background: #fff;
  color: #000000d9;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.ant-pagination-item:hover {
  border-color: #1890ff;
  color: #1890ff;
}

.ant-pagination-item-active {
  background: #1890ff;
  border-color: #1890ff;
  color: #fff;
}

.ant-pagination-item-active:hover {
  background: #40a9ff;
  border-color: #40a9ff;
  color: #fff;
}

.ant-pagination-prev,
.ant-pagination-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border: 1px solid #d9d9d9;
  border-radius: 0.375rem;
  background: #fff;
  color: #000000d9;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.ant-pagination-prev:hover,
.ant-pagination-next:hover {
  border-color: #1890ff;
  color: #1890ff;
}

.ant-pagination-prev:disabled,
.ant-pagination-next:disabled {
  background: #f5f5f5;
  border-color: #d9d9d9;
  color: #00000040;
  cursor: not-allowed;
}

.ant-pagination-prev:disabled:hover,
.ant-pagination-next:disabled:hover {
  border-color: #d9d9d9;
  color: #00000040;
}

.ant-pagination-jump-prev,
.ant-pagination-jump-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border: 1px solid #d9d9d9;
  border-radius: 0.375rem;
  background: #fff;
  color: #000000d9;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.ant-pagination-jump-prev:hover,
.ant-pagination-jump-next:hover {
  border-color: #1890ff;
  color: #1890ff;
}

.ant-pagination-options {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
  font-size: 0.875rem;
  color: #000000d9;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --slate-50: #ffffff;
    --slate-900: #000000;
    --gray-400: #666666;
    --gray-600: #333333;
    --gray-700: #000000;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}