/* Modern Tailwind-Inspired Design System (Antigravity Design) */
@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@400;500;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-main: #f8fafc;
    --border-color: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --radius-sm: 4px;
    --radius-md: 6px;
    /* Tighter radius */
    --radius-lg: 10px;
    --linkColor: #2563eb;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    /*background-color: var(--bg-main);*/
    color: var(--text-main);
    line-height: 1.4;
    /* Tighter line height */
    margin: 0;
}

/* Container */
.container {
    padding: 12px;
    /* Reduced from 24px */
    max-width: 100%;
    margin: 0 auto;
}

/* Modern Tables */
.c-table,
.c-table-ins {
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.c-table th,
.c-table-ins th {
    background-color: #f1f5f9;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    /* Reduced */
    padding: 3px;
    /* Reduced */
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.c-table th {
    text-align: center;
}

.c-btn.exec {}

.c-table td,
.c-table-ins td {
    padding: 3px;
    /* Reduced vertical padding */
    font-size: 13px;
    /* Reduced */
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.c-table tr:last-child td,
.c-table-ins tr:last-child td {
    border-bottom: none;
}

.c-table tr:hover {
    background-color: #f8fafc;
    transition: background-color 0.1s ease;
}

/* Input Fields & Textarea */
.c-input,
.c-select,
.c-textarea {
    padding: 4px 4px;
    /* Tighter padding */
    font-size: 13px;
    /* Reduced from 14px */
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    color: var(--text-main);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.03);
}

.c-input:focus,
.c-select:focus,
.c-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.c-input[readonly] {
    background-color: #f3f4f6;
    color: var(--text-muted);
    cursor: not-allowed;
}

.c-textarea {
    min-height: 80px;
    /* Reduced from 120px */
    line-height: 1.5;
}

/* Premium Buttons */
.c-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    /* Reduced vertical & horizontal padding */
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    gap: 6px;
    border: 1px solid transparent;
    user-select: none;
    text-decoration: none;
}

.c-btn:active {
    transform: scale(0.97);
}

/* Button Variants */
.c-btn.white {
    background: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}

.c-btn.white:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.c-btn.blue {
    background: #2563eb;
    color: #ffffff;
}

.c-btn.blue:hover {
    background: #1d4ed8;
}

.c-btn.red {
    background: #ef4444;
    color: #ffffff;
}

.c-btn.red:hover {
    background: #dc2626;
}

.c-btn.green {
    background: #10b981;
    color: #ffffff;
}

.c-btn.green:hover {
    background: #059669;
}

.c-btn.gray {
    background: #64748b;
    color: #ffffff;
}

.c-btn.gray:hover {
    background: #475569;
}

.c-btn.purple {
    background: #8b5cf6;
    color: #ffffff;
}

.c-btn.purple:hover {
    background: #7c3aed;
}

.c-btn.yellow {
    background: #f59e0b;
    color: #ffffff;
}

.c-btn.yellow:hover {
    background: #d97706;
}

.c-btn.exec {
    background: #f97316;
    color: #ffffff;
}

.c-btn.exec:hover {
    background: #ea580c;
}

.c-btn.sky {
    background: #0ea5e9;
    color: #ffffff;
}

.c-btn.sky:hover {
    background: #0284c7;
}

.c-btn.search {
    background: #475569;
    color: #ffffff;
}

.c-btn.search:hover {
    background: #334155;
}

/* Paging */
.paging {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: 16px;
    /* Reduced from 24px */
    list-style: none;
    padding: 0;
}

.paging li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    /* Reduced from 36px */
    height: 30px;
    font-size: 13px;
    color: var(--text-main);
    text-decoration: none;
    border-radius: var(--radius-sm);
    background: #ffffff;
    border: 1px solid var(--border-color);
    transition: all 0.15s;
}

.paging li a:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.paging li a.on {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    font-weight: 700;
}

/* Forms & Layouts */
.c-form {
    background-color: #ffffff;
    padding: 16px;
    /* Reduced from 32px */
    border-radius: var(--radius-md);
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.c-fieldset {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    /* Reduced from 24px */
    margin-bottom: 12px;
}

.c-fieldset legend {
    font-weight: 700;
    color: var(--text-main);
    padding: 0 8px;
    font-size: 14px;
}

/* Special Elements (Electronic Approval etc.) */
.eapp-box {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.eapp-item {
    width: 90px;
    /* Reduced */
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.eapp-close {
    color: #ef4444;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
}

/* Utilities */
.w100 {
    width: 100% !important;
}

.tc {
    text-align: center !important;
}

.wsnw {
    white-space: nowrap !important;
    text-align: center;
}

/* Slim Select Customization */
.ss-main {
    border-radius: var(--radius-sm) !important;
    border-color: #d1d5db !important;
    height: 30px !important;
    /* Managed size */
}

.ss-main:focus {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1) !important;
    border-color: var(--primary) !important;
}

/* Modern Chosen Select Styling */
.chosen-container {
    font-size: 13px !important;
    vertical-align: middle;
    /*width: auto !important;*/
    min-width: 120px;
}

.chosen-container-single .chosen-single {
    height: 30px !important;
    line-height: 28px !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.03) !important;
    padding: 0 10px !important;
    color: var(--text-main) !important;
    transition: all 0.15s ease !important;
    display: block !important;
    position: relative !important;
}

.chosen-container-active.chosen-with-drop .chosen-single {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1) !important;
}

.chosen-container-single .chosen-single div b {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") no-repeat center center !important;
    background-size: 12px !important;
}

.chosen-container .chosen-drop {
    border: 1px solid var(--border-color) !important;
    border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    margin-top: -1px !important;
    background: #ffffff !important;
    padding: 2px !important;
}

.chosen-container .chosen-results {
    color: var(--text-main) !important;
    margin: 0 !important;
    padding: 2px !important;
    max-height: 200px !important;
}

.chosen-container .chosen-results li {
    padding: 6px 10px !important;
    border-radius: var(--radius-sm) !important;
    transition: all 0.1s ease !important;
    white-space: nowrap !important;
}

.chosen-container .chosen-results li.highlighted {
    background-color: var(--primary) !important;
    background-image: none !important;
    color: #ffffff !important;
}

.chosen-container-active .chosen-single {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1) !important;
}

.chosen-container .chosen-search input[type="text"] {
    padding: 6px 10px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    margin: 4px 0 !important;
    font-family: inherit !important;
}

select.chosen-select {
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

img,
video {
    max-width: initial;
}