/* Common styles for EZCRM */
:root {
    --primary-color: #3176FF;
    --secondary-color: #f0f5ff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #e5e7eb;
    --background-light: #f8fafc;
    --success-color: #10B981;
    --error-color: #EF4444;
    --warning-color: #F59E0B;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-3xl: 24px;
    --radius-full: 9999px;
    --radius-button: 8px;
}

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

body {
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    background-color: var(--background-light);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    font-size: 14px;
    color: #333;
}

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

a:hover {
    color: #2861d9;
}

/* Layout components */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* GNB (Global Navigation Bar) */
.gnb {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.gnb-logo {
    font-family: 'Pacifico', cursive;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-right: 1.5rem;
}

.gnb-title {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.gnb-title span {
    margin: 0 0.25rem;
}

.gnb-title .current {
    color: var(--text-primary);
    font-weight: 500;
}

.gnb-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gnb-user-avatar {
    width: 2rem;
    height: 2rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.gnb-user-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.gnb-logout {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.2s;
}

.gnb-logout:hover {
    color: var(--text-primary);
}

.gnb-notification {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    transition: background-color 0.2s;
}

.gnb-notification:hover {
    background-color: var(--background-light);
}

.gnb-notification-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 0.5rem;
    height: 0.5rem;
    background-color: var(--error-color);
    border-radius: var(--radius-full);
}

/* LNB (Local Navigation Bar) */
.lnb {
    background-color: white;
    border-right: 1px solid var(--border-color);
    width: 240px;
    height: calc(100vh - 4rem);
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: 4rem;
    padding: 1rem;
}

.lnb-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.lnb-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lnb-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all 0.2s;
    cursor: pointer;
    font-size: 0.875rem;
}

.lnb-item:hover:not(.lnb-item-active) {
    background-color: rgba(49, 118, 255, 0.05);
}

.lnb-item-active {
    background-color: rgba(49, 118, 255, 0.1);
    border-left: 3px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.lnb-item-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
}

/* Content area */
.content {
    margin-left: 240px;
    padding: 1.5rem;
    min-height: calc(100vh - 4rem);
    background-color: var(--background-light);
    overflow-y: auto;
}

.content-header {
    margin-bottom: 1.5rem;
}

.content-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.content-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.content-body {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

/* Search area */
.search-area {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

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

.search-item {
    display: flex;
    flex-direction: column;
}

.search-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-button);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(49, 118, 255, 0.1);
}

.search-select {
    position: relative;
    width: 100%;
}

.search-select select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-button);
    font-size: 0.875rem;
    appearance: none;
    background-color: white;
    transition: all 0.2s;
    padding-right: 2rem;
}

.search-select select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(49, 118, 255, 0.1);
}

.search-select::after {
    content: '';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
}

.search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-button);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-button:hover {
    background-color: #2861d9;
}

.search-button-icon {
    margin-right: 0.25rem;
}

/* Function buttons */
.function-buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.function-button {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-button);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.function-button:hover {
    background-color: var(--background-light);
}

.function-button-icon {
    margin-right: 0.25rem;
}

/* Table styles */
.table-container {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.table th {
    background-color: var(--background-light);
    font-weight: 600;
    color: var(--text-primary);
}

.table tbody tr:hover {
    background-color: rgba(49, 118, 255, 0.05);
}

.table-row {
    transition: background-color 0.2s;
}

.table-row:hover {
    background-color: rgba(49, 118, 255, 0.05);
}

/* Tab menu */
.tab-menu {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-list {
    display: flex;
    gap: 1.5rem;
}

.tab-item {
    padding: 0.75rem 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.tab-active {
    color: var(--primary-color);
    font-weight: 600;
}

.tab-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Status badges */
.status-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending {
    background-color: var(--border-color);
    color: var(--text-secondary);
}

.status-inprogress {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.status-completed {
    background-color: #d1fae5;
    color: #047857;
}

/* Custom checkbox */
.custom-checkbox {
    appearance: none;
    width: 1.125rem;
    height: 1.125rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-checkbox:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Custom switch */
.custom-switch {
    position: relative;
    display: inline-block;
    width: 2.25rem;
    height: 1.25rem;
}

.custom-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 1.25rem;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 1rem;
    width: 1rem;
    left: 0.125rem;
    bottom: 0.125rem;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .switch-slider {
    background-color: var(--primary-color);
}

input:checked + .switch-slider:before {
    transform: translateX(1rem);
}

/* Utility classes */
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success-color); }
.text-error { color: var(--error-color); }
.text-warning { color: var(--warning-color); }

.bg-primary { background-color: var(--primary-color); }
.bg-secondary { background-color: var(--secondary-color); }
.bg-success { background-color: var(--success-color); }
.bg-error { background-color: var(--error-color); }
.bg-warning { background-color: var(--warning-color); }
.bg-light { background-color: var(--background-light); }

.border { border: 1px solid var(--border-color); }
.rounded { border-radius: var(--radius-md); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }
.ml-5 { margin-left: 1.25rem; }
.ml-6 { margin-left: 1.5rem; }

.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }
.mr-5 { margin-right: 1.25rem; }
.mr-6 { margin-right: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

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

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }

.whitespace-normal { white-space: normal; }
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre { white-space: pre; }

.ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Login page styles */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--background-light);
    padding: 1rem;
}

.login-box {
    width: 100%;
    max-width: 400px;
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo h1 {
    font-family: 'Pacifico', cursive;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin: 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.login-form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.login-form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.login-form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.login-button {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-button:hover {
    background-color: #2861d9;
}

.login-error {
    padding: 0.75rem 1rem;
    background-color: #FEE2E2;
    border: 1px solid #FCA5A5;
    border-radius: var(--radius-md);
    color: var(--error-color);
    font-size: 0.875rem;
    margin-bottom: 1rem;
} 