/* ============================================
   ReelFix Biz - STANDALONE White Theme
   style.css 의존 없음, 완전 독립
   ============================================ */

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

:root {
    --primary: #2563EB;
    --primary-light: #60A5FA;
    --primary-dark: #1D4ED8;
    --accent: #0EA5E9;
    --bg: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-hover: #F1F5F9;
    --bg-input: #F8FAFC;
    --text: #1E293B;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --success: #16A34A;
    --warning: #D97706;
    --danger: #DC2626;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

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

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ── Layout ── */
.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* ── Navbar ── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo-text {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.biz-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 5px;
    vertical-align: super;
    letter-spacing: 1px;
}
.navbar-menu {
    display: flex;
    gap: 4px;
}
.nav-item {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s;
}
.nav-item:hover { color: var(--primary); background: var(--bg-hover); }
.navbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-company {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.88rem;
}
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    line-height: 1.4;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(37,99,235,0.2);
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    color: #fff;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}
.card:hover {
    box-shadow: var(--shadow-md);
}

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}
.form-group textarea {
    min-height: 100px;
    resize: vertical;
}
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

/* ── Toast ── */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}
.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast-success { background: #D1FAE5; color: #065F46; }
.toast-error { background: #FEE2E2; color: #991B1B; }
.toast-info { background: #DBEAFE; color: #1D4ED8; }

/* ── Badge ── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ── Status Colors ── */
.status-pending_payment { background: #FEE2E2; color: #991B1B; }
.status-paid, .status-materials_pending { background: #DBEAFE; color: #1E40AF; }
.status-in_production { background: #FEF3C7; color: #92400E; }
.status-completed { background: #D1FAE5; color: #065F46; }
.status-cancelled { background: #F1F5F9; color: #475569; }
.status-pending { background: #F1F5F9; color: #475569; }
.status-script_in_progress { background: #FEF3C7; color: #92400E; }
.status-video_in_progress { background: #DBEAFE; color: #1E40AF; }
.status-upload_in_progress { background: #E8DAEF; color: #6C3483; }

/* ── Page Header ── */
.page-header {
    background: linear-gradient(135deg, #EFF6FF, #F0F9FF);
    border: 1px solid #DBEAFE;
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 32px;
}
.page-header h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; }
.page-header p { color: var(--text-muted); }

/* ── Stats ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}
.stat-value { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

/* ── Section Title ── */
.section-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; }

/* ── Progress Bar ── */
.progress-bar-wrap { width: 120px; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width 0.3s; }
.progress-bar-big { height: 14px; background: var(--border); border-radius: 7px; overflow: hidden; margin-top: 12px; }
.progress-bar-big .fill { height: 100%; background: linear-gradient(90deg, var(--primary), #16A34A); border-radius: 7px; transition: width 0.5s; }

/* ── Order Card ── */
.orders-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.order-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s;
}
.order-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.order-info h3 { font-size: 0.95rem; margin-bottom: 3px; }
.order-info p { color: var(--text-muted); font-size: 0.82rem; }
.order-status { padding: 5px 14px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }

/* ── Quick Actions ── */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.action-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 22px; text-align: center; cursor: pointer; transition: all 0.15s;
    text-decoration: none; color: inherit;
}
.action-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); color: inherit; }
.action-icon { font-size: 2rem; margin-bottom: 6px; }
.action-card h3 { font-size: 0.9rem; color: var(--text); }

/* ── Feature / Price Cards ── */
.feature-card, .price-card, .pkg-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 22px;
    transition: all 0.2s;
    position: relative;
}
.feature-card:hover, .price-card:hover, .pkg-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.feature-icon { font-size: 2.5rem; margin-bottom: 14px; }
.feature-card h3, .price-card h3 { margin-bottom: 10px; }
.feature-card p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }

.price-amount, .pkg-price { font-size: 2rem; font-weight: 900; color: var(--primary); }
.price-amount small { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }

.price-card.featured, .pkg-card.featured {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(37,99,235,0.1);
}
.price-card.featured::before, .pkg-card.featured::before {
    content: 'BEST';
    position: absolute; top: -11px; right: 18px;
    background: var(--primary); color: #fff;
    padding: 3px 14px; border-radius: 16px; font-size: 0.72rem; font-weight: 700;
}

.price-features, .pkg-features { list-style: none; padding: 0; margin: 18px 0; }
.price-features li, .pkg-features li {
    padding: 8px 0; border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary); font-size: 0.9rem;
}
.price-features li::before, .pkg-features li::before {
    content: '\2713'; color: var(--success); margin-right: 8px; font-weight: 700;
}

/* ── Filter Tabs ── */
.filter-tab {
    padding: 9px 22px; border-radius: 20px; cursor: pointer;
    border: 1px solid var(--border); background: #fff;
    color: var(--text-muted); font-size: 0.88rem; transition: all 0.15s;
}
.filter-tab.active, .filter-tab:hover {
    background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ── Wizard Steps ── */
.wizard-steps { display: flex; gap: 0; margin-bottom: 28px; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); }
.wizard-step { flex: 1; padding: 14px; text-align: center; font-size: 0.88rem; font-weight: 600; background: var(--bg-hover); color: var(--text-light); }
.wizard-step.active { background: var(--primary); color: #fff; }
.wizard-step.done { background: #D1FAE5; color: #065F46; }
.wizard-step .step-num { font-size: 0.72rem; display: block; margin-bottom: 2px; }

/* ── Theme Item ── */
.theme-item {
    background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 14px; display: flex; align-items: center; gap: 12px;
}
.theme-remove { cursor: pointer; color: var(--danger); font-size: 1.1rem; padding: 4px 8px; }

/* ── Summary Table ── */
.summary-table { width: 100%; border-collapse: collapse; }
.summary-table td { padding: 10px 0; border-bottom: 1px solid var(--border-light); color: var(--text-secondary); }
.summary-table td:last-child { text-align: right; font-weight: 600; }
.summary-total td { font-size: 1.2rem; font-weight: 800; color: var(--primary); border: none; }

/* ── Item Progress ── */
.item-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; }
.item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.item-status { padding: 4px 12px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.item-progress { display: flex; gap: 4px; align-items: center; }
.item-step { flex: 1; height: 6px; border-radius: 3px; background: var(--border); }
.item-step.done { background: var(--success); }
.item-step.active { background: var(--primary); animation: pulse-step 1.5s infinite; }
@keyframes pulse-step { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
.item-step-labels { display: flex; justify-content: space-between; margin-top: 5px; font-size: 0.7rem; color: var(--text-light); }

/* ── Deliverable Card ── */
.deliverable-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; transition: all 0.2s;
}
.deliverable-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.deliverable-preview { height: 170px; background: var(--bg-hover); display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--text-light); }
.deliverable-info { padding: 16px; }
.deliverable-info h3 { font-size: 0.95rem; margin-bottom: 6px; }
.deliverable-info p { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 10px; }
.deliverable-link { color: var(--primary); font-weight: 600; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }
.empty-state .icon { font-size: 3.5rem; margin-bottom: 14px; }
.empty-state h2 { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 6px; }

/* ── Stats Bar ── */
.stats-bar { display: flex; gap: 24px; margin-bottom: 28px; padding: 18px 22px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }

/* ── Auth Pages ── */
.auth-container { max-width: 440px; margin: 60px auto; padding: 0 20px; }
.auth-card {
    background: #fff; border: 1px solid var(--border); border-radius: 16px;
    padding: 40px 32px; box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.auth-card h1 { text-align: center; margin-bottom: 6px; font-size: 1.7rem; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 28px; font-size: 0.92rem; }
.auth-btn { width: 100%; padding: 13px; font-size: 1rem; margin-top: 8px; }
.auth-footer { text-align: center; margin-top: 22px; color: var(--text-muted); font-size: 0.9rem; }
.auth-footer a { color: var(--primary); font-weight: 500; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .navbar-menu, .navbar-user { display: none; }
    .navbar-menu.open, .navbar-user.open { display: flex; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 12px; z-index: 99; }
    .navbar-toggle { display: block; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .quick-actions { grid-template-columns: 1fr 1fr; }
    .page-header { padding: 24px 20px; }
    .page-header h1 { font-size: 1.4rem; }
    .form-row { grid-template-columns: 1fr; }
    .wizard-step { font-size: 0.75rem; padding: 10px 6px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .page-wrapper { padding: 16px 12px; }
}
