/* ===============================================
   KLAB 통합 포탈 - Global Styles
   =============================================== */

/* ─────────────────────────────────────────────
   CSS Reset & Base
   ───────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #F5F7FA;
    color: #1A1A2E;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─────────────────────────────────────────────
   CSS Variables - Color Palette
   ───────────────────────────────────────────── */
:root {
    /* Brand Colors */
    --klab-primary: #1A56DB;
    --klab-dark: #1340A8;
    --klab-light: #3B82F6;
    
    /* Service Colors */
    --saleslog: #0EA5E9;
    --saleslog-bg: #EFF8FF;
    --saleslog-border: #BAE6FD;
    
    --industrybook: #7C3AED;
    --industrybook-bg: #F3EEFF;
    --industrybook-border: #DDD6FE;
    
    --intellibuy: #F59E0B;
    --intellibuy-bg: #FFFBEB;
    --intellibuy-border: #FDE68A;
    
    /* UI Colors */
    --sidebar: #0F172A;
    --sidebar-2: #1E293B;
    --sidebar-hover: #334155;
    
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
    
    /* Status Colors */
    --success: #10B981;
    --success-bg: #D1FAE5;
    --success-border: #6EE7B7;
    
    --error: #EF4444;
    --error-bg: #FEE2E2;
    --error-border: #FCA5A5;
    
    --warning: #F59E0B;
    --warning-bg: #FEF3C7;
    --warning-border: #FCD34D;
    
    --info: #3B82F6;
    --info-bg: #DBEAFE;
    --info-border: #93C5FD;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: all 0.2s ease;
}

/* ─────────────────────────────────────────────
   Loading Overlay
   ───────────────────────────────────────────── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--klab-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ─────────────────────────────────────────────
   Authentication Pages (Login, Signup)
   ───────────────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 50%, #1A56DB 100%);
    padding: 20px;
}

.auth-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: 48px 44px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.25);
    animation: fadeInUp 0.4s ease;
}

.auth-container-wide {
    background: white;
    border-radius: var(--radius-xl);
    padding: 48px 44px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.25);
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    justify-content: center;
}

.auth-logo img {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.auth-logo-icon {
    width: 44px;
    height: 44px;
    background: var(--klab-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}
}

.auth-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

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

.auth-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--gray-500);
}

/* Service Badges on Login */
.service-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 28px;
}

.service-badge {
    padding: 12px 8px;
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    border: 1.5px solid;
    transition: var(--transition);
}

.service-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.service-badge i {
    display: block;
    font-size: 20px;
    margin-bottom: 6px;
}

.service-badge.saleslog {
    background: var(--saleslog-bg);
    color: var(--saleslog);
    border-color: var(--saleslog-border);
}

.service-badge.industrybook {
    background: var(--industrybook-bg);
    color: var(--industrybook);
    border-color: var(--industrybook-border);
}

.service-badge.intellibuy {
    background: var(--intellibuy-bg);
    color: var(--intellibuy);
    border-color: var(--intellibuy-border);
}

/* Form Elements */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--gray-900);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--klab-primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--gray-900);
    background: white;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M8 10.5L3 5.5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 40px;
    transition: var(--transition);
}

.form-select:focus {
    border-color: var(--klab-primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--klab-primary);
    cursor: pointer;
}

.form-checkbox label {
    font-size: 13px;
    color: var(--gray-600);
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--klab-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--klab-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 1.5px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

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

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: white;
    color: var(--error);
    border: 1.5px solid var(--error);
}

.btn-danger:hover {
    background: var(--error-bg);
}

.btn-dark {
    background: var(--gray-900);
    color: white;
}

.btn-dark:hover {
    background: var(--gray-800);
}

/* New Signup Form Styles */
.signup-form-single {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-with-button {
    display: flex;
    gap: 8px;
}

.input-with-button .form-input {
    flex: 1;
}

.input-with-button .btn {
    white-space: nowrap;
    padding: 12px 16px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .form-input {
    flex: 1;
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--gray-600);
}

.input-group-three {
    display: flex;
    gap: 8px;
}

.input-group-three .form-select {
    width: 140px;
    flex-shrink: 0;
}

.input-group-three .form-input {
    flex: 1;
}

.input-group-three .btn {
    white-space: nowrap;
    padding: 12px 16px;
}

.input-with-button-timer {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-with-button-timer .form-input {
    flex: 1;
}

.input-with-button-timer .btn {
    white-space: nowrap;
    padding: 12px 16px;
}

.input-with-button-timer .timer {
    font-size: 13px;
    color: var(--klab-primary);
    font-weight: 600;
    white-space: nowrap;
    min-width: 100px;
}

.validation-message {
    font-size: 12px;
    margin-top: 6px;
}

.form-section-divider {
    margin: 12px 0;
}

.signup-submit-btn {
    margin-top: 12px;
    padding: 16px 20px;
    font-size: 16px;
}

/* Auth Links */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    font-size: 13px;
    color: var(--gray-400);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.auth-footer {
    text-align: center;
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 24px;
}

.auth-link {
    color: var(--klab-primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

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

/* Signup Steps */
.signup-steps {
    display: flex;
    gap: 6px;
    margin-bottom: 32px;
}

.signup-step {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--gray-200);
    transition: var(--transition);
}

.signup-step.active {
    background: var(--klab-primary);
}

.signup-step.completed {
    background: var(--success);
}

/* Service Selection Cards */
.service-select-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.service-select-card {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.service-select-card:hover {
    border-color: var(--klab-primary);
    background: rgba(26, 86, 219, 0.05);
}

.service-select-card.selected {
    transform: scale(1.02);
}

.service-select-card.selected.saleslog {
    border-color: var(--saleslog);
    background: var(--saleslog-bg);
}

.service-select-card.selected.industrybook {
    border-color: var(--industrybook);
    background: var(--industrybook-bg);
}

.service-select-card.selected.intellibuy {
    border-color: var(--intellibuy);
    background: var(--intellibuy-bg);
}

.service-select-card i {
    font-size: 26px;
    margin-bottom: 8px;
    display: block;
}

.service-select-card.saleslog i {
    color: var(--saleslog);
}

.service-select-card.industrybook i {
    color: var(--industrybook);
}

.service-select-card.intellibuy i {
    color: var(--intellibuy);
}

.service-select-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.service-select-desc {
    font-size: 11px;
    color: var(--gray-500);
}

.service-check-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    font-size: 10px;
    display: none;
    align-items: center;
    justify-content: center;
}

.service-select-card.selected .service-check-icon {
    display: flex;
}

/* ─────────────────────────────────────────────
   Portal Layout (Main App)
   ───────────────────────────────────────────── */
.portal-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
}

/* Top Navigation Bar (GNB) */
.gnb {
    height: 56px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.gnb-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-right: 32px;
}

.gnb-logo img {
    height: 34px;
    width: auto;
    object-fit: contain;
}

.gnb-logo-icon {
    width: 34px;
    height: 34px;
    background: var(--klab-primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: white;
}

.gnb-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.gnb-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.gnb-tab {
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.gnb-tab:hover {
    background: var(--gray-50);
    color: var(--gray-700);
}

.gnb-tab.active {
    background: var(--klab-primary);
    color: white;
}

.gnb-tab-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.gnb-tab.saleslog-tab .gnb-tab-dot {
    background: var(--saleslog);
}

.gnb-tab.industrybook-tab .gnb-tab-dot {
    background: var(--industrybook);
}

.gnb-tab.intellibuy-tab .gnb-tab-dot {
    background: var(--intellibuy);
}

.gnb-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gnb-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.gnb-icon-btn:hover {
    background: var(--gray-50);
    color: var(--gray-700);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: 50%;
    border: 2px solid white;
}

.gnb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--klab-primary);
    color: white;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.gnb-avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Portal Body (Sidebar + Content) */
.portal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Main Sidebar */
.sidebar {
    width: 240px;
    background: var(--sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
    transition: width 0.3s ease;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--sidebar-hover);
    border-radius: 4px;
}

.sidebar-section {
    padding: 18px 12px 10px;
}

.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0 10px;
    margin-bottom: 8px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-400);
    transition: var(--transition);
    user-select: none;
}

.sidebar-item:hover {
    background: var(--sidebar-2);
    color: var(--gray-200);
}

.sidebar-item.active {
    background: var(--klab-primary);
    color: white;
}

.sidebar-item-icon {
    width: 22px;
    text-align: center;
    font-size: 16px;
}

.sidebar-item-arrow {
    margin-left: auto;
    font-size: 11px;
    transition: transform 0.2s ease;
}

.sidebar-item.expanded .sidebar-item-arrow {
    transform: rotate(90deg);
}

/* Sidebar Sub Menu */
.sidebar-submenu {
    display: none;
    padding: 4px 0 8px 18px;
}

.sidebar-submenu.open {
    display: block;
}

.sidebar-subitem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.sidebar-subitem::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 16px;
    background: var(--sidebar-hover);
    border-radius: 1px;
}

.sidebar-subitem:hover {
    background: var(--sidebar-2);
    color: var(--gray-300);
}

.sidebar-subitem.active {
    color: white;
    background: rgba(26, 86, 219, 0.3);
}

.sidebar-subitem.active::before {
    background: var(--klab-primary);
}

.sidebar-service-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sidebar-service-dot.saleslog {
    background: var(--saleslog);
}

.sidebar-service-dot.industrybook {
    background: var(--industrybook);
}

.sidebar-service-dot.intellibuy {
    background: var(--intellibuy);
}

/* Sub Sidebar (2nd Level) */
.sub-sidebar {
    width: 200px;
    background: white;
    border-right: 1px solid var(--gray-200);
    flex-shrink: 0;
    overflow-y: auto;
    display: none;
}

.sub-sidebar.open {
    display: block;
}

.sub-sidebar::-webkit-scrollbar {
    width: 4px;
}

.sub-sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

.sub-sidebar-header {
    padding: 20px 16px 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
    border-bottom: 1px solid var(--gray-200);
}

.sub-sidebar-section {
    padding: 12px 12px 6px;
}

.sub-sidebar-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0 8px;
    margin-bottom: 6px;
}

.sub-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    transition: var(--transition);
}

.sub-sidebar-item:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.sub-sidebar-item.active {
    background: rgba(26, 86, 219, 0.1);
    color: var(--klab-primary);
    font-weight: 600;
}

/* Main Content Area */
.main-content {
    flex: 1;
    overflow-y: auto;
    background: var(--gray-50);
}

.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

.content-inner {
    padding: 32px;
    max-width: 1400px;
}

/* Page Header */
.page-header {
    margin-bottom: 28px;
}

.breadcrumb {
    font-size: 12px;
    color: var(--gray-400);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-separator {
    color: var(--gray-300);
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--gray-500);
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    margin-bottom: 20px;
}

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

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
}

.card-body {
    /* Default card content */
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--error);
}

/* Service Cards (Dashboard) */
.service-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.service-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.service-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.service-card.saleslog .service-card-icon {
    background: var(--saleslog-bg);
    color: var(--saleslog);
}

.service-card.industrybook .service-card-icon {
    background: var(--industrybook-bg);
    color: var(--industrybook);
}

.service-card.intellibuy .service-card-icon {
    background: var(--intellibuy-bg);
    color: var(--intellibuy);
}

.service-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
}

.service-card-tagline {
    font-size: 12px;
    color: var(--gray-500);
}

.service-card-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.service-stat {
    font-size: 11px;
    color: var(--gray-500);
}

.service-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.service-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.service-card.saleslog .service-card-btn {
    background: var(--saleslog-bg);
    color: var(--saleslog);
}

.service-card.industrybook .service-card-btn {
    background: var(--industrybook-bg);
    color: var(--industrybook);
}

.service-card.intellibuy .service-card-btn {
    background: var(--intellibuy-bg);
    color: var(--intellibuy);
}

.service-card-btn:hover {
    filter: brightness(0.95);
}

/* Activity Feed */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.5;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 11px;
    color: var(--gray-400);
}

/* Tags */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
}

.tag.pending {
    background: var(--warning-bg);
    color: var(--warning);
}

.tag.in-progress {
    background: var(--info-bg);
    color: var(--info);
}

.tag.completed {
    background: var(--success-bg);
    color: var(--success);
}

.tag.rejected {
    background: var(--error-bg);
    color: var(--error);
}

.tag.saleslog-tag {
    background: var(--saleslog-bg);
    color: var(--saleslog);
}

.tag.industrybook-tag {
    background: var(--industrybook-bg);
    color: var(--industrybook);
}

.tag.intellibuy-tag {
    background: var(--intellibuy-bg);
    color: var(--intellibuy);
}

/* Tab Bar */
.tab-bar {
    display: flex;
    gap: 6px;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 24px;
}

.tab-btn {
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    transition: var(--transition);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--klab-primary);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.tab-btn.active {
    color: var(--klab-primary);
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: var(--error);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 0 6px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.data-table tbody td {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--klab-primary);
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Approval Cards */
.approval-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    border: 1px solid var(--gray-200);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.approval-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gray-300);
}

.approval-left {
    flex: 1;
}

.approval-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.approval-meta {
    font-size: 12px;
    color: var(--gray-500);
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.approval-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
}

/* 수평적 결재자 레이아웃 */
.approvers-horizontal {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.approver-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1.5px solid var(--gray-200);
    transition: var(--transition);
    min-width: 200px;
}

.approver-item:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.approver-item.approved {
    background: var(--success-bg);
    border-color: var(--success-border);
}

.approver-item.rejected {
    background: var(--error-bg);
    border-color: var(--error-border);
}

.approver-item.pending {
    background: var(--gray-50);
    border-color: var(--gray-200);
}

.approver-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.approver-item.approved .approver-avatar {
    color: var(--success);
}

.approver-item.rejected .approver-avatar {
    color: var(--error);
}

.approver-item.pending .approver-avatar {
    color: var(--gray-400);
}

.approver-info {
    flex: 1;
}

.approver-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.approver-role {
    font-size: 11px;
    color: var(--gray-500);
}

.approver-status {
    flex-shrink: 0;
}

/* 기존 스타일 (호환성 유지) */
.approval-step {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--gray-500);
}

.approval-step.current {
    color: var(--klab-primary);
    font-weight: 600;
}

.approval-step.completed-step {
    color: var(--success);
}

.approval-arrow {
    color: var(--gray-300);
    font-size: 10px;
}

.approval-actions {
    display: flex;
    gap: 10px;
}

/* Pipeline (Kanban Style) */
.pipeline-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.pipeline-column {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 14px;
    min-height: 140px;
}

.pipeline-column-header {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pipeline-count {
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
}

.pipeline-card {
    background: white;
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--saleslog);
    cursor: pointer;
    transition: var(--transition);
}

.pipeline-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pipeline-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.pipeline-card-meta {
    font-size: 11px;
    color: var(--gray-500);
}

/* Catalog Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.catalog-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: var(--transition);
}

.catalog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.catalog-thumb {
    height: 130px;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.catalog-info {
    padding: 12px 14px;
}

.catalog-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.catalog-meta {
    font-size: 11px;
    color: var(--gray-500);
    display: flex;
    justify-content: space-between;
}

/* Purchase List */
.purchase-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.purchase-id {
    font-size: 12px;
    color: var(--gray-400);
    width: 80px;
}

.purchase-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-900);
}

.purchase-vendor {
    font-size: 12px;
    color: var(--gray-600);
    width: 110px;
}

.purchase-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
    width: 110px;
    text-align: right;
}

.purchase-date {
    font-size: 12px;
    color: var(--gray-500);
    width: 100px;
    text-align: right;
}

/* Billing Plans */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.plan-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 26px;
    border: 2px solid var(--gray-200);
    text-align: center;
    transition: var(--transition);
}

.plan-card:hover {
    border-color: var(--klab-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.plan-card.active-plan {
    border-color: var(--klab-primary);
    background: rgba(26, 86, 219, 0.05);
}

.plan-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.plan-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--klab-primary);
    margin-bottom: 6px;
}

.plan-price-unit {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 400;
}

.plan-features {
    list-style: none;
    text-align: left;
    margin: 18px 0;
}

.plan-features li {
    font-size: 13px;
    color: var(--gray-700);
    padding: 7px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-features li i {
    color: var(--success);
    font-size: 13px;
}

/* Notice Items */
.notice-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
}

.notice-item:hover {
    background: var(--gray-50);
}

.notice-item:hover .notice-title {
    color: var(--klab-primary);
}

.notice-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--gray-500);
    flex-shrink: 0;
}

.notice-content {
    flex: 1;
}

.notice-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
    transition: var(--transition);
}

.notice-date {
    font-size: 12px;
    color: var(--gray-500);
}

.notice-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
    background: var(--error);
    color: white;
    margin-left: 8px;
    vertical-align: middle;
}

/* Charts */
.chart-container {
    position: relative;
    height: 200px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.open {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box {
    background: white;
    border-radius: var(--radius-xl);
    padding: 30px 32px;
    width: 500px;
    max-width: 95vw;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    margin-bottom: 20px;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.modal-subtitle {
    font-size: 13px;
    color: var(--gray-500);
}

.modal-body {
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ─────────────────────────────────────────────
   Responsive Design
   ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pipeline-board {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .plan-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .sub-sidebar {
        display: none !important;
    }
    
    .gnb-center {
        display: none;
    }
    
    .content-inner {
        padding: 20px;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .service-select-grid {
        grid-template-columns: 1fr;
    }
    
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 32px 24px;
    }
    
    .sidebar {
        position: fixed;
        left: -240px;
        top: 56px;
        height: calc(100vh - 56px);
        z-index: 150;
        transition: left 0.3s ease;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .gnb-logo-text {
        display: none;
    }
    
    .catalog-grid {
        grid-template-columns: 1fr;
    }
}

/* ─────────────────────────────────────────────
   Utility Classes
   ───────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fw-medium { font-weight: 500; }

.text-muted { color: var(--gray-500); }
.text-primary { color: var(--klab-primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--error); }

/* ─────────────────────────────────────────────
   Animations
   ───────────────────────────────────────────── */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
