/* === Reset & Base === */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: Arial, Helvetica, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; background: #f5f7fa; color: #1a1a2e; line-height: 1.6; }
.sidebar-logo { width: 40px; height: 40px; margin-bottom: 8px; border-radius: 8px; }
a { text-decoration: none; color: inherit; }

/* === App Layout === */
.app-layout { display: flex; min-height: 100vh; }

/* === Sidebar === */
.sidebar {
    width: 240px; background: #1a1a2e; color: #fff;
    display: flex; flex-direction: column; position: fixed;
    top: 0; left: 0; bottom: 0; z-index: 100;
}
.sidebar-header { padding: 24px 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); text-align: center; }
.logo { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.header-logo { height: 50px; width: auto; background: #fff; border-radius: 8px; padding: 4px; }
.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px; color: rgba(255,255,255,0.7);
    transition: all 0.2s; font-size: 14px;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: rgba(59,130,246,0.2); color: #3b82f6; border-right: 3px solid #3b82f6; }
.nav-icon { width: 24px; display: flex; align-items: center; justify-content: center; }
.nav-icon svg { color: inherit; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; }
.user-info { display: flex; align-items: center; justify-content: center; gap: 8px; }
.user-name { font-size: 13px; color: rgba(255,255,255,0.9); }
.user-role { font-size: 11px; }
.logout-btn {
    display: block; text-align: center; padding: 8px;
    background: rgba(255,255,255,0.08); border-radius: 8px;
    color: rgba(255,255,255,0.6); font-size: 13px; transition: all 0.2s;
}
.logout-btn:hover { background: rgba(239,68,68,0.2); color: #ef4444; }
.pw-change-btn {
    display: block; text-align: center; padding: 6px;
    color: rgba(255,255,255,0.5); font-size: 12px; transition: all 0.2s; margin-bottom: 6px;
}
.pw-change-btn:hover { color: rgba(255,255,255,0.9); }
.text-muted { color: #9ca3af; font-size: 12px; display: block; margin-top: 4px; }

/* === Main Content === */
.main-content { flex: 1; margin-left: 240px; padding: 0; }
.content-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 32px; background: #fff;
    border-bottom: 1px solid #e5e7eb;
}
.content-header h2 { font-size: 20px; font-weight: 700; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.content-body { padding: 24px 32px; }

/* === Flash Messages === */
.flash-messages { padding: 0 32px; margin-top: 16px; }
.flash {
    padding: 12px 16px; border-radius: 8px; margin-bottom: 8px;
    font-size: 14px; animation: fadeIn 0.3s;
}
.flash-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.flash-info { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }

/* === Cards === */
.card {
    background: #fff; border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); overflow: hidden;
}
.card-header {
    padding: 16px 20px; border-bottom: 1px solid #f3f4f6;
    display: flex; justify-content: space-between; align-items: center;
}
.card-header h3 { font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }
.mb { margin-bottom: 20px; }
.mt { margin-top: 20px; }

/* === Tables === */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table thead th {
    text-align: left; padding: 10px 12px;
    font-weight: 600; color: #6b7280; font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 2px solid #f3f4f6;
}
.table tbody td { padding: 12px; border-bottom: 1px solid #f9fafb; }
.table tbody tr:hover { background: #f9fafb; }
.table tbody tr:nth-child(even) { background: #fafbfc; }
.table tbody tr:nth-child(even):hover { background: #f3f4f6; }
.clickable-row { cursor: pointer; }
.name-cell { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: #3b82f6; color: #fff; display: flex;
    align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.amount-cell { font-weight: 600; font-variant-numeric: tabular-nums; }

/* === Badges === */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 500; white-space: nowrap;
}
.badge-blue { background: #eff6ff; color: #2563eb; }
.badge-green { background: #ecfdf5; color: #059669; }
.badge-red { background: #fef2f2; color: #dc2626; }
.badge-yellow { background: #fffbeb; color: #d97706; }
.badge-gray { background: #f3f4f6; color: #6b7280; }
.badge-purple { background: #f5f3ff; color: #7c3aed; }

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 16px; border-radius: 8px; font-size: 14px;
    font-weight: 500; border: none; cursor: pointer;
    transition: all 0.2s; gap: 6px; white-space: nowrap;
}
.btn-primary { background: #3b82f6; color: #fff; }
.btn-primary:hover { background: #2563eb; }
.btn-secondary { background: #f3f4f6; color: #374151; }
.btn-secondary:hover { background: #e5e7eb; }
.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-outline { background: transparent; color: #6b7280; border: 1px solid #d1d5db; }
.btn-outline:hover { background: #f9fafb; border-color: #9ca3af; }
.btn-full { width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }

/* === Forms === */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: #374151; }
.form-group.full-width { grid-column: 1 / -1; }
.input {
    padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 14px; transition: border-color 0.2s; outline: none;
    font-family: inherit;
}
.input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.input-sm { padding: 4px 8px; font-size: 12px; }
textarea.input { resize: vertical; }
select.input {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center; background-size: 12px;
    padding-right: 28px;
}
.form-actions { margin-top: 20px; display: flex; gap: 8px; }
.form-section-title { font-size: 14px; font-weight: 600; color: #374151; margin: 20px 0 8px; padding-bottom: 6px; border-bottom: 1px solid #e5e7eb; }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #6b7280; }
.breadcrumb a { color: #3b82f6; cursor: pointer; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb a.active, .breadcrumb span.active { color: #1a1a2e; font-weight: 600; }
.breadcrumb-sep { color: #d1d5db; }

/* Expense sub-tabs */
.expense-tabs { display: flex; gap: 0; border-bottom: 2px solid #e5e7eb; }
.expense-tab { padding: 10px 20px; font-size: 14px; font-weight: 500; color: #6b7280; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.expense-tab:hover { color: #3b82f6; }
.expense-tab.active { color: #3b82f6; border-bottom-color: #3b82f6; font-weight: 600; }

/* Date range form */
.date-range-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.date-range-group { display: flex; flex-direction: column; gap: 4px; }
.date-label { font-size: 12px; font-weight: 500; color: #6b7280; }
.date-sep { font-size: 16px; color: #9ca3af; padding-bottom: 8px; }

/* Selected row highlight */
.row-selected { background: #eff6ff !important; }
.row-selected td { font-weight: 600; }

/* Member profile */
.member-profile { max-width: 600px; }
.profile-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #e5e7eb; }
.avatar-lg { width: 56px; height: 56px; border-radius: 50%; background: #3b82f6; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex-shrink: 0; }
.profile-name-area { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-name-area h3 { font-size: 20px; margin: 0; }
.profile-details { display: flex; flex-direction: column; gap: 0; }
.profile-row { display: flex; padding: 12px 0; border-bottom: 1px solid #f3f4f6; }
.profile-row label { width: 100px; font-size: 13px; color: #6b7280; font-weight: 500; flex-shrink: 0; }
.profile-row span { font-size: 14px; }
.inline-form { display: inline-flex; gap: 4px; }

/* === Filter Bar === */
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-bar .input { max-width: 200px; }

/* === Detail Grid === */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.detail-item label { display: block; font-size: 12px; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.detail-item span { font-size: 15px; }

/* === Dashboard === */
.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
    background: #fff; border-radius: 12px; padding: 20px;
    display: flex; align-items: center; gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.stat-icon.blue { background: #eff6ff; }
.stat-icon.green { background: #ecfdf5; }
.stat-icon.yellow { background: #fffbeb; }
.stat-icon.purple { background: #f5f3ff; }
.stat-label { font-size: 13px; color: #6b7280; display: block; }
.stat-value { font-size: 20px; font-weight: 700; }
.dashboard-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }

/* === Pipeline === */
.pipeline-bar { display: flex; gap: 12px; justify-content: space-around; }
.pipeline-item { text-align: center; }
.pipeline-label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.pipeline-count { font-size: 24px; font-weight: 700; color: #3b82f6; }

.pipeline-board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
.pipeline-column { background: #f9fafb; border-radius: 12px; padding: 12px; min-height: 200px; }
.pipeline-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 4px; margin-bottom: 8px; font-weight: 600; font-size: 14px;
}
.pipeline-badge {
    background: #3b82f6; color: #fff; width: 22px; height: 22px;
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 11px;
}
.pipeline-cards { display: flex; flex-direction: column; gap: 8px; }
.pipeline-card {
    background: #fff; border-radius: 8px; padding: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06); border: 1px solid #f3f4f6;
}
.pipeline-card-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.pipeline-card-info { font-size: 12px; color: #6b7280; }
.pipeline-card-note { font-size: 12px; color: #9ca3af; margin-top: 4px; }
.pipeline-move { margin-top: 8px; }

/* === Expense Summary === */
.expense-summary { display: flex; flex-direction: column; gap: 8px; }
.expense-row { display: flex; justify-content: space-between; padding: 8px 0; }
.expense-row.total { border-top: 2px solid #f3f4f6; font-weight: 700; padding-top: 12px; }
.amount { font-weight: 600; font-variant-numeric: tabular-nums; }

/* === Leave Balance === */
.leave-balance { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.balance-item { text-align: center; }
.balance-label { display: block; font-size: 12px; color: #6b7280; }
.balance-value { font-size: 24px; font-weight: 700; }
.balance-value.used { color: #ef4444; }
.balance-value.remaining { color: #3b82f6; }
.balance-bar-wrap {
    flex: 1; min-width: 200px; height: 8px;
    background: #f3f4f6; border-radius: 4px; overflow: hidden;
}
.balance-bar { height: 100%; background: #3b82f6; border-radius: 4px; transition: width 0.5s; }

/* === Payslip === */
.payslip-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.payslip-header h3 { font-size: 18px; }
.payslip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; align-items: stretch; }
.payslip-section { display: flex; flex-direction: column; }
.payslip-section h4 { font-size: 14px; color: #6b7280; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #f3f4f6; }
.payslip-section .form-group { margin-bottom: 4px; }
.payslip-section .form-group label { margin-top: 4px; }
.payslip-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.payslip-row.total { border-top: 1px solid #e5e7eb; margin-top: 8px; padding-top: 10px; font-weight: 700; }
.payslip-net {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px; background: #eff6ff; border-radius: 12px; font-weight: 700;
}
.net-amount { font-size: 24px; color: #2563eb; }

/* === Monthly Summary === */
.monthly-summary { display: flex; gap: 16px; flex-wrap: wrap; }
.month-item {
    background: #f9fafb; border-radius: 8px; padding: 12px 16px;
    min-width: 150px; text-align: center;
}
.month-label { display: block; font-size: 13px; color: #6b7280; margin-bottom: 4px; }
.month-amount { font-size: 16px; font-weight: 700; }

/* === Login === */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #1a1a2e; }
.login-container { width: 100%; max-width: 400px; padding: 20px; }
.login-card { background: #fff; border-radius: 16px; padding: 40px 32px; box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.login-header { text-align: center; margin-bottom: 32px; }
.login-logo { font-size: 40px; font-weight: 800; color: #3b82f6; }
.login-logo-img-sm { max-width: 70px; height: auto; margin-bottom: 8px; }
.login-title-kr { font-size: 36px; font-weight: 800; color: #1a1a2e; margin-top: 4px; }
.login-subtitle { color: #6b7280; font-size: 14px; margin-top: 4px; }
.login-form .form-group input { padding: 14px 16px; font-size: 16px; height: auto; }
.login-form .form-group { margin-bottom: 16px; }
.login-form .btn { margin-top: 8px; }
.login-hint { margin-top: 20px; text-align: center; font-size: 12px; color: #9ca3af; }
.login-hint p { margin: 2px 0; }
.login-register { margin-top: 16px; text-align: center; }
.login-register a { color: #3b82f6; font-size: 14px; text-decoration: none; }
.login-register a:hover { text-decoration: underline; }

/* === Animations === */
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* === Balance Note === */
.balance-note { font-size: 12px; color: #9ca3af; margin-top: 12px; }

/* === Leave Balance Grid === */
.leave-balance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.balance-card {
    background: #f9fafb; border-radius: 10px; padding: 14px;
    border: 1px solid #f3f4f6; cursor: pointer; transition: all 0.2s;
    display: block; text-decoration: none; color: inherit;
}
.balance-card:hover { border-color: #3b82f6; background: #eff6ff; }
.balance-card-active { border-color: #3b82f6; background: #eff6ff; box-shadow: 0 0 0 2px rgba(59,130,246,0.3); }
.balance-card-name { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.balance-card-row { display: flex; gap: 12px; font-size: 13px; margin-bottom: 8px; }
.balance-card-row .used { color: #ef4444; }
.balance-card-row .remaining { color: #3b82f6; }
.balance-card-link { display: block; text-decoration: none; color: inherit; }
.balance-edit-form {
    display: flex; gap: 6px; align-items: center; margin-top: 8px;
    padding-top: 8px; border-top: 1px solid #e5e7eb;
}
.balance-edit-form .input-sm { width: 70px; padding: 4px 6px; font-size: 12px; text-align: center; }

/* === Career Summary View === */
.career-summary-view { line-height: 1.8; }
.career-company { margin-top: 12px; margin-bottom: 4px; font-size: 14px; color: #1a1a2e; }
.career-company:first-child { margin-top: 0; }
.career-role { margin-left: 16px; font-size: 13px; color: #3b82f6; margin-bottom: 4px; }
.career-bullet { margin-left: 24px; font-size: 13px; color: #4b5563; padding-left: 12px; position: relative; }
.career-bullet::before { content: "•"; position: absolute; left: 0; color: #9ca3af; }
.career-line { font-size: 13px; color: #374151; }

/* === Upload Status === */
.upload-status { font-size: 13px; margin-left: 8px; }
.upload-status.success { color: #059669; }
.upload-status.error { color: #dc2626; }

/* === Text colors === */
.text-green { color: #059669; }
.text-red { color: #dc2626; }

/* === Truncate === */
.truncate { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* === Filter divider === */
.filter-divider { color: #d1d5db; margin: 0 4px; }

/* === Full width detail === */
.full-width-detail { grid-column: 1 / -1; }

/* === CSV upload === */
.csv-upload-info { margin-bottom: 12px; }
.csv-upload-info code { background: #f3f4f6; padding: 2px 8px; border-radius: 4px; font-size: 13px; }

/* === Active month === */
.month-item a { color: inherit; display: block; }
.month-item.active-month { border: 2px solid #3b82f6; }

/* === Hamburger Button (hidden on desktop) === */
.hamburger-btn {
    display: none; position: fixed; top: 12px; left: 12px; z-index: 201;
    width: 40px; height: 40px; background: #1a1a2e; border: none; border-radius: 8px;
    cursor: pointer; padding: 10px 8px; flex-direction: column; justify-content: space-between;
}
.hamburger-btn span {
    display: block; width: 100%; height: 2px; background: #fff; border-radius: 2px;
    transition: all 0.3s;
}
.hamburger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.sidebar-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 99;
}

/* === Table scroll wrapper === */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* === No wrap for names and amounts === */
.name-nowrap { white-space: nowrap; }
.amount-cell { white-space: nowrap; }
.table thead th { white-space: nowrap; }

/* === Responsive === */
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-row { grid-template-columns: 1fr; }
    .pipeline-board { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    /* Hamburger visible */
    .hamburger-btn { display: flex; }

    /* Sidebar: hidden by default, slide in from left */
    .sidebar {
        width: 240px; transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }

    /* Main content: full width, no left margin */
    .main-content { margin-left: 0; }

    /* Content header: leave room for hamburger */
    .content-header { padding: 12px 16px 12px 60px; }
    .content-header h2 { font-size: 17px; }
    .header-actions { gap: 4px; flex-wrap: wrap; }
    .header-actions .btn { padding: 6px 10px; font-size: 12px; }
    .header-logo { height: 36px; }

    /* Content body: tight padding */
    .content-body { padding: 12px; }
    .flash-messages { padding: 0 12px; }

    /* Cards */
    .card-header { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
    .card-body { padding: 14px; }

    /* Tables: scrollable, compact */
    .card-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table { font-size: 13px; min-width: 500px; }
    .table thead th { padding: 8px 8px; font-size: 11px; }
    .table tbody td { padding: 8px 8px; }

    /* Dashboard */
    .dashboard-grid { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
    .stat-card { padding: 12px; gap: 10px; }
    .stat-icon { width: 36px; height: 36px; font-size: 18px; border-radius: 8px; }
    .stat-label { font-size: 11px; }
    .stat-value { font-size: 16px; }
    .dashboard-row { grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }

    /* Pipeline */
    .pipeline-board { grid-template-columns: 1fr 1fr; gap: 8px; }
    .pipeline-bar { gap: 8px; }
    .pipeline-count { font-size: 20px; }

    /* Forms */
    .form-grid { grid-template-columns: 1fr; }
    .form-actions { flex-wrap: wrap; }

    /* Payslip */
    .payslip-grid { grid-template-columns: 1fr; gap: 16px; }
    .payslip-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .payslip-net { padding: 14px; flex-wrap: wrap; }
    .net-amount { font-size: 20px; }

    /* Expense tabs */
    .expense-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .expense-tab { padding: 8px 14px; font-size: 13px; white-space: nowrap; }

    /* Date range */
    .date-range-form { flex-direction: column; align-items: stretch; gap: 8px; }
    .date-range-group { flex-direction: row; align-items: center; gap: 8px; }
    .date-label { min-width: 40px; }
    .date-sep { text-align: center; padding: 0; }

    /* Filter bar */
    .filter-bar { flex-direction: column; align-items: stretch; gap: 6px; }
    .filter-bar .input { max-width: none; }
    .filter-bar .btn { width: 100%; }

    /* Breadcrumb */
    .breadcrumb { font-size: 13px; flex-wrap: wrap; }

    /* Leave balance */
    .leave-balance { gap: 16px; }
    .leave-balance-grid { grid-template-columns: 1fr; }
    .balance-card-row { flex-wrap: wrap; }

    /* Member profile */
    .member-profile { max-width: 100%; }
    .profile-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .profile-row { flex-direction: column; gap: 4px; }
    .profile-row label { width: auto; }

    /* Badges in tables */
    .badge { font-size: 11px; padding: 2px 7px; }

    /* Login page */
    .login-card { padding: 28px 20px; }
    .login-title-kr { font-size: 28px; }

    /* Misc */
    .mb { margin-bottom: 12px; }
    .truncate { max-width: 120px; }
    .detail-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

    /* AI subscription - make table responsive too */
    .payslip-section { min-width: 0; }
}

@media (max-width: 480px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .pipeline-board { grid-template-columns: 1fr; }
    .stat-card { flex-direction: row; }
    .detail-grid { grid-template-columns: 1fr; }
    .content-header { padding: 10px 12px 10px 56px; }
    .table { min-width: 400px; }
}
