
/* ========================================
   WORK CENTER
   공통 디자인 스타일
   Version 0.0.1
======================================== */


/* ========================================
   01. 기본 색상 및 디자인 변수
======================================== */

:root {
    color-scheme: light;

    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;

    --header: #17263c;

    --background: #f1f5f9;
    --surface: #ffffff;
    --surface-secondary: #f8fafc;

    --text: #17263c;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --border: #e2e8f0;

    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;

    --sales: #2563eb;
    --accounting: #475569;
    --injection: #0d9488;
    --mold: #7c3aed;

    --status-requested: #dc2626;
    --status-confirmed: #d97706;
    --status-progress: #2563eb;
    --status-completed: #16a34a;
    --status-closed: #64748b;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);

    --font-family:
        "Pretendard",
        "Noto Sans KR",
        "Malgun Gothic",
        sans-serif;
}


/* ========================================
   02. 다크 모드
======================================== */

[data-theme="dark"] {
    color-scheme: dark;

    --primary: #60a5fa;
    --primary-hover: #3b82f6;
    --primary-light: #1e3a5f;

    --header: #111827;

    --background: #0f172a;
    --surface: #1e293b;
    --surface-secondary: #263449;

    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --border: #334155;

    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
}


/* ========================================
   03. 기본 초기화
======================================== */

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    font-size: 14px;
}

body {
    margin: 0;
    padding: 0;

    font-family: var(--font-family);
    color: var(--text);
    background: var(--background);

    line-height: 1.6;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

img {
    max-width: 100%;
}

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}


/* ========================================
   04. 공통 버튼
======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    font-size: 14px;
    font-weight: 600;

    transition: background 0.15s ease;
}

.btn-primary {
    background: #2563eb;
    color: #ffffff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--surface-secondary);
}

.btn-success {
    background: #15803d;
    color: #ffffff;
}

.btn-danger {
    background: #dc2626;
    color: #ffffff;
}

.btn-block {
    width: 100%;
}


/* ========================================
   05. 공통 입력창
======================================== */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;

    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.form-control {
    display: block;

    width: 100%;
    min-height: 46px;
    padding: 12px 14px;

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);

    background: var(--surface);
    color: var(--text);

    font-size: 14px;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--text-secondary);
    font-size: 13px;
}

.form-check input {
    width: 16px;
    height: 16px;

    margin: 0;
    accent-color: var(--primary);
}


/* ========================================
   06. 공통 카드
======================================== */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
}

.card-body {
    padding: 20px;
}


/* ========================================
   07. 알림 메시지
======================================== */

.alert {
    padding: 12px 16px;
    margin-bottom: 20px;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    font-size: 13px;
    overflow-wrap: anywhere;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-danger,
.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}


/* ========================================
   08. 로그인 페이지
======================================== */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100vh;
    min-height: 100dvh;

    padding: 24px;

    background: var(--background);
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    overflow: hidden;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-md);
}

.login-header {
    padding: 38px 24px;

    background: var(--header);
    color: #ffffff;

    text-align: center;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 56px;
    height: 56px;

    margin: 0 auto 16px;

    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.1);

    font-size: 20px;
    font-weight: 800;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
}

.login-header p {
    margin-top: 6px;

    color: #cbd5e1;
    font-size: 13px;
}

.login-body {
    padding: 32px;
}

.login-title {
    margin-bottom: 24px;

    font-size: 22px;
    font-weight: 700;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 24px;
}

.login-button {
    width: 100%;
    min-height: 48px;

    font-size: 15px;
}

.login-help {
    margin-top: 24px;
    padding-top: 20px;

    border-top: 1px solid var(--border);

    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
}

.login-footer {
    margin-top: 24px;

    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
}


/* ========================================
   09. 비밀번호 표시 버튼
======================================== */

.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 64px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;

    transform: translateY(-50%);

    padding: 6px 8px;

    background: transparent;
    border: none;
    border-radius: 4px;

    color: var(--text-secondary);
    font-size: 12px;
}

.password-toggle:hover {
    color: var(--primary);
}


/* ========================================
   10. 공통 상태 표시
======================================== */

.status-badge {
    display: inline-flex;
    align-items: center;

    padding: 4px 10px;
    border-radius: 5px;

    font-size: 12px;
    font-weight: 600;
}

.status-requested {
    color: #b91c1c;
    background: #fee2e2;
}

.status-confirmed {
    color: #92400e;
    background: #fef3c7;
}

.status-progress {
    color: #1d4ed8;
    background: #dbeafe;
}

.status-completed {
    color: #166534;
    background: #dcfce7;
}

.status-closed {
    color: #475569;
    background: #e2e8f0;
}


/* ========================================
   11. 부서별 색상
======================================== */

.department-sales {
    color: var(--sales);
}

.department-accounting {
    color: var(--accounting);
}

.department-injection {
    color: var(--injection);
}

.department-mold {
    color: var(--mold);
}


/* ========================================
   12. 공통 유틸리티
======================================== */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

.hidden {
    display: none !important;
}

.w-100 {
    width: 100%;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}


/* ========================================
   13. 모바일 반응형 디자인
======================================== */

@media (max-width: 600px) {

    .login-page {
        padding: 16px;
    }

    .login-container {
        max-width: 400px;
    }

    .login-header {
        padding: 30px 20px;
    }

    .login-header h1 {
        font-size: 25px;
    }

    .login-body {
        padding: 24px;
    }

    .form-control {
        font-size: 16px;
        min-height: 48px;
    }

    .login-button {
        min-height: 50px;
    }

    .card-body {
        padding: 16px;
    }
}


/* ========================================
   14. 모션 감소 설정
======================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
