@charset "UTF-8";
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&display=swap");

:root {
    --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
    --font-en: "Outfit", var(--font-sans);

    /* Blue Theme Color Palette */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-dark: #1e3a8a;
    --primary-light: #eff6ff;
    --primary-subtle: #dbeafe;
    --primary-border: #bfdbfe;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --header-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);

    /* Accent & Semantic */
    --accent-cyan: #0284c7;
    --success: #10b981;
    --success-light: #ecfdf5;
    --success-text: #047857;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --warning-text: #b45309;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --danger-text: #b91c1c;
    --purple: #8b5cf6;
    --purple-light: #f5f3ff;

    /* Neutrals */
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-muted: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;

    /* Radius & Shadows */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 16px -2px rgba(37, 99, 235, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 25px -3px rgba(37, 99, 235, 0.12), 0 4px 10px -4px rgba(15, 23, 42, 0.05);
    --shadow-blue: 0 4px 14px 0 rgba(37, 99, 235, 0.28);
}

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

html {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-page);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

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

/* Layout Container */
.container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 16px;
}

.container-wide {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* Top App Header & Navigation */
.app-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.app-header-inner {
    max-width: 680px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    text-decoration: none;
}

.app-brand-logo {
    width: 28px;
    height: 28px;
    background: var(--primary-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    font-size: 15px;
    box-shadow: var(--shadow-blue);
}

.header-user-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-greeting {
    font-size: 13px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-greeting strong {
    color: var(--primary-dark);
    font-weight: 700;
}

.org-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.header-credit-box {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    padding: 4px 8px 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
}

.credit-label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11px;
}

.credit-count {
    color: var(--text-main);
    font-weight: 600;
}

.credit-count strong {
    color: var(--primary);
    font-weight: 800;
    font-size: 13px;
}

.btn-charge {
    background: var(--primary);
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700;
    padding: 3px 8px !important;
    min-height: auto !important;
    border-radius: var(--radius-full) !important;
    text-decoration: none;
    transition: background 0.15s ease;
    box-shadow: none !important;
}

.btn-charge:hover {
    background: var(--primary-hover);
}

.btn-logout {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-logout:hover {
    background: #f8fafc;
    color: var(--danger);
    border-color: var(--danger-light);
}

.shop-chip {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.user-text {
    font-size: 13px;
    color: var(--text-muted);
}

.nav-tabs {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-tab-item {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.nav-tab-item:hover {
    color: var(--text-main);
}

.nav-tab-item.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: var(--shadow-xs);
    font-weight: 700;
}

/* User Welcome Banner */
.welcome-hero {
    background: var(--header-gradient);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    margin-bottom: 20px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
    position: relative;
    overflow: hidden;
}

.welcome-hero::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, rgba(37, 99, 235, 0) 70%);
    pointer-events: none;
}

.welcome-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.welcome-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
}

.welcome-sub {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Cards & Elevated Containers */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

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

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* KPI Summary Metric Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.kpi-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

.kpi-card.green::before {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.kpi-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.kpi-value {
    font-family: var(--font-en);
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.kpi-value.blue { color: var(--primary); }
.kpi-value.green { color: var(--success); }

/* Work Order List Items */
.work-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: block;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-xs);
    transition: all 0.15s ease;
    margin-bottom: 10px;
}

.work-item:hover {
    border-color: var(--primary-border);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.work-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.work-item-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.work-item-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.badge-blue, .badge-in_progress {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
}

.badge-green, .badge-completed, .badge-paid {
    background: var(--success-light);
    color: var(--success-text);
    border: 1px solid #a7f3d0;
}

.badge-amber, .badge-received, .badge-scheduled {
    background: var(--warning-light);
    color: var(--warning-text);
    border: 1px solid #fde68a;
}

.badge-gray, .badge-draft {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 46px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.15s ease;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff !important;
    box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 6px 18px 0 rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-main);
    border-color: var(--border-color);
    box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary-border);
}

.btn-outline-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.btn-sm {
    min-height: 36px;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    min-height: 52px;
    padding: 14px 24px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
    display: flex;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-label .req {
    color: var(--danger);
    margin-left: 2px;
}

.form-control, input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="number"], select, textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-main);
    background-color: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
}

.form-control:focus, input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.12);
    background-color: #ffffff;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Alerts & Notifications */
.alert, .flash-notice, .flash-error {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success, .flash-notice {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-danger, .flash-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-info {
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    color: var(--primary-dark);
}

/* Quick Action Button Group */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

/* Auth Cards */
.auth-container {
    max-width: 440px;
    margin: 40px auto;
    padding: 16px;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 14px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 12px;
    box-shadow: var(--shadow-blue);
}

/* Section Title & Subtitle */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

/* Responsive Rules */
@media (max-width: 480px) {
    .container { padding: 12px; }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .action-grid { grid-template-columns: 1fr; }
    .welcome-hero { padding: 18px 16px; }
}

