*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    background: linear-gradient(180deg, #F8F9FC 0%, #F0F3F8 100%);
    color: #1A1F2E;
    min-height: 100vh;
}

.app-shell {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 64px; /* bottom nav */
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(74, 144, 226, 0.1);
    padding: 14px 16px;
    box-shadow: 0 2px 12px rgba(74, 144, 226, 0.08);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.brand {
    display: flex;
    flex-direction: column;
}

.brand-main {
    font-weight: 700;
    font-size: 18px;
    background: linear-gradient(135deg, #4A90E2 0%, #7B68EE 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
}

.brand-main-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-sub {
    font-size: 11px;
    color: #6B7C93;
    font-weight: 500;
}

.brand-logo {
    height: 34px;
    width: auto;
    border-radius: 8px;
    display: block;
}

.header-live-btn {
    padding: 6px 12px;
    font-size: 12px;
    box-shadow: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.app-main {
    padding: 12px 12px 80px;
}

.section {
    margin-bottom: 16px;
}

.section-title {
    margin: 0 4px 14px;
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #1A1F2E 0%, #4A90E2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
}

.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.day-picker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #4A90E2;
    background: linear-gradient(135deg, #FFFFFF 0%, #FAFBFF 100%);
    padding: 8px 14px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.2);
    font-weight: 600;
}

.icon-btn {
    border: none;
    background: linear-gradient(135deg, #F0F3F8 0%, #E8EDF5 100%);
    color: #4A90E2;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.icon-btn:hover {
    background: linear-gradient(135deg, #4A90E2 0%, #7B68EE 100%);
    color: #FFFFFF;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
}

.icon-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.date-btn {
    border: none;
    background: transparent;
    padding: 0 8px;
    cursor: pointer;
    font-size: 12px;
    color: #4A4A4A;
    font-weight: 500;
}

.date-btn:hover {
    color: #1A1A1A;
}

.year-picker,
.month-picker {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #4A4A4A;
    font-weight: 500;
}

.amount-triplet {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.amount-triplet input[type="number"] {
    flex: 1;
}

/* 숫자 입력 박스의 위/아래 화살표 숨기기 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.cards-row.summary-row {
    /* 오늘 정산: 오늘 매출 / 오늘 지출 / 일별 예상급여 3개 사용 (2개씩 배치) */
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
    background: linear-gradient(135deg, #FFFFFF 0%, #FAFBFF 100%);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(74, 144, 226, 0.1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4A90E2 0%, #7B68EE 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card.highlight {
    background: linear-gradient(135deg, #E8F4FD 0%, #D4EBF7 100%);
    border: 1px solid rgba(74, 144, 226, 0.3);
}

.card.highlight::before {
    opacity: 1;
}

.month-card {
    background: linear-gradient(135deg, #E8F4FD 0%, #D4EBF7 100%);
    border: 1px solid rgba(74, 144, 226, 0.25);
}

.month-card::before {
    opacity: 1;
}

.overall-card {
    background: linear-gradient(135deg, #F0F3F8 0%, #E8EDF5 100%);
    border: 1px solid rgba(74, 144, 226, 0.15);
}

/* 오늘 정산 카드 색상 */
.today-sales-card {
    background: linear-gradient(135deg, #E8F4FD 0%, #D4EBF7 100%);
    border: 1px solid rgba(74, 144, 226, 0.3);
}

.today-sales-card::before {
    opacity: 1;
}

.today-expense-card {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFE8E8 100%);
    border: 1px solid rgba(239, 83, 80, 0.2);
}

.today-expense-card::before {
    background: linear-gradient(90deg, #EF5350 0%, #F48FB1 100%);
    opacity: 1;
}

.today-salary-card {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.today-salary-card::before {
    background: linear-gradient(90deg, #3B82F6 0%, #60A5FA 100%);
    opacity: 1;
}

.month-salary-card {
    background: linear-gradient(135deg, #F3E8FF 0%, #E9D5FF 100%);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.month-salary-card::before {
    background: linear-gradient(90deg, #9333EA 0%, #A78BFA 100%);
    opacity: 1;
}

.summary-card {
    padding: 18px 16px;
    min-height: 96px;
}

.card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.15), 0 4px 8px rgba(0, 0, 0, 0.08);
}

.card-label {
    font-size: 12px;
    color: #666666;
    font-weight: 500;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.card-value {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    transition: transform 0.3s ease;
}

.card:hover .card-value {
    transform: scale(1.05);
}

.card-value.positive {
    color: #1A1A1A;
}

.card-value.negative {
    color: #EF5350;
}

.card-value.sales {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-value.partner1 {
    color: #1976D2;
}

.card-value.partner2 {
    color: #7B1FA2;
}

.card-sub {
    margin-top: 6px;
    font-size: 11px;
    color: #888888;
    font-weight: 400;
}

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 252, 0.98) 100%);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(74, 144, 226, 0.1);
    box-shadow: 0 -2px 12px rgba(74, 144, 226, 0.08);
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 8px 4px 10px;
    font-size: 12px;
    color: #757575;
    text-decoration: none;
    position: relative;
    transition: color 0.15s ease;
    font-weight: 500;
}

.nav-item.active {
    color: #212121;
    font-weight: 700;
}

.nav-item.active {
    color: #4A90E2;
}

.nav-item.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #4A90E2 0%, #7B68EE 100%);
}

.form-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #FAFBFF 100%);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(74, 144, 226, 0.1);
}

.form-card.compact {
    padding: 10px 12px;
}

.form-row {
    margin-bottom: 12px;
}

.form-row label {
    display: block;
    font-size: 12px;
    color: #4A4A4A;
    margin-bottom: 6px;
    font-weight: 500;
}

.label-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.label-with-action label {
    margin-bottom: 0;
}

input[type="text"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    outline: none;
    background-color: #fafafa;
    transition: border-color 0.15s ease, box-shadow 0.15s ease,
        background-color 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
    background-color: #ffffff;
}

textarea {
    resize: vertical;
    min-height: 60px;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* 매출 입력: 홀/배달 금액 행에서 두 인풋 박스를 아래쪽 기준으로 정렬 */
.sales-amount-row {
    align-items: end;
}

.primary-btn,
.secondary-btn {
    border-radius: 999px;
    border: none;
    padding: 11px 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}

.primary-btn {
    background: linear-gradient(135deg, #4A90E2 0%, #7B68EE 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.35), 0 2px 4px rgba(123, 104, 238, 0.2);
    font-weight: 600;
    border: none;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.primary-btn:hover::before {
    width: 300px;
    height: 300px;
}

.primary-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.45), 0 4px 8px rgba(123, 104, 238, 0.3);
    background: linear-gradient(135deg, #357ABD 0%, #6A5ACD 100%);
}

.primary-btn:active {
    transform: translateY(0) scale(0.98);
}

.secondary-btn {
    background: #FFFFFF;
    color: #4A4A4A;
    border: 1px solid rgba(0, 0, 0, 0.12);
    font-weight: 500;
}

.secondary-btn.small {
    padding: 4px 8px;
    font-size: 11px;
    box-shadow: none;
}

.secondary-btn:hover {
    background: #F5F5F5;
    border-color: rgba(0, 0, 0, 0.2);
}

.full-width {
    width: 100%;
}

.form-message {
    margin-top: 8px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.form-message.success {
    color: #4CAF50;
}

.form-message.error {
    color: #F44336;
}

.segmented-control {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #f5f5f5;
    border-radius: 999px;
    padding: 3px;
}

.segmented-control input[type="radio"] {
    display: none;
}

.segmented-control label {
    text-align: center;
    padding: 6px 6px;
    font-size: 12px;
    border-radius: 999px;
    cursor: pointer;
    color: #777;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.segmented-control input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #4A90E2 0%, #7B68EE 100%);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
    font-weight: 600;
}

.segmented-control.two {
    grid-template-columns: repeat(2, 1fr);
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 6px 12px;
    font-size: 12px;
    background: #FFFFFF;
    color: #4A4A4A;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 500;
}

.chip.active {
    background: linear-gradient(135deg, #4A90E2 0%, #7B68EE 100%);
    color: #FFFFFF;
    transform: translateY(-2px);
    font-weight: 600;
    border-color: #4A90E2;
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
}

.category-input {
    margin-top: 8px;
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    font-size: 13px;
}

canvas {
    width: 100% !important;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th,
.data-table td {
    padding: 6px 4px;
    border-bottom: 1px solid #eee;
    text-align: left;
    white-space: nowrap;
    vertical-align: middle;
}

.data-table th {
    font-weight: 600;
    color: #4A4A4A;
    background: #FAFAFA;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.empty-cell {
    text-align: center;
    color: #999999;
}

.action-cell {
    text-align: right;
}

.link-btn {
    border: none;
    background: none;
    color: #666666;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 4px;
    font-weight: 500;
}

.link-btn:hover {
    color: #333333;
}

.link-btn:hover {
    text-decoration: underline;
}

.status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
}

.status-badge.badge-on {
    background: linear-gradient(135deg, #4A90E2 0%, #7B68EE 100%);
    color: #FFFFFF;
    font-weight: 600;
}

.status-badge.badge-off {
    background: #E0E0E0;
    color: #666666;
    font-weight: 500;
}

/* 시간대별 매출 요약 테이블 스타일 */
.hourly-summary-table {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.hourly-summary-header {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
}

.hourly-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 8px;
}

.hourly-summary-card {
    padding: 12px 10px;
    border-radius: 12px;
    text-align: center;
    background: linear-gradient(135deg, #FFFFFF 0%, #FAFBFF 100%);
    border: 1px solid rgba(74, 144, 226, 0.15);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hourly-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
}

.hourly-summary-card:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.2);
    border-color: rgba(74, 144, 226, 0.3);
}

.hourly-summary-time {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.hourly-summary-amount {
    font-size: 14px;
    color: #1A1F2E;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}

.hourly-summary-percent {
    font-size: 10px;
    color: #6B7C93;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.4);
    padding: 3px 6px;
    border-radius: 10px;
    display: inline-block;
}

.install-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 64px;
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 252, 0.98) 100%);
    backdrop-filter: blur(20px);
    box-shadow: 0 -4px 16px rgba(74, 144, 226, 0.15);
    border-top: 1px solid rgba(74, 144, 226, 0.2);
    z-index: 20;
}

.install-text {
    flex: 1;
    font-size: 12px;
    color: #4A4A4A;
}

.install-btn {
    font-size: 13px;
    padding: 8px 12px;
}

.install-close {
    font-size: 11px;
}

@media (max-width: 400px) {
    .cards-row {
        grid-template-columns: 1fr;
    }
}





/* ===================== THEME: 따뜻한 카드형 (컴포즈) ===================== */
body { background:#FBF2E2 !important; }
.app-header { background:#FFF8EC !important; border-bottom:1px solid #ECDCC0 !important; box-shadow:0 2px 12px rgba(150,100,40,.08) !important; }
.brand-main { background:none !important; -webkit-text-fill-color:#9A5B23 !important; color:#9A5B23 !important; }
.brand-sub { color:#A07F52 !important; }
.section-title { background:none !important; -webkit-text-fill-color:#6E4A22 !important; color:#6E4A22 !important; }
.card, .summary-card { border-radius:18px !important; box-shadow:0 3px 12px rgba(150,100,40,.08) !important; }
.today-sales-card { background:#F6A623 !important; border:none !important; }
.today-sales-card .card-label, .today-sales-card .card-sub { color:#6B3D08 !important; }
.today-sales-card .card-value, .today-sales-card .card-value.sales { background:none !important; -webkit-text-fill-color:#5A3208 !important; color:#5A3208 !important; }
.today-expense-card { background:#E2675A !important; border:none !important; }
.today-expense-card .card-label, .today-expense-card .card-sub { color:#5E1C16 !important; }
.today-expense-card .card-value, .today-expense-card .card-value.negative { color:#4A130F !important; -webkit-text-fill-color:#4A130F !important; }
.today-salary-card { background:#FCE7C9 !important; border:1px solid #F0D29A !important; }
.today-salary-card .card-value { background:none !important; -webkit-text-fill-color:#8A5A12 !important; color:#8A5A12 !important; }
.month-card, .overall-card { background:#FFFFFF !important; border:1px solid #F0E2C8 !important; }
.month-card .card-value, .overall-card .card-value { background:none !important; -webkit-text-fill-color:#9A5B23 !important; color:#9A5B23 !important; }
.month-salary-card { background:#F6E0C2 !important; border:1px solid #ECCFA0 !important; }
.month-salary-card .card-value { background:none !important; -webkit-text-fill-color:#9A4A1E !important; color:#9A4A1E !important; }
.card-value.sales { background:none !important; -webkit-text-fill-color:#C9781C !important; color:#C9781C !important; }
.primary-btn { background:linear-gradient(135deg,#F2A23C 0%,#E8800C 100%) !important; }
.bottom-nav { background:#FFF8EC !important; border-top:1px solid #ECDCC0 !important; }
.nav-item.active { color:#E8800C !important; -webkit-text-fill-color:#E8800C !important; }
