@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    --navy: #0B1D3A;
    --navy-light: #132B52;
    --teal: #00B4D8;
    --teal-dark: #0090AD;
    --white: #FFFFFF;
    --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;
    --green: #10B981;
    --green-bg: #ECFDF5;
    --orange: #F59E0B;
    --orange-bg: #FFFBEB;
    --blue: #3B82F6;
    --blue-bg: #EFF6FF;
    --red: #EF4444;
}

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

body {
    font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}

/* === Login === */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
}
.login-box {
    background: var(--white);
    border-radius: 16px;
    padding: 48px;
    width: 420px;
    max-width: 90%;
    box-shadow: 0 24px 48px rgba(0,0,0,0.2);
}
.login-logo { text-align: center; margin-bottom: 36px; }
.login-logo h1 { font-size: 28px; font-weight: 800; color: var(--navy); letter-spacing: -1px; }
.login-logo .sub { font-size: 13px; color: var(--teal); font-weight: 600; letter-spacing: 2px; margin-top: 4px; }
.login-logo .bar { width: 40px; height: 3px; background: var(--teal); margin: 16px auto 0; border-radius: 2px; }

.form-group { margin-bottom: 20px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--gray-600); display: block; margin-bottom: 8px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--teal);
}
.form-group textarea { min-height: 100px; resize: vertical; line-height: 1.6; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--navy); color: var(--white); width: 100%; padding: 14px; font-size: 15px; }
.btn-outline { background: var(--white); color: var(--navy); border: 2px solid var(--navy); width: 100%; padding: 14px; font-size: 15px; }
.btn-teal { background: var(--teal); color: var(--white); }
.btn-green { background: var(--green); color: var(--white); }
.btn-orange-outline { background: var(--white); color: var(--orange); border: 2px solid var(--orange); }
.btn-small { padding: 6px 14px; font-size: 12px; }
.btn-gray { background: var(--white); color: var(--gray-600); border: 1px solid var(--gray-300); }

.error-msg {
    background: #FEF2F2;
    border: 1px solid var(--red);
    color: var(--red);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
}
.success-msg {
    background: var(--green-bg);
    border: 1px solid var(--green);
    color: var(--green);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* === Header === */
.header {
    background: var(--navy);
    padding: 0 32px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.header-left .logo { font-size: 20px; font-weight: 800; color: var(--white); letter-spacing: -0.5px; text-decoration: none; }
.header-left .badge { font-size: 11px; color: var(--teal); font-weight: 600; letter-spacing: 1.5px; }
.header-right { display: flex; align-items: center; gap: 16px; }
.header-right .user-name { font-size: 13px; color: var(--gray-300); }
.header-right .btn-logout {
    padding: 6px 14px;
    background: rgba(255,255,255,0.1);
    color: var(--gray-300);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}

.container { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 32px 24px; }

/* === Stats === */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--white); border-radius: 12px; padding: 20px 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.stat-card .label { font-size: 12px; color: var(--gray-500); font-weight: 600; margin-bottom: 8px; }
.stat-card .value { font-size: 28px; font-weight: 800; }

/* === Card === */
.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
}
.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-header h2 { font-size: 16px; font-weight: 700; color: var(--navy); }
.card-body { padding: 24px; }

/* === Project List === */
.project-row {
    padding: 18px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
}
.project-row:hover { background: var(--gray-50); }
.project-row .title { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.project-row .meta { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.project-row .right { display: flex; align-items: center; gap: 16px; }
.project-row .stage { font-size: 12px; color: var(--gray-500); }
.project-row .arrow { color: var(--gray-400); font-size: 18px; }

/* === Client Project Card === */
.project-card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    border: 1px solid var(--gray-100);
    text-decoration: none;
    display: block;
    color: inherit;
}
.project-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-1px); }

/* === Badge === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; }
.badge-blue .dot { background: var(--blue); }
.badge-green .dot { background: var(--green); }
.badge-orange .dot { background: var(--orange); }

/* === Progress Timeline === */
.timeline-wrapper { padding: 24px 0; }
.timeline { display: flex; align-items: flex-start; justify-content: space-between; position: relative; }
.timeline-bar { position: absolute; top: 20px; left: 7%; right: 7%; height: 3px; background: var(--gray-200); }
.timeline-bar-active { position: absolute; top: 20px; left: 7%; height: 3px; background: var(--teal); transition: width 0.5s ease; }
.timeline-step { display: flex; flex-direction: column; align-items: center; z-index: 2; flex: 1; }
.timeline-dot {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; transition: all 0.3s ease;
}
.timeline-dot.completed { background: var(--teal); border: 2px solid var(--teal); color: var(--white); }
.timeline-dot.active { background: var(--navy); border: 2px solid var(--navy); color: var(--white); box-shadow: 0 0 0 4px rgba(0,180,216,0.2); }
.timeline-dot.pending { background: var(--white); border: 2px solid var(--gray-300); color: var(--gray-400); }
.timeline-label { margin-top: 8px; font-size: 11px; text-align: center; max-width: 80px; line-height: 1.3; }
.timeline-label.active { font-weight: 700; color: var(--navy); }
.timeline-label.pending { color: var(--gray-400); }

/* === Info Grid === */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: 13px; }
.info-row .label { color: var(--gray-500); }
.info-row .value { color: var(--gray-800); font-weight: 600; }

/* === Section Title === */
.section-title {
    font-size: 14px; font-weight: 700; color: var(--navy);
    margin: 0 0 16px; display: flex; align-items: center; gap: 8px;
}
.section-title .count { font-size: 11px; font-weight: 600; color: var(--gray-400); background: var(--gray-100); padding: 2px 8px; border-radius: 10px; }

/* === History === */
.history-item { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.history-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.history-dot.done { background: var(--teal); }
.history-dot.active { background: var(--orange); }
.history-dot.pending { background: var(--gray-300); }
.history-date { font-size: 12px; color: var(--gray-400); width: 55px; flex-shrink: 0; }
.history-text { font-size: 13px; }
.history-text.done { color: var(--gray-600); text-decoration: line-through; }
.history-text.active { color: var(--navy); font-weight: 700; }
.history-text.pending { color: var(--gray-400); }

/* === Video === */
.video-container { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 10px; overflow: hidden; background: var(--gray-800); }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-tip { margin-top: 12px; padding: 10px 14px; background: var(--blue-bg); border-radius: 8px; font-size: 12px; color: var(--blue); display: flex; align-items: center; gap: 8px; }
.video-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }

/* === Revision === */
.revision-item {
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--gray-100);
}
.revision-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.revision-author { font-size: 13px; font-weight: 700; color: var(--gray-700); }
.revision-date { font-size: 11px; color: var(--gray-400); margin-left: 10px; }
.revision-content { font-size: 13px; color: var(--gray-600); line-height: 1.7; white-space: pre-wrap; }
.revision-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.revision-images img { height: 100px; max-width: 180px; object-fit: cover; border-radius: 8px; border: 1px solid var(--gray-200); cursor: pointer; }
.revision-admin { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gray-200); display: flex; gap: 8px; }
.revision-reply { margin-top: 10px; padding: 12px; background: var(--white); border-radius: 8px; border-left: 3px solid var(--teal); }
.revision-reply .author { font-size: 12px; font-weight: 700; color: var(--teal); margin-bottom: 4px; }
.revision-reply .text { font-size: 13px; color: var(--gray-600); }

/* === Upload Area === */
.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    background: var(--gray-50);
    transition: all 0.2s;
    display: block;
    width: 100%;
    box-sizing: border-box;
}
.upload-area:hover, .upload-area.dragover { border-color: var(--teal); background: rgba(0,180,216,0.03); }
.upload-area .icon { font-size: 24px; margin-bottom: 4px; }
.upload-area .text { font-size: 13px; color: var(--gray-500); font-weight: 500; }
.upload-area .hint { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.upload-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.upload-preview .thumb { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--gray-200); }
.upload-preview .thumb img { height: 80px; max-width: 140px; object-fit: cover; display: block; }
.upload-preview .remove {
    position: absolute; top: 4px; right: 4px;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(0,0,0,0.6); color: var(--white);
    border: none; font-size: 11px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

/* === Write Box === */
.write-box { padding: 20px; background: var(--gray-50); border-radius: 10px; border: 1px solid var(--gray-200); margin-bottom: 20px; }
.write-box .title { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 12px; }

/* === Back Link === */
.back-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: var(--gray-500); font-size: 13px; cursor: pointer; padding: 0; margin-bottom: 16px; text-decoration: none; font-family: inherit; }

/* === Footer === */
.footer { text-align: center; padding: 24px; font-size: 11px; color: var(--gray-400); }

/* === Lightbox === */
.lightbox {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85);
    z-index: 1000; display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox img { max-width: 90%; max-height: 90%; border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.lightbox .close {
    position: absolute; top: 20px; right: 20px;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.15); color: var(--white);
    border: none; font-size: 20px; cursor: pointer;
}

/* === Responsive === */
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .info-grid { grid-template-columns: 1fr; }
    .header { padding: 0 16px; }
    .container, .container-narrow { padding: 20px 16px; }
    .login-box { padding: 32px 24px; }
    .timeline-dot { width: 32px; height: 32px; font-size: 14px; }
    .timeline-label { font-size: 9px; max-width: 60px; }
}
