/* 열정돼지 시스템 - 미니멀 디자인 */

:root {
  --primary-color: #ff6b9d;
  --primary-dark: #ff4081;
  --secondary-color: #4a90e2;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
  --info-color: #2196f3;
  --bg-color: #f5f7fa;
  --card-bg: #ffffff;
  --text-color: #333333;
  --text-light: #666666;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --border-radius-sm: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

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

.login-container {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-hover);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.login-header p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* 버튼 스타일 */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-info,
.btn-warning {
  padding: 12px 24px;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
  background: #3a7bc8;
  transform: translateY(-2px);
}

.btn-success {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-danger {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-info {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
}

.btn-info:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-warning {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--text-light);
  font-size: 0.9rem;
}

.login-footer a {
  color: var(--primary-color);
  text-decoration: none;
}

/* 대시보드 레이아웃 */
.dashboard {
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px;
}

.dashboard-header {
  background: var(--card-bg);
  border-radius: var(--border-radius-sm);
  padding: 15px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-header h1 {
  font-size: 1.4rem;
  color: var(--primary-color);
  font-weight: 600;
}

.dashboard-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 드롭다운 네비게이션 스타일 */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  position: relative;
  font-size: 0.8rem;
  padding: 4px 8px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  min-width: 180px;
  padding: 6px 0;
}

.dropdown-menu a {
  display: block;
  padding: 6px 12px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  border-radius: 0;
  font-weight: normal;
  font-size: 0.8rem;
}

.dropdown-menu a:hover {
  background: var(--bg-color);
  color: var(--primary-color);
}

.nav-dropdown:hover .dropdown-menu {
  display: block;
}

.nav-dropdown:hover .dropdown-toggle {
  background: var(--bg-color);
}

.dashboard-nav a {
  text-decoration: none;
  color: var(--text-color);
  padding: 4px 8px;
  border-radius: 999px;
  transition: all 0.3s;
  font-size: 0.8rem;
  font-weight: 500;
}

.dashboard-nav a:hover {
  background: var(--bg-color);
}

/* 카드 */
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.card-header h2 {
  font-size: 1.5rem;
  color: var(--text-color);
}

.card-body {
  color: var(--text-color);
}

/* 그리드 레이아웃 */
.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-5 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* 통계 위젯 */
.stat-widget {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--shadow);
}

.stat-widget h3 {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.9;
  margin-bottom: 10px;
}

.stat-widget .stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-widget .stat-label {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* 재원 현황 */
.fund-status {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.fund-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: var(--bg-color);
  border-radius: var(--border-radius-sm);
}

.fund-item .fund-name {
  font-weight: 600;
  color: var(--text-color);
}

.fund-item .fund-amount {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.fund-item .fund-used {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 5px;
}

/* 프로그레스 바 */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success-color), var(--info-color));
  border-radius: 999px;
  transition: width 0.3s;
}

/* 테이블 */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

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

.table th,
.table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  font-weight: 600;
  color: var(--text-color);
}

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

/* 캡쳐용 테이블 */
.capture-friendly-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  color: #111827;
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.capture-friendly-table th,
.capture-friendly-table td {
  border: 1px solid #d1d5db;
  padding: 12px 16px;
  vertical-align: top;
  line-height: 1.5;
}

.capture-friendly-table thead th {
  background: #f3f4f6;
  font-weight: 600;
  color: #1f2937;
}

.capture-friendly-table .cell-block {
  display: block;
}

.capture-friendly-table .cell-strong {
  font-weight: 700;
  font-size: 0.98rem;
}

.capture-friendly-table .cell-muted {
  color: #4b5563;
  font-size: 0.9rem;
}

.capture-friendly-table .cell-total {
  color: #111827;
  font-weight: 700;
  font-size: 1.05rem;
}

.capture-friendly-table tbody tr:nth-child(even) {
  background: #fafafa;
}

/* 활동지원사 센터 요약 */
.center-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.center-summary-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f9fafb;
}

.center-summary-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.95rem;
  color: #111827;
  font-weight: 600;
}

.center-summary-meta {
  color: #4b5563;
  font-size: 0.85rem;
}

.center-summary-body {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.center-summary-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 0.85rem;
  color: #374151;
}

.center-summary-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.center-summary-badge.actual {
  background: #dbeafe;
  color: #1d4ed8;
}

.center-summary-badge.overtime {
  background: #fde68a;
  color: #b45309;
}

.center-summary-badge.total {
  background: #dcfce7;
  color: #15803d;
}

.center-summary-empty {
  padding: 12px;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #6b7280;
  background: #f9fafb;
  text-align: center;
}

/* 토스트 알림 */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--card-bg);
  border-radius: var(--border-radius-sm);
  padding: 16px 20px;
  box-shadow: var(--shadow-hover);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 500px;
  cursor: pointer;
  transition: all 0.3s;
  animation: slideIn 0.3s ease-out;
  border-left: 4px solid;
}

.toast:hover {
  transform: translateX(-5px);
}

.toast.success {
  border-left-color: var(--success-color);
  background: #f1f8f4;
}

.toast.error {
  border-left-color: var(--error-color);
  background: #fef1f0;
}

.toast.info {
  border-left-color: var(--info-color);
  background: #e3f2fd;
}

.toast.warning {
  border-left-color: var(--warning-color);
  background: #fff3e0;
}

.toast-icon {
  font-size: 1.5rem;
}

.toast-message {
  flex: 1;
  color: var(--text-color);
  font-weight: 500;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* 모달 */
.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.show {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 30px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-hover);
}

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

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.3s;
}

.modal-close:hover {
  color: var(--error-color);
}

/* 달력 */
.calendar {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calendar-header h2 {
  font-size: 1.5rem;
  color: var(--text-color);
}

.calendar-nav {
  display: flex;
  gap: 10px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.3s;
  padding: 5px;
}

.calendar-day:hover {
  border-color: var(--primary-color);
  background: var(--bg-color);
}

.calendar-day.today {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.calendar-day.has-schedule {
  background: #e3f2fd;
  border-color: var(--info-color);
}

/* 모바일 메뉴 버튼 */
.mobile-menu-toggle {
  display: none;
  background: var(--primary-color);
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: white;
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  transition: all 0.3s;
}

.mobile-menu-toggle:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

.mobile-nav-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background: linear-gradient(135deg, var(--card-bg) 0%, #f8f9fa 100%);
  padding: 25px;
  box-shadow: -8px 0 25px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 3px solid var(--primary-color);
}

.mobile-nav-header h3 {
  color: var(--primary-color);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
}

.mobile-nav-close {
  background: var(--error-color);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.mobile-nav-close:hover {
  background: #d32f2f;
  transform: scale(1.1);
}

.mobile-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-menu a {
  display: block;
  padding: 12px 18px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  transition: all 0.3s;
  font-weight: 500;
  font-size: 0.95rem;
  border-left: 4px solid transparent;
  background: rgba(255, 255, 255, 0.7);
}

.mobile-nav-menu a:hover {
  background: var(--primary-color);
  color: white;
  border-left-color: var(--primary-dark);
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

.mobile-nav-menu .nav-dropdown {
  position: static;
}

.mobile-nav-menu .dropdown-menu {
  position: static;
  display: block;
  box-shadow: none;
  border: none;
  background: var(--bg-color);
  margin: 5px 0 10px 15px;
  padding: 5px 0;
}

.mobile-nav-menu .dropdown-menu a {
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* 모바일 버튼 그룹 개선 - 더 작게 한 줄로 */
.mobile-button-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 8px 0;
  justify-content: space-between;
  padding: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  backdrop-filter: blur(5px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-button-group .btn-primary,
.mobile-button-group .btn-secondary,
.mobile-button-group .btn-success,
.mobile-button-group .btn-danger,
.mobile-button-group .btn-info,
.mobile-button-group .btn-warning {
  padding: 6px 8px;
  font-size: 0.6rem;
  border-radius: 15px;
  flex: 1;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  font-weight: 500;
  transition: all 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.mobile-button-group .btn-primary:hover,
.mobile-button-group .btn-secondary:hover,
.mobile-button-group .btn-success:hover,
.mobile-button-group .btn-danger:hover,
.mobile-button-group .btn-info:hover,
.mobile-button-group .btn-warning:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.mobile-button-group a {
  padding: 6px 8px;
  font-size: 0.6rem;
  border-radius: 15px;
  flex: 1;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  transition: all 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  line-height: 1.2;
}

.mobile-button-group a:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* 모바일 달력 년월 표시 스타일 */
.mobile-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border-radius: 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.mobile-calendar-header .nav-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.mobile-calendar-header .nav-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

.mobile-calendar-header .month-display {
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  flex: 1;
  margin: 0 10px;
}

@media (max-width: 480px) {
  .mobile-calendar-header {
    padding: 6px 8px;
    margin-bottom: 8px;
  }
  
  .mobile-calendar-header .nav-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
  }
  
  .mobile-calendar-header .month-display {
    font-size: 0.9rem;
  }
}

@media (max-width: 360px) {
  .mobile-calendar-header {
    padding: 4px 6px;
    margin-bottom: 6px;
  }
  
  .mobile-calendar-header .nav-btn {
    padding: 3px 6px;
    font-size: 0.65rem;
  }
  
  .mobile-calendar-header .month-display {
    font-size: 0.8rem;
  }
}

/* 모바일 실시간 계산 미리보기 스타일 */
@media (max-width: 768px) {
  #calculation-preview {
    background: rgba(255,255,255,0.9) !important;
    padding: 12px !important;
    border-radius: 12px !important;
    margin: 15px 0 !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }
  
  #calculation-preview h4 {
    font-size: 1rem !important;
    margin-bottom: 12px !important;
    color: #3b82f6 !important;
  }
  
  #calculation-details {
    font-size: 0.9rem;
  }
  
  #calculation-details table {
    font-size: 0.8rem;
    width: 100%;
  }
  
  #calculation-details table td {
    padding: 4px 6px;
  }
  
  #calculation-details .grid {
    display: block !important;
  }
  
  #calculation-details .grid > div {
    margin-bottom: 15px;
  }
}

/* 모바일 폼 개선 */
@media (max-width: 768px) {
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-group label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 0.95rem;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 15px 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 15px;
    font-size: 1rem;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  }
  
  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.2);
    background: rgba(255,255,255,1);
    transform: translateY(-1px);
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-success,
  .btn-danger,
  .btn-info,
  .btn-warning {
    padding: 15px 25px;
    font-size: 1rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border: none;
  }
  
  .btn-primary:hover,
  .btn-secondary:hover,
  .btn-success:hover,
  .btn-danger:hover,
  .btn-info:hover,
  .btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  }
  
  .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  }
  
  .btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #3a7bc8 100%);
  }
  
  .btn-success {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  }
  
  .btn-danger {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  }
  
  .btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  }
  
  .btn-warning {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  }
}

/* 모바일 달력 네비게이션 */
.mobile-calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
  padding: 8px;
  background: var(--bg-color);
  border-radius: var(--border-radius-sm);
}

.mobile-calendar-nav button {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s;
}

.mobile-calendar-nav button:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.mobile-calendar-nav .current-month {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.9rem;
}

/* 모바일 전용 개선된 레이아웃 - 눈에 편한 색상 */
@media (max-width: 768px) {
  .dashboard {
    padding: 8px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
  }
  
  .dashboard-header {
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
  }
  
  .dashboard-header h1 {
    font-size: 1.4rem;
    color: white;
    text-align: center;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  .dashboard-header p {
    color: rgba(255,255,255,0.9);
    text-align: center;
    font-size: 0.9rem;
  }
  
  .dashboard-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
  }
  
  .mobile-menu-toggle:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .card {
    padding: 18px;
    margin-bottom: 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
  }
  
  .card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
  }
  
  .card-header {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #3b82f6;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    margin: -18px -18px 18px -18px;
    padding: 18px;
    border-radius: 16px 16px 0 0;
  }
  
  .card-header h2 {
    font-size: 1.1rem;
    color: white;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .calendar-grid {
    gap: 2px;
    padding: 4px;
    max-width: 90%;
    margin: 0 auto;
  }
  
  .calendar-day {
    border-radius: 4px;
    font-size: 0.6rem;
    padding: 2px 1px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s;
    background: rgba(255,255,255,0.8);
    min-height: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 0.8;
  }
  
  .calendar-day:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
  }
  
  .calendar-day.today {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
    font-weight: 600;
  }
  
  .calendar-day.has-schedule {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.2);
  }
  
  .calendar-day.has-schedule::after {
    content: '●';
    font-size: 0.6rem;
    color: #3b82f6;
    margin-top: 1px;
  }
  
  .calendar-day.today.has-schedule::after {
    color: white;
  }
  
  #toast-container {
    left: 10px;
    right: 10px;
    top: 10px;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
  }
  
  .stat-widget {
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
  }
  
  .stat-widget .stat-value {
    font-size: 2rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  }
  
  .table {
    font-size: 0.85rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }
  
  .table th,
  .table td {
    padding: 10px 12px;
  }
  
  .table thead {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
  }
  
  .table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
  }
  
  .modal-content {
    padding: 20px;
    width: 95%;
    border-radius: 16px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
  }
  
  .login-container {
    padding: 25px 18px;
    margin: 8px;
    border-radius: 16px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
  }
  
  .login-header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

/* 모바일 애니메이션 효과 */
@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeInScale {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* 모바일 전용 애니메이션 */
@media (max-width: 768px) {
  .card {
    animation: slideInUp 0.6s ease-out;
  }
  
  .card:nth-child(1) { animation-delay: 0.1s; }
  .card:nth-child(2) { animation-delay: 0.2s; }
  .card:nth-child(3) { animation-delay: 0.3s; }
  .card:nth-child(4) { animation-delay: 0.4s; }
  
  .stat-widget {
    animation: fadeInScale 0.8s ease-out;
  }
  
  .mobile-button-group {
    animation: slideInUp 0.5s ease-out;
  }
  
  .dashboard-header {
    animation: fadeInScale 0.7s ease-out;
  }
  
  .mobile-menu-toggle:active {
    animation: pulse 0.3s ease-out;
  }
  
  /* 스크롤 시 부드러운 전환 */
  .dashboard {
    scroll-behavior: smooth;
  }
  
  /* 터치 피드백 개선 */
  .calendar-day:active,
  .btn-primary:active,
  .btn-secondary:active,
  .btn-success:active,
  .btn-danger:active,
  .btn-info:active {
    transform: scale(0.95);
    transition: transform 0.1s ease-out;
  }
  
  /* 모바일 전용 스크롤바 스타일링 */
  .mobile-nav-content::-webkit-scrollbar {
    width: 6px;
  }
  
  .mobile-nav-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
  }
  
  .mobile-nav-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
  }
  
  .mobile-nav-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
  }
}

/* 모바일 특별 효과 - 더 작은 해상도 */
@media (max-width: 480px) {
  .dashboard {
    padding: 6px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  }
  
  .dashboard-header {
    padding: 16px;
    margin-bottom: 10px;
    border-radius: 14px;
  }
  
  .dashboard-header h1 {
    font-size: 1.2rem;
  }
  
  .card {
    padding: 16px;
    margin-bottom: 10px;
    border-radius: 14px;
  }
  
  .card-header {
    margin: -16px -16px 16px -16px;
    padding: 16px;
    border-radius: 14px 14px 0 0;
  }
  
  .card-header h2 {
    font-size: 1rem;
  }
  
  .stat-widget {
    padding: 16px;
    border-radius: 14px;
  }
  
  .stat-widget .stat-value {
    font-size: 1.8rem;
  }
  
  .mobile-button-group {
    padding: 6px;
    border-radius: 10px;
    gap: 3px;
    margin: 8px 0;
    justify-content: space-between;
  }
  
  .mobile-button-group .btn-primary,
  .mobile-button-group .btn-secondary,
  .mobile-button-group .btn-success,
  .mobile-button-group .btn-danger,
  .mobile-button-group .btn-info,
  .mobile-button-group .btn-warning,
  .mobile-button-group a {
    padding: 5px 8px;
    font-size: 0.65rem;
    border-radius: 15px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
  }
  
  .calendar-grid {
    gap: 1px;
    padding: 3px;
    max-width: 85%;
    margin: 0 auto;
  }
  
  .calendar-day {
    border-radius: 3px;
    font-size: 0.55rem;
    padding: 1px;
    min-height: 28px;
    aspect-ratio: 0.7;
  }
  
  .calendar-day.has-schedule::after {
    font-size: 0.5rem;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-success,
  .btn-danger,
  .btn-info {
    padding: 10px 18px;
    font-size: 0.9rem;
    border-radius: 18px;
  }
  
  .table {
    font-size: 0.8rem;
    border-radius: 10px;
  }
  
  .table th,
  .table td {
    padding: 8px 10px;
  }
  
  .modal-content {
    padding: 18px;
    width: 98%;
    border-radius: 14px;
  }
  
  .login-container {
    padding: 20px 12px;
    margin: 5px;
    border-radius: 14px;
  }
  
  .login-header h1 {
    font-size: 1.8rem;
  }
  
  .fund-item {
    padding: 10px;
    border-radius: 10px;
  }
  
  .fund-item .fund-name {
    font-size: 0.85rem;
  }
  
  .fund-item .fund-amount {
    font-size: 1rem;
  }
}

/* 토스트 메시지 스타일 */
.toast {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  pointer-events: auto;
  max-width: 300px;
  word-wrap: break-word;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-success {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  border-color: #4caf50;
}

.toast-error {
  background: linear-gradient(135deg, #f44336, #d32f2f);
  color: white;
  border-color: #f44336;
}

.toast-info {
  background: linear-gradient(135deg, #2196f3, #1976d2);
  color: white;
  border-color: #2196f3;
}

.toast-warning {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: white;
  border-color: #ff9800;
}

/* 터치 인터페이스 개선 */
@media (max-width: 768px) {
  /* 터치 타겟 크기 최적화 */
  .btn-primary,
  .btn-secondary,
  .btn-success,
  .btn-danger,
  .btn-info,
  .mobile-menu-toggle,
  .mobile-calendar-header .nav-btn {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* 터치 피드백 개선 */
  .btn-primary:active,
  .btn-secondary:active,
  .btn-success:active,
  .btn-danger:active,
  .btn-info:active,
  .mobile-menu-toggle:active,
  .mobile-calendar-header .nav-btn:active,
  .calendar-day:active {
    transform: scale(0.95);
    transition: transform 0.1s ease-out;
  }
  
  /* 스크롤 최적화 */
  .dashboard {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  
  .mobile-nav-content {
    -webkit-overflow-scrolling: touch;
  }
  
  /* 포커스 표시 개선 */
  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  }
  
  /* 선택 텍스트 색상 */
  ::selection {
    background: rgba(59, 130, 246, 0.3);
    color: #1d4ed8;
  }
  
  /* 스크롤바 스타일링 */
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  
  ::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
  }
  
  ::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 4px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
  }
}

/* 새로운 휴대폰 형식 최적화 (세로가 긴 화면) */
/* iPhone 14 Pro Max, Galaxy S24 Ultra 등 */
@media (max-width: 430px) and (min-height: 900px) {
  .dashboard {
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
  }
  
  .dashboard-header {
    padding: 24px;
    margin-bottom: 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.2);
  }
  
  .dashboard-header h1 {
    font-size: 1.6rem;
    margin-bottom: 8px;
  }
  
  .dashboard-header p {
    font-size: 1rem;
  }
  
  .mobile-menu-toggle {
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 25px;
  }
  
  .card {
    padding: 24px;
    margin-bottom: 20px;
    border-radius: 20px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  }
  
  .card-header {
    margin: -24px -24px 24px -24px;
    padding: 24px;
    border-radius: 20px 20px 0 0;
  }
  
  .card-header h2 {
    font-size: 1.3rem;
  }
  
  .mobile-calendar-header {
    padding: 16px 20px;
    margin-bottom: 16px;
    border-radius: 16px;
  }
  
  .mobile-calendar-header .nav-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
    border-radius: 12px;
  }
  
  .mobile-calendar-header .month-display {
    font-size: 1.2rem;
  }
  
  .mobile-button-group {
    padding: 12px;
    border-radius: 16px;
    gap: 8px;
    margin: 16px 0;
    justify-content: space-between;
  }
  
  .mobile-button-group .btn-primary,
  .mobile-button-group .btn-secondary,
  .mobile-button-group .btn-success,
  .mobile-button-group .btn-danger,
  .mobile-button-group .btn-info,
  .mobile-button-group .btn-warning,
  .mobile-button-group a {
    padding: 8px 14px;
    font-size: 0.8rem;
    border-radius: 20px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
  }
  
  .calendar-grid {
    gap: 6px;
    padding: 12px;
    max-width: 95%;
    margin: 0 auto;
  }
  
  .calendar-day {
    border-radius: 12px;
    font-size: 0.8rem;
    padding: 6px 3px;
    min-height: 40px;
    aspect-ratio: 0.8;
  }
  
  .calendar-day.has-schedule::after {
    font-size: 0.6rem;
  }
  
  .stat-widget {
    padding: 24px;
    border-radius: 20px;
  }
  
  .stat-widget .stat-value {
    font-size: 2.5rem;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 18px 24px;
    border-radius: 16px;
    font-size: 1.1rem;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-success,
  .btn-danger,
  .btn-info {
    padding: 16px 28px;
    font-size: 1.1rem;
    border-radius: 25px;
  }
  
  .table {
    font-size: 1rem;
    border-radius: 16px;
  }
  
  .table th,
  .table td {
    padding: 16px 20px;
  }
  
  .modal-content {
    padding: 32px;
    width: 90%;
    border-radius: 24px;
  }
  
  .login-container {
    padding: 40px 24px;
    margin: 16px;
    border-radius: 24px;
  }
  
  .login-header h1 {
    font-size: 2.5rem;
  }
  
  .fund-item {
    padding: 16px;
    border-radius: 16px;
  }
  
  .fund-item .fund-name {
    font-size: 1rem;
  }
  
  .fund-item .fund-amount {
    font-size: 1.2rem;
  }
  
  /* 세로가 긴 화면에서 그리드 레이아웃 최적화 */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .grid-4 {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  
  /* 모바일 네비게이션 최적화 */
  .mobile-nav-content {
    width: 320px;
    padding: 30px;
  }
  
  .mobile-nav-header {
    margin-bottom: 35px;
    padding-bottom: 25px;
  }
  
  .mobile-nav-header h3 {
    font-size: 1.4rem;
  }
  
  .mobile-nav-menu {
    gap: 12px;
  }
  
  .mobile-nav-menu a {
    padding: 16px 24px;
    font-size: 1rem;
  }
}

/* 중간 크기 새로운 휴대폰 (iPhone 14, Galaxy S24 등) */
@media (max-width: 393px) and (min-height: 850px) {
  .dashboard {
    padding: 10px;
  }
  
  .dashboard-header {
    padding: 20px;
    margin-bottom: 16px;
    border-radius: 18px;
  }
  
  .dashboard-header h1 {
    font-size: 1.4rem;
  }
  
  .dashboard-header p {
    font-size: 0.9rem;
  }
  
  .mobile-menu-toggle {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .card {
    padding: 20px;
    margin-bottom: 16px;
    border-radius: 18px;
  }
  
  .card-header {
    margin: -20px -20px 20px -20px;
    padding: 20px;
    border-radius: 18px 18px 0 0;
  }
  
  .card-header h2 {
    font-size: 1.2rem;
  }
  
  .mobile-calendar-header {
    padding: 14px 18px;
    margin-bottom: 14px;
    border-radius: 14px;
  }
  
  .mobile-calendar-header .nav-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
  
  .mobile-calendar-header .month-display {
    font-size: 1.1rem;
  }
  
  .mobile-button-group {
    padding: 10px;
    border-radius: 14px;
    gap: 6px;
    margin: 14px 0;
    justify-content: space-between;
  }
  
  .mobile-button-group .btn-primary,
  .mobile-button-group .btn-secondary,
  .mobile-button-group .btn-success,
  .mobile-button-group .btn-danger,
  .mobile-button-group .btn-info,
  .mobile-button-group .btn-warning,
  .mobile-button-group a {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 18px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
  }
  
  .calendar-grid {
    gap: 5px;
    padding: 10px;
    max-width: 92%;
  }
  
  .calendar-day {
    border-radius: 10px;
    font-size: 0.75rem;
    padding: 5px 2px;
    min-height: 36px;
    aspect-ratio: 0.8;
  }
  
  .calendar-day.has-schedule::after {
    font-size: 0.55rem;
  }
  
  .stat-widget {
    padding: 20px;
    border-radius: 18px;
  }
  
  .stat-widget .stat-value {
    font-size: 2.2rem;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 16px 20px;
    border-radius: 14px;
    font-size: 1rem;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-success,
  .btn-danger,
  .btn-info {
    padding: 14px 24px;
    font-size: 1rem;
    border-radius: 22px;
  }
  
  .table {
    font-size: 0.95rem;
    border-radius: 14px;
  }
  
  .table th,
  .table td {
    padding: 14px 18px;
  }
  
  .modal-content {
    padding: 28px;
    width: 92%;
    border-radius: 20px;
  }
  
  .login-container {
    padding: 32px 20px;
    margin: 12px;
    border-radius: 20px;
  }
  
  .login-header h1 {
    font-size: 2.2rem;
  }
  
  .fund-item {
    padding: 14px;
    border-radius: 14px;
  }
  
  .fund-item .fund-name {
    font-size: 0.95rem;
  }
  
  .fund-item .fund-amount {
    font-size: 1.1rem;
  }
  
  /* 그리드 레이아웃 최적화 */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .grid-4 {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  
  /* 모바일 네비게이션 최적화 */
  .mobile-nav-content {
    width: 300px;
    padding: 25px;
  }
  
  .mobile-nav-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
  }
  
  .mobile-nav-header h3 {
    font-size: 1.3rem;
  }
  
  .mobile-nav-menu {
    gap: 10px;
  }
  
  .mobile-nav-menu a {
    padding: 14px 20px;
    font-size: 0.95rem;
  }
}

/* 작은 새로운 휴대폰 (iPhone SE, Galaxy A 시리즈 등) */
@media (max-width: 375px) and (min-height: 800px) {
  .dashboard {
    padding: 8px;
  }
  
  .dashboard-header {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 16px;
  }
  
  .dashboard-header h1 {
    font-size: 1.2rem;
  }
  
  .dashboard-header p {
    font-size: 0.85rem;
  }
  
  .mobile-menu-toggle {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
  
  .card {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 16px;
  }
  
  .card-header {
    margin: -16px -16px 16px -16px;
    padding: 16px;
    border-radius: 16px 16px 0 0;
  }
  
  .card-header h2 {
    font-size: 1.1rem;
  }
  
  .mobile-calendar-header {
    padding: 12px 16px;
    margin-bottom: 12px;
    border-radius: 12px;
  }
  
  .mobile-calendar-header .nav-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
  
  .mobile-calendar-header .month-display {
    font-size: 1rem;
  }
  
  .mobile-button-group {
    padding: 8px;
    border-radius: 12px;
    gap: 4px;
    margin: 12px 0;
    justify-content: space-between;
  }
  
  .mobile-button-group .btn-primary,
  .mobile-button-group .btn-secondary,
  .mobile-button-group .btn-success,
  .mobile-button-group .btn-danger,
  .mobile-button-group .btn-info,
  .mobile-button-group .btn-warning,
  .mobile-button-group a {
    padding: 5px 10px;
    font-size: 0.7rem;
    border-radius: 16px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
  }
  
  .calendar-grid {
    gap: 4px;
    padding: 8px;
    max-width: 90%;
  }
  
  .calendar-day {
    border-radius: 8px;
    font-size: 0.7rem;
    padding: 4px 2px;
    min-height: 32px;
    aspect-ratio: 0.8;
  }
  
  .calendar-day.has-schedule::after {
    font-size: 0.5rem;
  }
  
  .stat-widget {
    padding: 16px;
    border-radius: 16px;
  }
  
  .stat-widget .stat-value {
    font-size: 2rem;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.95rem;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-success,
  .btn-danger,
  .btn-info {
    padding: 12px 20px;
    font-size: 0.95rem;
    border-radius: 20px;
  }
  
  .table {
    font-size: 0.9rem;
    border-radius: 12px;
  }
  
  .table th,
  .table td {
    padding: 12px 16px;
  }
  
  .modal-content {
    padding: 24px;
    width: 94%;
    border-radius: 18px;
  }
  
  .login-container {
    padding: 28px 16px;
    margin: 10px;
    border-radius: 18px;
  }
  
  .login-header h1 {
    font-size: 2rem;
  }
  
  .fund-item {
    padding: 12px;
    border-radius: 12px;
  }
  
  .fund-item .fund-name {
    font-size: 0.9rem;
  }
  
  .fund-item .fund-amount {
    font-size: 1.05rem;
  }
  
  /* 그리드 레이아웃 최적화 */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .grid-4 {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  /* 모바일 네비게이션 최적화 */
  .mobile-nav-content {
    width: 280px;
    padding: 20px;
  }
  
  .mobile-nav-header {
    margin-bottom: 25px;
    padding-bottom: 18px;
  }
  
  .mobile-nav-header h3 {
    font-size: 1.2rem;
  }
  
  .mobile-nav-menu {
    gap: 8px;
  }
  
  .mobile-nav-menu a {
    padding: 12px 18px;
    font-size: 0.9rem;
  }
}

/* 초소형 모바일 (360px 이하) */
@media (max-width: 360px) {
  .dashboard {
    padding: 3px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  }
  
  .dashboard-header {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 12px;
  }
  
  .dashboard-header h1 {
    font-size: 1.1rem;
  }
  
  .card {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 12px;
  }
  
  .card-header {
    margin: -12px -12px 12px -12px;
    padding: 12px;
    border-radius: 12px 12px 0 0;
  }
  
  .card-header h2 {
    font-size: 0.95rem;
  }
  
  .stat-widget {
    padding: 12px;
    border-radius: 12px;
  }
  
  .stat-widget .stat-value {
    font-size: 1.6rem;
  }
  
  .mobile-button-group {
    padding: 4px;
    border-radius: 8px;
    gap: 2px;
    margin: 6px 0;
    justify-content: space-between;
  }
  
  .mobile-button-group .btn-primary,
  .mobile-button-group .btn-secondary,
  .mobile-button-group .btn-success,
  .mobile-button-group .btn-danger,
  .mobile-button-group .btn-info,
  .mobile-button-group .btn-warning,
  .mobile-button-group a {
    padding: 4px 6px;
    font-size: 0.6rem;
    border-radius: 12px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
  }
  
  .calendar-grid {
    gap: 1px;
    padding: 2px;
    max-width: 80%;
    margin: 0 auto;
  }
  
  .calendar-day {
    border-radius: 2px;
    font-size: 0.5rem;
    padding: 1px;
    min-height: 24px;
    aspect-ratio: 0.6;
  }
  
  .calendar-day.has-schedule::after {
    font-size: 0.45rem;
  }
  
  .table {
    font-size: 0.75rem;
    border-radius: 8px;
  }
  
  .table th,
  .table td {
    padding: 6px 8px;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-success,
  .btn-danger,
  .btn-info {
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: 15px;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 10px 12px;
    font-size: 0.85rem;
    border-radius: 8px;
  }
  
  .login-container {
    padding: 18px 8px;
    margin: 3px;
    border-radius: 12px;
  }
  
  .login-header h1 {
    font-size: 1.6rem;
  }
  
  .fund-item {
    padding: 8px;
    border-radius: 8px;
  }
  
  .fund-item .fund-name {
    font-size: 0.8rem;
  }
  
  .fund-item .fund-amount {
    font-size: 0.95rem;
  }
}

