@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

:root {
  --primary: #1A3A5C;
  --accent: #2C5F8A;
  --accent-hover: #1E4D75;
  --accent-light: #EBF3FA;
  --success: #00B894;
  --warning: #FDCB6E;
  --info: #74B9FF;
  --bg: #F8F9FA;
  --card: #FFFFFF;
  --border: #E9ECEF;
  --text: #2D3436;
  --text-light: #636E72;
  --text-muted: #B2BEC3;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.2s ease;
}

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

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

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

/* ===== Layout ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header / Navbar ===== */
.navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 8px;
  overflow: hidden;
}

.navbar-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-brand span {
  color: var(--accent);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-user .user-name {
  font-size: 0.9rem;
  color: var(--text-light);
}

.btn-logout {
  background: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-nav-link {
  font-size: 0.85rem;
  color: var(--text-light);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-nav-link:hover {
  color: var(--accent);
}

body.admin-body .btn-nav-link {
  color: rgba(255,255,255,0.7);
}

body.admin-body .btn-nav-link:hover {
  color: #fff;
}

body.admin-body .navbar-user .user-name {
  color: rgba(255,255,255,0.8);
}

body.admin-body .btn-logout {
  border-color: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.7);
}

body.admin-body .btn-logout:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Login Page ===== */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
}

.login-card {
  background: var(--card);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card .logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.login-card .logo span {
  color: var(--accent);
}

.login-card .subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 36px;
}

.login-card .desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 32px;
  line-height: 1.7;
}

.btn-naver {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  background: #03C75A;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-naver:hover {
  background: #02B350;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(3,199,90,0.3);
}

.btn-naver svg {
  width: 20px;
  height: 20px;
}

.login-footer {
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== Page Header ===== */
.page-header {
  padding: 32px 0 24px;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.page-header p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ===== Stats Cards ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 4px;
}

.stat-card.accent .stat-number {
  color: var(--accent);
}

.stat-card.success .stat-number {
  color: var(--success);
}

.stat-card.info .stat-number {
  color: var(--info);
}

.stat-card.stat-pending { background: #ECEFF1; }
.stat-card.stat-pending .stat-number { color: #78909C !important; }

.stat-card.stat-working { background: #FFF8E1; }
.stat-card.stat-working .stat-number { color: #F9A825 !important; }

.stat-card.stat-revision { background: #FFEBEE; }
.stat-card.stat-revision .stat-number { color: #E53935 !important; }

.stat-card.stat-completed { background: #E8F5E9; }
.stat-card.stat-completed .stat-number { color: #4CAF50 !important; }

.stat-card[onclick] {
  cursor: pointer;
  transition: var(--transition);
}

.stat-card[onclick]:hover {
  box-shadow: var(--shadow-hover);
}

.stat-card.active-filter {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: var(--accent-light);
}

/* ===== Cards ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.card-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.card-body {
  padding: 24px;
}

/* ===== Order List ===== */
.order-list {
  list-style: none;
}

.order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

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

.order-item:hover {
  background: var(--bg);
}

.order-info {
  flex: 1;
}

.order-info .order-id {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.order-info .order-product {
  font-weight: 500;
  font-size: 0.95rem;
}

.order-info .order-date {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 2px;
}

.order-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-meta .arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
}

/* ===== Status Badge ===== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.badge-waiting {
  background: #F2F4F6;
  color: #8B95A1;
}

.badge-uploaded {
  background: #E8F0FE;
  color: #1565C0;
}

.badge-working {
  background: #FFF3E0;
  color: #E65100;
}

.badge-completed {
  background: #E8F5E9;
  color: #2E7D32;
}

.badge-revision {
  background: #FFEBEE;
  color: #C62828;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-light);
}

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

.btn-success:hover {
  background: #00A381;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ===== Upload Area ===== */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.upload-area .upload-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.upload-area .upload-text {
  color: var(--text-light);
  font-size: 0.9rem;
}

.upload-area .upload-text strong {
  color: var(--accent);
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ===== File List ===== */
.file-list {
  list-style: none;
  margin-top: 16px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.file-item .file-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.file-item .file-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item .file-size {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: 12px;
  white-space: nowrap;
}

.file-item .file-actions {
  display: flex;
  gap: 8px;
  margin-left: 12px;
}

.file-item .btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.file-item .btn-icon:hover {
  color: var(--accent);
  background: var(--accent-light);
}

/* ===== Order Detail ===== */
.order-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.order-detail-header .order-title h1 {
  font-size: 1.3rem;
}

.order-detail-header .order-title .order-number {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.order-status-flow {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 80px;
  position: relative;
}

.status-step .step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  transition: var(--transition);
}

.status-step.active .step-circle {
  background: var(--accent);
  color: #fff;
}

.status-step.done .step-circle {
  background: var(--success);
  color: #fff;
}

.status-step .step-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.status-step.active .step-label,
.status-step.done .step-label {
  color: var(--text);
  font-weight: 500;
}

.status-step + .status-step::before {
  content: '';
  position: absolute;
  top: 18px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: -1;
}

.status-step.done + .status-step::before,
.status-step.done + .status-step.active::before {
  background: var(--success);
}

/* ===== Section Grid ===== */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

/* ===== Textarea ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--card);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44,95,138,0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* ===== Admin Theme ===== */
body.admin-body {
  background: #F0F2F5;
}

body.admin-body .navbar {
  background: #1A3A5C;
  border-bottom: none;
}

body.admin-body .navbar-brand {
  color: #fff;
}

body.admin-body .navbar-brand span {
  color: rgba(255,255,255,0.6);
}

body.admin-body #user-nav a,
body.admin-body #user-nav span,
body.admin-body #user-nav button {
  color: rgba(255,255,255,0.8);
}

body.admin-body .admin-table th {
  background: #1A3A5C;
  color: rgba(255,255,255,0.9);
  border-bottom: none;
}

body.admin-body .admin-table tr:hover td {
  background: #F0F2F5;
}

.urgent-label {
  color: #E53935;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 4px;
}

.row-urgent td {
  background: #FFE8E8;
}

.row-urgent:hover td {
  background: #FFD5D5 !important;
}

.row-notice td {
  background: #F0F7FF;
}

.row-notice:hover td {
  background: #E3F0FF !important;
}

/* ===== Date Quick Buttons ===== */
.date-quick-btns {
  display: flex;
  gap: 4px;
}

.btn-date-quick {
  padding: 5px 10px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
  font-family: inherit;
}

.btn-date-quick:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-date-quick.active {
  background: #1A3A5C;
  color: #fff;
  border-color: #1A3A5C;
}

/* ===== Admin Tabs ===== */
.admin-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.admin-tab {
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-tab:hover {
  color: var(--text);
}

.admin-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.tab-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* ===== Revision Section ===== */
.revision-card {
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  overflow: hidden;
}

.revision-card .card-header {
  background: var(--accent-light);
  border-bottom-color: var(--accent);
}

.revision-card .card-header h2 {
  color: var(--accent);
}

.revision-history {
  list-style: none;
}

.revision-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

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

.revision-item .revision-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.revision-item .revision-content {
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ===== Admin Table ===== */
.table-wrapper {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th {
  background: var(--bg);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: var(--bg);
}

.admin-table .clickable {
  cursor: pointer;
}

/* ===== Select ===== */
.form-select {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--card);
  cursor: pointer;
  transition: var(--transition);
}

.form-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-bar .search-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
}

.filter-bar .search-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.9rem;
}

/* ===== Loading ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left-color: #E53935;
}

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

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

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--card);
  border-radius: var(--radius);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

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

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  line-height: 1;
}

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

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ===== Download Section ===== */
.download-section {
  background: #F0FFF4;
  border: 1px solid #C6F6D5;
  border-radius: var(--radius);
  padding: 24px;
}

.download-section h3 {
  color: var(--success);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-download-all {
  margin-top: 16px;
}

/* ===== Responsive - Tablet ===== */
@media (max-width: 768px) {
  .section-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .order-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 16px;
  }

  .order-meta {
    width: 100%;
    justify-content: space-between;
  }

  .navbar {
    padding: 0 16px;
    height: 56px;
  }

  .navbar-brand {
    font-size: 1rem;
  }

  .login-card {
    margin: 16px;
    padding: 32px 24px;
  }

  .order-status-flow {
    padding: 16px 12px;
  }

  .status-step .step-label {
    font-size: 0.65rem;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-bar .search-input {
    width: 100%;
  }

  .admin-table {
    font-size: 0.8rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 10px 8px;
  }

  .card-body {
    padding: 16px;
  }

  .card-header {
    padding: 14px 16px;
  }
}

/* ===== Responsive - Mobile (토스 스타일) ===== */
@media (max-width: 480px) {
  body {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    background: #F2F4F6;
    letter-spacing: -0.3px;
  }

  .container {
    padding: 0 20px;
  }

  /* 네비게이션 - 토스 헤더 */
  .navbar {
    padding: 0 20px;
    height: 56px;
    background: #fff;
    box-shadow: none;
    border-bottom: 1px solid #F2F4F6;
  }

  body:not(.admin-body) .navbar {
    background: #fff;
  }

  body:not(.admin-body) .navbar-brand {
    color: #191F28;
  }

  body:not(.admin-body) .navbar-brand span {
    color: var(--accent);
  }

  .navbar-brand {
    font-size: 1.05rem;
    font-weight: 700;
    gap: 4px;
    white-space: nowrap;
    letter-spacing: -0.5px;
  }

  .navbar-brand span {
    font-size: 0.75rem;
    font-weight: 600;
  }

  .navbar-user {
    gap: 10px;
  }

  .navbar-user .user-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    color: #4E5968;
  }

  body:not(.admin-body) .navbar-user .user-name {
    color: #4E5968;
  }

  .btn-logout {
    padding: 6px 14px;
    font-size: 0.75rem;
    border-radius: 8px;
    background: #F2F4F6;
    color: #4E5968;
    border: none;
    font-weight: 500;
  }

  body:not(.admin-body) .btn-logout {
    background: #F2F4F6;
    color: #4E5968;
  }

  /* 탭 */
  .admin-tab {
    padding: 12px 18px;
    font-size: 0.9rem;
    font-weight: 500;
  }

  .admin-tab.active {
    font-weight: 700;
  }

  /* 페이지 헤더 - 토스 대형 타이틀 */
  .page-header {
    padding: 24px 0 16px;
  }

  .page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.8px;
    color: #191F28;
  }

  .page-header p {
    font-size: 0.8rem;
    margin-top: 4px;
    color: #8B95A1;
  }

  /* 통계 카드 - 토스 가로 스크롤 칩 */
  .stats-row {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0 4px;
  }

  .stats-row::-webkit-scrollbar { display: none; }

  .stat-card {
    padding: 14px 18px;
    border-radius: 14px;
    min-width: 76px;
    flex-shrink: 0;
    border: none;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }

  .stat-card.active-filter {
    background: #191F28;
    box-shadow: none;
  }

  .stat-card.active-filter .stat-number {
    color: #fff !important;
  }

  .stat-card.active-filter .stat-label {
    color: rgba(255,255,255,0.7) !important;
  }

  .stat-card .stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: #191F28;
  }

  .stat-card .stat-label {
    font-size: 0.7rem;
    margin-top: 4px;
    font-weight: 500;
    color: #8B95A1;
  }

  /* 카드 - 토스 카드 */
  .card {
    border-radius: 20px;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
  }

  .card-header {
    padding: 18px 20px 14px;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: none;
    background: #fff;
  }

  .card-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #191F28;
  }

  .card-body {
    padding: 4px 20px 20px;
  }

  /* 주문 리스트 - 토스 리스트 */
  .order-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }

  .order-item {
    padding: 20px;
    gap: 8px;
    border-radius: 0;
    background: #fff;
    border: none;
    border-bottom: 1px solid #F2F4F6;
    box-shadow: none;
  }

  .order-item:first-child {
    border-radius: 20px 20px 0 0;
  }

  .order-item:last-child {
    border-radius: 0 0 20px 20px;
    border-bottom: none;
  }

  .order-item:only-child {
    border-radius: 20px;
  }

  .order-item:active {
    background: #F8F9FA;
  }

  .order-info .order-id {
    font-size: 0.75rem;
    color: #8B95A1;
    font-weight: 400;
  }

  .order-info .order-product {
    font-size: 1rem;
    font-weight: 600;
    margin: 4px 0;
    color: #191F28;
    letter-spacing: -0.3px;
  }

  .order-info .order-date {
    font-size: 0.75rem;
    color: #8B95A1;
  }

  /* 배지 - 토스 스타일 */
  .badge {
    padding: 4px 10px;
    font-size: 0.7rem;
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: -0.2px;
  }

  .badge-waiting {
    background: #E3F2FD;
    color: #1565C0;
  }

  .badge-working {
    background: #FFF3E0;
    color: #E65100;
  }

  .badge-completed {
    background: #E6F7ED;
    color: #2E7D32;
  }

  .badge-revision {
    background: #FFEBEE;
    color: #C62828;
  }

  .badge-uploaded {
    background: #E8F0FE;
    color: #1565C0;
  }

  /* 주문 상세 - 토스 상세 */
  .order-detail-header {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
    padding: 0;
  }

  .order-detail-header .order-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.8px;
    color: #191F28;
  }

  .order-detail-header .order-title .order-number {
    font-size: 0.8rem;
    margin-top: 4px;
    color: #8B95A1;
  }

  /* 상태 플로우 - 토스 스텝 */
  .order-status-flow {
    padding: 24px 16px;
    margin-bottom: 24px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: none;
  }

  .status-step {
    min-width: 70px;
  }

  .status-step .step-circle {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
    margin-bottom: 8px;
    box-shadow: none;
    border: 2px solid #E5E8EB;
  }

  .status-step.done .step-circle,
  .status-step.active .step-circle {
    border-color: transparent;
  }

  .status-step .step-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #8B95A1;
  }

  .status-step.active .step-label,
  .status-step.done .step-label {
    color: #191F28;
  }

  .status-step + .status-step::before {
    top: 18px;
    height: 2px;
    background: #E5E8EB;
  }

  /* 업로드 영역 - 토스 스타일 */
  .upload-area {
    padding: 36px 20px;
    border-radius: 16px;
    border: 2px dashed #D1D6DB;
    background: #F8F9FA;
  }

  .upload-area .upload-icon {
    font-size: 2.4rem;
    margin-bottom: 12px;
  }

  .upload-area .upload-text {
    font-size: 0.9rem;
    color: #4E5968;
    line-height: 1.6;
  }

  /* 파일 리스트 */
  .file-item {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    background: #F8F9FA;
    margin-bottom: 8px;
    border: none;
  }

  .file-item .file-size {
    font-size: 0.75rem;
    color: #8B95A1;
  }

  /* 폼 - 토스 인풋 */
  .form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4E5968;
  }

  .form-control {
    padding: 14px 16px;
    font-size: 0.95rem;
    border-radius: 12px;
    border: 1px solid #E5E8EB;
    background: #fff;
    color: #191F28;
  }

  .form-control:focus {
    border-color: #3182F6;
    box-shadow: none;
  }

  .form-control::placeholder {
    color: #ADB5BD;
  }

  textarea.form-control {
    min-height: 90px;
  }

  /* 버튼 - 토스 버튼 */
  .btn {
    padding: 14px 24px;
    font-size: 0.95rem;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: -0.3px;
    border: none;
  }

  .btn-primary {
    background: #3182F6;
    box-shadow: none;
  }

  .btn-primary:hover,
  .btn-primary:active {
    background: #1B6AE0;
  }

  .btn-secondary {
    background: #F2F4F6;
    color: #4E5968;
  }

  .btn-success {
    background: #3182F6;
    box-shadow: none;
  }

  .btn-lg {
    padding: 16px 28px;
    font-size: 1rem;
    border-radius: 14px;
  }

  .btn-sm {
    padding: 8px 14px;
    font-size: 0.8rem;
    border-radius: 8px;
  }

  .btn-block {
    border-radius: 14px;
  }

  /* 수정요청 카드 - 토스 */
  .revision-card {
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: none;
  }

  .revision-item {
    padding: 16px 0;
  }

  .revision-item .revision-date {
    font-size: 0.8rem;
  }

  .revision-item .revision-content {
    font-size: 0.9rem;
    margin-top: 6px;
    color: #333D4B;
    line-height: 1.5;
  }

  /* 다운로드 - 토스 */
  .download-section {
    padding: 24px 20px;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    background: #fff;
  }

  .download-section h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    font-weight: 700;
    color: #191F28;
  }

  .btn-download-all {
    border-radius: 14px !important;
    margin-top: 14px;
    background: #3182F6 !important;
  }

  /* 로그인 - 토스 온보딩 */
  .login-wrapper {
    background: #fff;
  }

  .login-card {
    margin: 0;
    padding: 60px 28px 40px;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .login-card .logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: #191F28;
  }

  .login-card .logo span {
    color: #3182F6;
  }

  .login-card .subtitle {
    font-size: 0.9rem;
    color: #8B95A1;
    margin-bottom: 40px;
  }

  .login-card .desc {
    font-size: 0.9rem;
    margin-bottom: 40px;
    line-height: 1.8;
    color: #4E5968;
  }

  .btn-naver {
    padding: 16px 28px;
    font-size: 1rem;
    border-radius: 14px;
    font-weight: 600;
  }

  .login-footer {
    font-size: 0.75rem;
    color: #ADB5BD;
  }

  /* 모달 - 토스 바텀시트 */
  .modal-overlay {
    align-items: flex-end;
    background: rgba(0,0,0,0.4);
  }

  .modal {
    width: 100%;
    max-width: 100%;
    border-radius: 24px 24px 0 0;
    margin: 0;
    max-height: 90vh;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  }

  .modal-header {
    padding: 24px 24px 16px;
    position: relative;
    border-bottom: none;
  }

  .modal-header::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #D1D6DB;
    border-radius: 2px;
  }

  .modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #191F28;
  }

  .modal-body {
    padding: 0 24px 16px;
  }

  .modal-footer {
    padding: 16px 24px 28px;
    gap: 10px;
    border-top: none;
  }

  .modal-footer .btn {
    flex: 1;
    border-radius: 14px;
    padding: 16px;
  }

  /* 토스트 - 토스 스낵바 */
  .toast-container {
    top: auto;
    bottom: 24px;
    right: 20px;
    left: 20px;
  }

  .toast {
    padding: 16px 20px;
    font-size: 0.9rem;
    border-radius: 16px;
    background: #191F28;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    border-left: none;
  }

  .toast.error {
    background: #191F28;
  }

  /* 필터 */
  .filter-bar {
    gap: 10px;
    margin-bottom: 16px;
  }

  .filter-bar .search-input {
    min-width: 0;
    padding: 12px 16px;
    font-size: 0.9rem;
    border-radius: 12px;
    border: none;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }

  .form-select {
    padding: 12px 14px;
    font-size: 0.85rem;
    width: 100%;
    border-radius: 12px;
    border: none;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    color: #191F28;
  }

  /* 관리자 테이블 → 토스 카드 리스트 */
  .admin-table thead { display: none; }

  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table tr {
    background: #fff;
    border: none;
    border-radius: 16px;
    margin-bottom: 10px;
    padding: 18px 20px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }

  .admin-table tr:active {
    background: #F8F9FA;
  }

  .admin-table td {
    padding: 2px 0;
    border: none;
    font-size: 0.9rem;
    color: #4E5968;
  }

  .admin-table td:first-child {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: #191F28;
  }

  .admin-table tr:hover td { background: transparent; }

  /* 섹션 그리드 */
  .section-grid {
    gap: 16px;
    margin-bottom: 16px;
  }

  /* 인풋 공통 */
  .search-input {
    border-radius: 12px;
    border: 1px solid #E5E8EB;
    padding: 12px 16px;
    background: #fff;
    font-size: 0.9rem;
  }

  .search-input:focus {
    border-color: #3182F6;
    box-shadow: none;
    outline: none;
  }

  /* 안내 문구 토스 스타일 */
  .order-status-flow + div [style*="background:#FFF8E1"] {
    border-radius: 14px !important;
    border: none !important;
    background: #F2F4F6 !important;
    color: #4E5968 !important;
  }

  /* 날짜 퀵 버튼 */
  .date-quick-btns {
    display: flex;
    gap: 4px;
  }

  .btn-date-quick {
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    background: #F2F4F6;
    border: none;
    color: #4E5968;
    font-weight: 500;
  }

  .btn-date-quick.active {
    background: #191F28;
    color: #fff;
  }
}

/* ===== Safe area (노치 대응) ===== */
@supports (padding: env(safe-area-inset-bottom)) {
  .navbar {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  .container {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  .btn-block {
    margin-bottom: env(safe-area-inset-bottom);
  }
}

/* ===== 터치 친화적 ===== */
@media (hover: none) and (pointer: coarse) {
  .order-item {
    min-height: 60px;
  }

  .btn {
    min-height: 44px;
  }

  .form-control,
  .form-select {
    min-height: 44px;
  }

  .file-item .btn-icon {
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .admin-table tr {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(44,95,138,0.1);
  }
}
