:root {
  font-family: 'Inter', system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: dark;
  color: #f8fafc;
  background-color: #0f172a;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  background-color: #0f172a; /* 초기 배경색 보장 */
}

* {
  box-sizing: border-box;
}

#root {
  width: 100%;
  height: 100%;
}.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    /* 야구장 밤 분위기를 내는 고급 그라데이션 백업 */
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(129, 140, 248, 0.05) 0%, transparent 50%);
    z-index: 0;
}

.login-container .glass-card {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 400px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    display: flex;
    flex-direction: column;
    gap: 24px;
    color: #f8fafc;
}

@media (max-width: 480px) {
    .login-container .glass-card {
        padding: 30px 20px;
        gap: 20px;
    }
    
    .login-header h1 {
        font-size: 1.75rem;
    }
}

.login-header {
    text-align: center;
}

.login-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    color: #94a3b8;
    font-size: 0.9rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #cbd5e1;
}

.input-group input {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

.login-button {
    padding: 12px;
    background: linear-gradient(90deg, #0ea5e9, #6366f1);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.login-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.alert-message {
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.alert-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hint-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    opacity: 1;
}

.login-footer {
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
}

.login-footer a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}.sidebar {
    width: 280px;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    padding: 32px 16px;
    gap: 32px;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
    border-radius: 10px;
}

.sidebar-logo h2 {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

/* Store Selector */
.store-selector-container {
    padding: 0 4px;
}

.store-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 10px 16px;
    transition: all 0.3s;
}

.store-selector-wrapper:hover {
    border-color: #38bdf8;
    background: rgba(15, 23, 42, 0.8);
}

.store-icon {
    color: #38bdf8;
}

.store-select {
    background: transparent;
    border: none;
    color: #f8fafc;
    font-size: 0.95rem;
    font-weight: 600;
    width: 100%;
    outline: none;
    cursor: pointer;
}

.store-select option {
    background: #0f172a;
    color: #f8fafc;
}

/* Navigation Links */
.nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-group-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 24px 16px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #f8fafc;
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
    color: #38bdf8;
    box-shadow: inset 2px 0 0 #38bdf8;
}

.logout-item {
    color: #f87171;
    margin-top: auto;
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

/* User Profile Section */
.user-profile-section {
    width: 100%;
}

.user-info-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(56, 189, 248, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    margin-bottom: 8px;
}

.user-icon {
    color: #38bdf8;
}

.user-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f1f5f9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 모바일 화면에서 사이드바 숨김 - 강력한 초기화 */
@media (max-width: 768px) {
    .sidebar {
        display: none !important;
        position: absolute;
        visibility: hidden;
        pointer-events: none;
        width: 0 !important;
        height: 0 !important;
    }
}.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: none;
    /* 기본적으로 숨김 */
    grid-template-columns: repeat(5, 1fr);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 500;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.mobile-nav-item.active {
    color: #38bdf8;
}

.mobile-nav-item.logout {
    color: #f87171;
}

/* 모바일 화면에서만 표시 */
@media (max-width: 768px) {
    .mobile-nav {
        display: grid;
    }
}@page {
    size: A4 portrait;
    margin: 1.5cm 1cm 2cm 1cm; /* 하단 푸터 공간을 위해 마진 추가 */
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    color: #f8fafc;
}

.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    padding: 32px 20px;
    gap: 40px;
}

.sidebar-logo h2 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
}

.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

/* 데스크톱에서 대시보드 메인 영역 좌측 여백 추가 */
.dashboard-main-area {
    padding-left: 40px;
}

.content-header {
    margin-bottom: 32px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.date-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 8px 16px;
    border-radius: 12px;
}

.date-selector select {
    background: transparent;
    border: none;
    color: #f8fafc;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    padding: 4px;
}

.date-selector select option {
    background-color: #1e293b;
    color: #f8fafc;
}

.content-header h1 {
    font-size: 1.8rem;
    margin: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-user-tag {
    font-size: 0.85rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

/* 직영/임대 매출 분담 스타일 */
.operating-breakdown {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 4px 0 8px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.operating-breakdown span {
    font-weight: 500;
}

/* 모바일에서는 숨김 (PC에서만 상세 분석용으로 사용) */
@media (max-width: 768px) {
    .pc-only {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px 16px !important;
    }

    /* 모바일에서 대시보드 좌측 여백 제거 및 하단 여백 축소 */
    .dashboard-main-area {
        padding-left: 0 !important;
        padding-top: 5px !important;
    }

    .content-header {
        margin-bottom: 6px !important; /* 극한 축소 */
    }

    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .content-header h1 {
        font-size: 1.5rem;
        word-break: keep-all;
    }

    .date-selector {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 10px 12px;
    }

    .date-selector select {
        font-size: 1rem;
        padding: 8px 4px; /* 터치하기 편하게 여백 추가 */
    }

    /* 모바일에서 stats-grid를 1열(풀 너비)로 변경하여 당일 매출 강조 */
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        padding-bottom: 8px;
    }

    .hide-on-mobile,
    .analysis-link-btn,
    .print-action-btn {
        display: none !important;
    }

    .stat-card .stat-trend {
        font-size: 0.7rem !important;
    }

    /* 모바일에서 입장객 수 섹션 중앙 정렬 */
    .attendance-info-box {
        justify-content: space-between !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .attendance-input-field,
    .attendance-value-text {
        text-align: right !important;
        flex: 1;
    }

    /* 모바일 매장 필터 스타일 */
    .mobile-store-filter {
        transition: all 0.3s ease;
    }

    .mobile-store-filter:active {
        transform: scale(0.98);
        background: rgba(30, 41, 59, 0.8) !important;
    }

    .mobile-store-filter select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right center;
        padding-right: 24px !important;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
    
    .desktop-only {
        display: block !important;
    }
}

/* 드릴다운 매장 목록 스타일 */
.store-drilldown-modal {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.drilldown-list {
    padding: 12px;
    overflow-y: auto;
}

.drilldown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drilldown-item:hover, .drilldown-item:active {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
}

.drilldown-item-name {
    font-weight: 600;
    color: #f8fafc;
}

.drilldown-item-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px;
    margin-bottom: 32px;
}

/* 데스크톱 전용 통계 그리드 강제 4열 배치 */
.stats-grid.desktop-only {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
}

.date-selector.disabled {
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
}

.date-selector.disabled select {
    cursor: not-allowed;
    pointer-events: none;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: #94a3b8;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
}

.stat-trend.up {
    color: #4ade80;
}

.stat-trend.down {
    color: #f87171;
}

.stat-trend {
    font-size: 0.8rem;
}


.recent-activities {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px;
}

.activities-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.activities-header h3 {
    font-size: 1.5rem;
    font-weight: 900;
    color: #f8fafc;
    margin: 0;
}

.activities-legend {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.activities-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: grid;
    grid-template-columns: 1.5fr 3.5fr 80px 100px 100px 80px;
    align-items: center;
    padding: 16px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.activities-list.is-admin .activity-item {
    grid-template-columns: 1.2fr 0.8fr 0.8fr 0.9fr 0.9fr 0.9fr 90px 90px 90px 90px;
    gap: 12px;
}

.col-sales-daily,
.col-sales-prev1,
.col-sales-prev2,
.col-sales-monthly,
.col-sales-yearly {
    text-align: right;
    font-size: 0.85rem;
}

.val-sales-highlight {
    font-weight: 700;
    color: #38bdf8;
}

.val-sales-sub {
    font-weight: 500;
    color: #cbd5e1;
}

.col-inventory {
    width: 80px;
    text-align: center;
}

.col-status {
    width: 80px;
    text-align: center;
}

.activity-item.header-item {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 12px;
}

.activity-item.row-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.col-name h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #f8fafc;
    transition: color 0.2s;
}

.col-name h4.store-link-hover:hover {
    color: #38bdf8;
    text-decoration: underline;
}

.sales-details-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 500;
}

.divider {
    color: rgba(255, 255, 255, 0.1);
}

.val-cash {
    color: #f8fafc;
}

.val-card {
    color: #38bdf8;
}

.val-variance {
    font-weight: 700;
}

.val-variance.pos {
    color: #4ade80;
}

.val-variance.neg {
    color: #f87171;
}

.no-data {
    color: #475569;
    font-style: italic;
    font-size: 0.85rem;
}


.inventory-count-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.inventory-count-badge.warning {
    background: rgba(234, 179, 8, 0.1);
    color: #fbbf24;
}

.inventory-count-badge.warning.actionable {
    cursor: pointer;
    transition: all 0.2s;
}

.inventory-count-badge.warning.actionable:hover {
    background: rgba(234, 179, 8, 0.2);
    transform: scale(1.05);
}

.inventory-count-badge.good {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
}

.activity-status {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    text-align: center;
    font-weight: 700;
    display: inline-block;
    width: fit-content;
}

.status-pending {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.status-approved {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

@media (max-width: 900px) {
    .recent-activities {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .activity-item {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 12px 4px;
    }

    .activity-item.header-item {
        display: none;
    }

    .col-inventory,
    .col-status,
    .col-actions {
        text-align: right;
    }
}

/* 매니저용 모바일 요약 카드 스타일 */
.mobile-summary-grid {
    display: none;
    grid-template-columns: repeat(4, 140px);
    gap: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    grid-auto-flow: column;
}

@media (max-width: 768px) {
    .mobile-summary-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 140px) !important;
        grid-template-rows: 1fr !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
    }

    .stats-overview {
        display: none;
        /* 모바일에서는 요약 카드로 대체 */
    }
}

/* Event Section Mobile Optimization */
.event-label-wrapper {
    min-width: 220px;
}

.event-actions-wrapper {
    min-width: 300px;
}

@media (max-width: 768px) {
    .event-input-container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important; /* 기존 16px에서 축소 */
        padding: 10px !important; /* 기존 16px에서 축소 */
    }

    .event-label-wrapper {
        min-width: auto !important;
        width: 100%;
        justify-content: space-between;
        margin-bottom: 8px;
    }

    .event-actions-wrapper {
        min-width: auto !important;
        width: 100%;
        flex-direction: column;
        align-items: stretch !important;
    }
    
    .event-actions-wrapper select,
    .event-actions-wrapper input {
        width: 100% !important;
        max-width: none !important;
    }

    .event-inputs-wrapper {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 12px !important;
    }

    /* Sales Card Two-Line Mode for Mobile */
    .mobile-compact-card {
        flex-direction: column !important;
        align-items: center !important; /* 가운데 정렬로 변경하여 좁은 공간 최적화 */
        justify-content: center !important;
        padding: 10px 6px !important; /* 패딩 대폭 축소 */
        gap: 4px !important;
    }

    .mobile-compact-card .stat-label {
        font-size: 0.75rem !important; /* 라벨 크기 축소 */
        margin-bottom: 2px !important;
        color: #94a3b8;
        width: 100%;
        text-align: center; /* 텍스트 중앙 정렬 */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-compact-card .stat-value {
        font-size: 0.95rem !important; /* 금액 크기 대폭 축소하여 줄바꿈 방지 */
        font-weight: 800 !important;
        white-space: nowrap !important;
        width: 100%;
        text-align: center; /* 중앙 정렬 */
        letter-spacing: -0.02em; /* 자간 축소 */
    }
    
    .mobile-compact-card .stat-trend {
        display: none !important; 
    }

    /* Reset wrapper style for center mode */
    .mobile-compact-card > div {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .stat-variance {
        font-size: 0.65rem !important; /* 하단 텍스트 크기 축소 */
        margin-top: 2px;
        white-space: nowrap;
    }

    /* 섹션 간격 최적화 */
    .daily-event-section {
        margin-top: 5px !important; /* 극한 축소 */
        margin-bottom: 0 !important;
    }

    .sales-stats-wrapper {
        margin-top: 5px !important; /* 극한 축소 */
        margin-bottom: 0 !important;
    }

    .status-cards-grid {
        margin-top: 5px !important; /* 극한 축소 */
    }
}

.mobile-summary-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
}

.mobile-summary-card .icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.mobile-summary-card .label {
    font-size: 0.85rem;
    color: #cbd5e1;
    font-weight: 800;
}

.mobile-summary-card .value {
    font-size: 1.15rem;
    font-weight: 900;
    color: #ffffff;
}

.mobile-summary-card.clickable {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.mobile-summary-card.clickable:active {
    transform: scale(0.95);
}

.col-actions {
    display: flex;
    justify-content: center;
}

.icon-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.icon-button:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    transform: translateY(-2px);
}

.daily-event-section {
    animation: fadeIn 0.5s ease-out;
}

.event-input-container {
    transition: all 0.3s ease;
}

.event-input-container:hover {
    border-color: rgba(56, 189, 248, 0.5) !important;
    background: rgba(255, 255, 255, 0.05);
}

.event-input-field::placeholder {
    color: #475569;
    font-size: 0.9rem;
}

.event-input-field:focus {
    color: #38bdf8 !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.order-summary-modal {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
}

/* Print Styles - 4th Attempt (External Print Header Control) */
.print-only-title {
    display: none;
    /* 화면에서는 절대 안 보임 */
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.print-button {
    background: #38bdf8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.print-button:hover {
    background: #0ea5e9;
    transform: translateY(-2px);
}

.close-button {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.close-button:hover {
    color: #f8fafc;
}

.modal-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.store-order-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.store-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.store-order-header h3 {
    margin: 0;
    color: #38bdf8;
    font-size: 1.1rem;
}

.order-time {
    font-size: 0.85rem;
    color: #94a3b8;
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
}

.order-items-table th {
    text-align: left;
    color: #64748b;
    font-size: 0.8rem;
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.order-items-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: #e2e8f0;
}

.qty-cell {
    font-weight: 700;
    color: #38bdf8;
}

.no-data-msg {
    text-align: center;
    padding: 48px;
    color: #64748b;
    font-size: 1.1rem;
}

/* Print Styles - 5th Attempt (Precise Parent/Child Control) */
.print-only-title,
.print-footer {
    display: none;
}

@media print {
    /* [1] 전역 레이아웃 제약 해제 - 인쇄 시 모든 높이 제한 해제 */
    html, body {
        height: auto !important;
        min-height: 100% !important;
        overflow: visible !important;
        background: white !important;
        color: black !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 210mm !important; /* Force Portrait Width */
    }

    /* 부모 컨테이너가 인쇄 시 내용을 자르지 않도록 설정하며 너비를 세로 규격으로 고정 */
    .layout-container,
    .main-content,
    .dashboard-container,
    .dashboard-main-area,
    .modal-overlay {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        position: static !important;
        padding: 0 !important;
        margin: 0 auto !important;
        width: 190mm !important; 
        max-width: 190mm !important;
        min-width: 190mm !important;
        flex: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* 발주 내역 모달을 테이블 구조로 만들어 다중 페이지 번호 지원 */
    .order-summary-modal {
        display: table !important; /* 핵심: 테이블 구조로 전환 */
        table-layout: fixed !important;
        width: 190mm !important;
        height: auto !important;
        border-collapse: collapse !important;
        background: white !important;
        color: black !important;
        border: none !important;
        margin: 0 auto !important;
        counter-reset: page; /* 모달 시작 시 페이지 카운트 초기화 */
    }

    .modal-content,
    .print-area {
        display: table-row-group !important; /* 핵심: 본문 영역 */
        width: 100% !important;
    }

    /* 모든 자식 요소들에 대해 overflow 제약 해제 */
    .print-area * {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }

    body {
        counter-reset: page;
        overflow: visible !important;
    }

    /* 페이지 번호 푸터 스타일 */
    .print-footer {
        display: table-footer-group !important; /* 핵심: 각 페이지 하단에 반복 출력 */
        position: static !important;
        width: 100% !important;
        background: white !important;
        padding: 0 !important;
        border: none !important;
    }

    .print-footer > div {
        display: block;
        text-align: center;
        padding: 5mm 0;
    }

    .page-number::after {
        counter-increment: page;
        content: "페이지 " counter(page);
    }

    .page-guide {
        display: block !important;
        font-size: 8pt !important;
        color: #999 !important;
        margin-bottom: 3mm !important;
    }

    /* [2] 숨김 설정: 화면 전용 요소들 차단 (대시보드와 범용 요소 분리) */
    
    /* 1. 사이드바 및 네비게이션 (전역 공통 숨김) */
    .sidebar,
    .mobile-nav,
    .nav,
    nav,
    .sidebar-overlay {
        display: none !important;
    }

    /* 2. 대시보드 전용 요소 (대시보드 페이지에서만 숨김) */
    .dashboard-main-area,
    .content-header:not(.sales-management-header),
    .stats-grid,
    .recent-activities:not(.print-report-section):not(.is-admin), /* Admin confirmation table in Sales.jsx should NOT be hidden */
    .mobile-summary-grid,
    .date-selector,
    .daily-event-section,
    .dashboard-integrated-header {
        display: none !important;
    }

    /* 3. 기타 범용 화면 요소 */
    .full-width-button,
    input[type="date"],
    .desktop-only:not(.is-admin), /* Sales.jsx admin table is desktop-only but needs to be printed */
    .no-print {
        display: none !important;
    }

    /* 인쇄하기 버튼 등 전역 버튼 숨김 */
    button:not(.print-allow) {
        display: none !important;
    }

    /* [3] 인쇄 전용 리포트 섹션만 노출 */
    .print-report-section {
        display: block !important;
        background: white !important;
        border: none !important;
        padding: 0 0 50px 0 !important;
        margin: 0 !important;
        height: auto !important;
        overflow: visible !important;
        width: 100% !important;
    }

    .print-report-section .activities-header h3 {
        color: #000 !important;
        font-size: 1.8rem !important;
        text-align: center !important;
        margin-bottom: 20px !important;
        border-bottom: 3px solid #000 !important;
        padding-bottom: 10px !important;
    }

    /* 통계 카드 */
    .print-report-section > div[style*="grid"] {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px !important;
        margin-bottom: 30px !important;
        page-break-inside: avoid !important;
    }

    .print-report-section .stat-card,
    .print-report-section > div[style*="grid"] > div {
        background: #f8f9fa !important;
        border: 1px solid #000 !important;
        padding: 15px !important;
        border-radius: 0 !important;
        color: #000 !important;
    }

    /* 활동(리스트) 아이템 */
    .print-report-section .activity-item {
        display: grid !important;
        grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
        border-bottom: 1px solid #ccc !important;
        padding: 8px 12px !important;
        font-size: 10pt !important;
        color: #000 !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .print-report-section .activity-item.header-item {
        background: #eee !important;
        font-weight: bold !important;
        border-bottom: 2px solid #000 !important;
    }


    /* [4] 발주 내역 모달 인쇄 스타일 */
    .modal-overlay {
        position: static !important;
        background: none !important;
        padding: 0 !important;
        display: block !important;
        backdrop-filter: none !important;
        width: 210mm !important; /* A4 Portrait Width */
    }

    .order-summary-modal {
        /* 상단 계층(.layout-container 등과 함께)에서 통합 제어됨 */
        background: white !important;
        color: black !important;
        border: none !important;
        box-shadow: none !important;
    }

    .order-summary-modal .modal-header,
    .order-summary-modal .modal-content {
        padding: 0 !important;
        background: white !important;
        color: black !important;
    }

    /* 화면용 헤더 숨김 */
    .order-summary-modal .modal-header {
        display: none !important;
    }

    /* 인쇄용 제목 스타일 (사진과 동일하게) */
    .print-only-title {
        display: table-caption !important; /* 테이블 상단에 위치 */
        caption-side: top !important;
        text-align: center !important;
        font-size: 28pt !important;
        font-weight: 800 !important;
        margin: 40px 0 20px 0 !important;
        padding-bottom: 20px !important;
        border-bottom: 3px solid #000 !important;
        color: #000 !important;
    }

    .order-summary-modal .modal-actions,
    .order-summary-modal .close-button,
    .order-summary-modal .icon-button {
        display: none !important;
    }

    .store-order-card {
        background: white !important;
        border: 1.2px solid #555 !important;
        border-radius: 15px !important; /* 사진 속 곡률과 일치 */
        color: black !important;
        break-inside: auto !important; /* 분할 허용하여 잘림 방지 */
        page-break-inside: auto !important; 
        margin-bottom: 6px !important; /* 극한 압축 */
        padding: 8px 12px !important; /* 내부 여백 최소화 */
    }

    .store-order-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 4px !important; /* 헤더 여백 최소화 */
        border: none !important;
    }

    .store-order-header h3 {
        color: black !important;
        font-size: 18pt !important;
        font-weight: 700 !important;
        margin: 0 !important;
    }

    .order-time {
        color: #666 !important;
        font-size: 11pt !important;
    }

    .order-items-table {
        border: 1px solid #333 !important;
    }

    .order-items-table th,
    .order-items-table td {
        border: 1px solid #333 !important;
        color: black !important;
        padding: 2px 8px !important; /* 극한 압축 (4px -> 2px) */
        font-size: 10pt !important; /* 폰트 축소 (11pt -> 10pt) */
    }

    .order-items-table th {
        background: #f2f2f2 !important; /* 헤더 연한 회색 */
        text-align: left !important;
        font-weight: 700 !important;
    }

    /* 사진처럼 수량과 단위는 가운데 정렬 */
    .order-items-table th:nth-child(2),
    .order-items-table th:nth-child(3),
    .order-items-table td:nth-child(2),
    .order-items-table td:nth-child(3) {
        text-align: center !important;
    }

    .qty-cell {
        font-weight: 900 !important; /* 수량 굵게 */
        font-size: 13pt !important;
    }

    .order-notes {
        background: #f9f9f9 !important;
        border: 1px solid #ccc !important;
        color: #333 !important;
        margin-top: 15px !important;
        padding: 10px !important;
        border-radius: 10px !important;
    }
}

/* 모바일 모달 텍스트 줄바꿈 최적화 */
@media (max-width: 768px) {
    .store-drilldown-modal {
        width: 95%;
        max-width: none;
        margin: 0 10px;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-header h2 {
        font-size: 1.25rem;
        word-break: keep-all;
        overflow-wrap: break-word;
        line-height: 1.4;
        flex: 1; /* 가로 공간 확보 */
    }

    .no-data-msg {
        word-break: keep-all;
        line-height: 1.5;
        text-align: center;
    }

    .drilldown-item-name {
        word-break: keep-all;
        font-size: 0.95rem;
        flex: 1;
    }
}

.mobile-only,
.mobile-only-grid {
    display: none !important;
}

.desktop-only {
    display: block !important;
}

@media (max-width: 768px) {

    .mobile-only,
    .mobile-only-grid {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }
}

.management-content {
    padding: 30px 40px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    display: block;
    box-sizing: border-box;
}

/* 관리자 PC 가독성 강화 */
.admin-wide-report {
    margin-top: 32px;
}

.report-table-wrapper {
    overflow-x: auto;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 재고 관리 모바일/PC 스타일 고도화 */
.inventory-mobile-card {
    display: none;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .inventory-mobile-card {
        display: block;
    }

    .inventory-desktop-table {
        display: none;
    }
}

.inventory-card-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inventory-card-info h4 {
    margin: 0;
    font-size: 1.05rem;
    color: #f8fafc;
}

.inventory-card-info p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: #94a3b8;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
}

.qty-btn:active {
    transform: scale(0.9);
    background: rgba(56, 189, 248, 0.2);
}

.qty-input {
    width: 50px;
    text-align: center;
    background: transparent;
    border: none;
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 700;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.management-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.management-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.date-display-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 10px 20px;
    border-radius: 100px;
    color: #38bdf8;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Premium Glass Card */
.glass-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.management-card {
    padding: 32px;
    margin-bottom: 24px;
    width: 100%;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #38bdf8;
    margin: 0;
}

.status-indicator-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.responsive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

@media (max-width: 768px) {
    .responsive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}

.submit-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(34, 197, 94, 0.3);
    transition: all 0.2s;
}

.submit-badge.sales-done {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
}

.submit-badge.inventory-done {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    border-color: rgba(168, 85, 247, 0.3);
}

.submit-badge.pending {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.2);
}

/* Settings Specific */
.settings-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.settings-header h3 {
    margin: 0;
    color: #f1f5f9;
    font-weight: 800;
}

.settings-desc {
    color: #cbd5e1;
    font-size: 0.95rem;
    margin-bottom: 24px;
}

/* Form Styles */
.sales-input-grid,
.settings-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    margin-left: 4px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #64748b;
    transition: color 0.3s;
}

.input-field input,
.stock-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    outline: none;
}

.stock-input {
    padding: 10px 12px;
    min-width: 80px;
    flex: 1;
}

.input-field input:focus,
.stock-input:focus {
    border-color: #38bdf8;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

/* Table Style */
.inventory-info-header {
    margin-bottom: 24px;
    color: #475569;
    font-weight: 600;
}

.management-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

@media (min-width: 768px) {
    .management-table {
        table-layout: auto;
    }
}

.management-table th {
    text-align: left;
    padding: 12px;
    color: #94a3b8;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.management-table td {
    padding: 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #f8fafc;
}

.item-name {
    font-weight: 700;
    color: #f8fafc;
}

.item-unit {
    color: #64748b;
    font-weight: 600;
}

.status-badge-modern {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-badge-modern.normal {
    background: #dcfce7;
    color: #166534;
}

.status-badge-modern.shortage {
    background: #fee2e2;
    color: #991b1b;
}

/* Highlight Section */
.total-sales-highlight {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.total-label {
    font-size: 1rem;
    font-weight: 600;
    color: #38bdf8;
}

.total-value {
    font-size: 2rem;
    font-weight: 800;
    color: #f8fafc;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

/* Upload Section */
.upload-box {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.3);
    transition: all 0.3s;
}

.upload-box:hover {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.05);
}

.upload-box.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.05);
}

.upload-box p {
    color: #94a3b8;
    font-weight: 500;
    margin-top: 12px;
}

.receipt-preview {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: fadeIn 0.4s ease-out;
}

.receipt-preview img {
    max-width: 100%;
    max-height: 450px;
    object-fit: contain;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

/* Success Message Toast */
.success-overlay {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(34, 197, 94, 0.9);
    backdrop-filter: blur(8px);
    color: white;
    padding: 16px 32px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.4);
    animation: slideDown 0.5s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Submit Button */
.full-width-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    border: none;
    border-radius: 18px;
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.full-width-button.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.full-width-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

/* Info Card / Badge */
.submit-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid #bbf7d0;
}

/* Info Card */
.info-card {
    border-left: 6px solid var(--clay-brown);
    padding: 24px;
}

.info-card h4 {
    color: var(--clay-brown);
    font-weight: 800;
    margin: 0 0 10px 0;
}

.info-card p {
    color: #cbd5e1;
    font-weight: 600;
    margin: 0;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 640px) {
    .management-content {
        padding: 20px;
    }

    .total-value {
        font-size: 1.8rem;
    }
}

/* Special Notes Section */
.notes-section {
    margin-top: 32px;
    margin-bottom: 32px;
    animation: fadeIn 0.5s ease-out;
}

.notes-section label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 12px;
}

.notes-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #f8fafc;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s;
    outline: none;
    font-family: inherit;
}

.notes-textarea:focus {
    border-color: #38bdf8;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

.notes-textarea::placeholder {
    color: #94a3b8;
}

/* 전역 플레이스홀더 시인성 강화 */
input::placeholder,
textarea::placeholder,
.notes-textarea::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

/* Webkit 브라우저 대응 */
::-webkit-input-placeholder {
    color: #94a3b8 !important;
}


.notes-textarea:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: rgba(15, 23, 42, 0.4);
}

/* Stock Diff Badge */
.mobile-store-name {
    display: none;
    font-size: 1.2rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 8px;
    width: 100%;
    text-align: center;
}

.stock-input-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.stock-diff-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    min-width: 35px;
    text-align: center;
}

.stock-diff-badge.plus {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.stock-diff-badge.minus {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

/* --- 모바일 최적화 (비파괴적 추가) --- */
@media (max-width: 768px) {
    .management-content {
        padding: 0 8px; /* 상단 패딩 제거 */
        padding-top: 2px;
        padding-bottom: 80px;
        width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .management-content h1 {
        font-size: 1.5rem; 
        margin-top: 0;   /* 상단 마진 제거 */
        margin-bottom: 0;
        line-height: 1.2; /* 라인 높이 축소 */
    }

    .management-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 0; /* 간격 제거 */
        margin-bottom: 8px; /* 하단 여백 추가 축소 */
    }

    .mobile-store-name {
        display: block;
        margin-bottom: 2px; /* 간격 축소 */
    }

    .management-header-flex h1 span {
        display: none;
    }

    .date-display-badge {
        padding: 8px 16px;
        font-size: 0.95rem;
        width: 100%;
        justify-content: center;
    }

    .sales-status-grid .submit-badge {
        font-size: 0.75rem !important;
        padding: 6px 4px !important;
        justify-content: center !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        font-weight: 800 !important;
    }

    .sales-status-grid .submit-badge svg {
        width: 14px !important;
        height: 14px !important;
        stroke-width: 3px;
    }

    .management-card {
        padding: 10px 8px;
        border-radius: 12px;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 24px;
    }

    .card-header h3 {
        font-size: 1.0rem;
        /* 모바일 제목 폰트 크기 축소 */
    }

    .sales-input-grid {
        grid-template-columns: 1fr;
        /* 모바일에서는 무조건 한 줄 */
        gap: 16px;
    }

    .input-field input,
    .stock-input,
    .notes-textarea {
        font-size: 16px;
        /* 모바일 브라우저 자동 줌 방지 */
        padding: 16px;
    }

    .input-field input {
        padding-left: 48px;
    }

    .management-table {
        display: block;
        overflow-x: auto;
    }

    .management-table th,
    .management-table td {
        padding: 12px 8px;
        font-size: 0.9rem;
    }

    .total-sales-highlight {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 20px;
    }

    .total-value {
        font-size: 1.6rem;
    }

    .full-width-button {
        padding: 14px 12px; /* 패딩 약간 축소 */
        font-size: 0.9rem;   /* 폰트 사이즈 축소 (기존 1rem) */
        border-radius: 12px;
        white-space: nowrap; /* 줄바꿈 방지 */
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    /* 테이블 행을 카드처럼 보이게 (vendors-table은 제외) */
    .inventory-table tr {
        display: flex;
        flex-direction: column;
        padding: 16px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .inventory-table td {
        border-bottom: none;
        padding: 4px 0;
    }
}

/* Sales Trend Specific (Mobile Fix) */
/* Facility List & Trend Base */
.facility-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.facility-item-card {
    transition: all 0.3s ease;
}

.facility-item-card:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(56, 189, 248, 0.3) !important;
    transform: translateY(-2px);
}

.trend-small-card {
    transition: all 0.3s ease;
}

.trend-small-card:hover {
    opacity: 1 !important;
    background: rgba(30, 41, 59, 0.6);
}

/* Sales-Specific Trend Grid (Retired - replaced by inline flex in Sales.jsx) */

/* 거래처 관리 PC 전용 강제 고정 - 모든 기기에서 가로 테이블 유지 */
.vendors-table {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
}

.vendors-table tr {
    display: table-row !important;
}

.vendors-table td,
.vendors-table th {
    display: table-cell !important;
    text-align: left !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    /* 글자가 아래로 떨어지는 것을 방지 */
}

.vendors-table td {
    padding: 16px 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Print Styles - 관리자 테이블만 인쇄 */
@media print {
    /* 레이아웃 컨테이너 유지 */
    body,
    .app-container,
    .management-container,
    .management-content {
        display: block !important;
        background: white !important;
    }

    /* 관리자 테이블만 표시, 다른 카드는 모두 숨김 */
    .management-card,
    .glass-card {
        display: none !important;
    }
    
    .admin-wide-report {
        display: block !important;
    }
    
    .admin-wide-report {
        display: block !important;
        background: white !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 10px !important;
    }

    /* 헤더와 타이틀 표시 */
    .admin-wide-report .activities-header {
        display: block !important;
        margin-bottom: 15px !important;
    }

    .admin-wide-report .activities-header h3 {
        display: block !important;
        color: #000 !important;
        font-size: 1.3rem !important;
        font-weight: 700 !important;
        margin: 0 0 10px 0 !important;
    }

    /* 테이블 리스트와 항목들 표시 */
    .admin-wide-report .activities-list {
        display: block !important;
    }

    .admin-wide-report .activity-item {
        display: grid !important;
    }

    /* 인쇄 시 필요없는 요소 숨기기 */
    .activities-header button,
    .activities-header input[type="month"] {
        display: none !important;
    }

    /* 테이블을 컴팩트하게 */
    .activity-item {
        font-size: 0.7rem !important;
        padding: 6px 10px !important;
        page-break-inside: avoid;
    }

    .activity-item.header-item {
        background: #f0f0f0 !important;
        color: #000 !important;
        font-weight: 700;
        border-bottom: 2px solid #333 !important;
    }

    .activity-item.row-item {
        border-bottom: 1px solid #ccc !important;
    }

    /* 합계 행 스타일 */
    .activity-item.total-row {
        display: grid !important;
        background: #e8f4f8 !important;
        border-top: 3px solid #333 !important;
        font-weight: 700 !important;
        page-break-inside: avoid;
    }

    .activity-item.total-row div {
        color: #000 !important;
    }

    /* 색상을 흑백/그레이스케일로 */
    .activity-item div {
        color: #000 !important;
    }

    /* 영수증 버튼 숨기기 */
    .icon-button {
        display: none !important;
    }

    /* 페이지 여백 최소화 */
    @page {
        margin: 0.5cm;
        size: A4 portrait;
    }

    .activities-header h3 {
        color: #000 !important;
        margin-bottom: 8px !important;
    }
}.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

.custom-alert-content {
    width: 90%;
    max-width: 360px;
    padding: 24px;
    background: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    animation: scaleUp 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-alert-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.alert-icon {
    color: #38bdf8;
}

.alert-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f8fafc;
}

.custom-alert-body {
    margin-bottom: 24px;
}

.custom-alert-body p {
    margin: 0;
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.6;
    word-break: keep-all;
}

.custom-alert-footer {
    display: flex;
    justify-content: flex-end;
}

.confirm-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
