/* ========================================
   Report System — 보고서 작성/열람
   ======================================== */

/* --- Shared --- */
.rs-page {
    background: #0B1120;
    min-height: 100vh;
    font-family: var(--font-family);
    color: #E2E8F0;
}

/* --- Master Layout --- */
.rs-master-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

/* --- Sidebar --- */
.rs-sidebar {
    background: #0F172A;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 24px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.rs-sidebar-logo {
    padding: 0 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 16px;
}

.rs-sidebar-logo a {
    font-size: 20px;
    font-weight: 500;
    color: #FFFFFF;
    text-decoration: none;
}

.rs-sidebar-logo a strong {
    font-weight: 800;
    color: #93B4FF;
}

.rs-sidebar-logo small {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 4px;
}

.rs-sidebar-nav {
    padding: 0 12px;
}

.rs-sidebar-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 12px 12px 8px;
}

.rs-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    margin-bottom: 2px;
}

.rs-nav-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.rs-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

.rs-nav-item.active {
    background: rgba(37, 99, 235, 0.15);
    color: #93B4FF;
    font-weight: 600;
}

.rs-nav-badge {
    margin-left: auto;
    font-size: 11px;
    background: rgba(37, 99, 235, 0.2);
    color: #93B4FF;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
}

/* --- Main Content --- */
.rs-main {
    padding: 32px;
    overflow-y: auto;
}

.rs-main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.rs-main-title {
    font-size: 24px;
    font-weight: 800;
    color: #FFFFFF;
}

.rs-main-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
}

/* --- Report Type Cards --- */
.rs-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.rs-type-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.rs-type-card:hover {
    border-color: rgba(37, 99, 235, 0.3);
    background: rgba(37, 99, 235, 0.06);
    transform: translateY(-2px);
}

.rs-type-card.active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.rs-type-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.rs-type-icon.blue { background: rgba(37, 99, 235, 0.12); color: #93B4FF; }
.rs-type-icon.green { background: rgba(16, 185, 129, 0.12); color: #6EE7B7; }
.rs-type-icon.yellow { background: rgba(245, 158, 11, 0.12); color: #FCD34D; }
.rs-type-icon.purple { background: rgba(99, 102, 241, 0.12); color: #A5B4FC; }
.rs-type-icon.red { background: rgba(239, 68, 68, 0.12); color: #FCA5A5; }
.rs-type-icon.teal { background: rgba(20, 184, 166, 0.12); color: #5EEAD4; }
.rs-type-icon.orange { background: rgba(249, 115, 22, 0.12); color: #FDBA74; }

.rs-type-card h4 {
    font-size: 13px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.rs-type-card p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
}

/* --- Report Table --- */
.rs-table-wrap {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
}

.rs-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rs-table-title {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
}

.rs-table-actions {
    display: flex;
    gap: 8px;
}

.rs-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-family);
    border: none;
}

.rs-btn-primary {
    background: var(--primary);
    color: #FFFFFF;
}

.rs-btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.rs-btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rs-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

/* Table */
.rs-table {
    width: 100%;
    border-collapse: collapse;
}

.rs-table th {
    padding: 14px 20px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.rs-table td {
    padding: 16px 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.rs-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.rs-table tr {
    cursor: pointer;
    transition: background 0.15s;
}

/* Status badges */
.rs-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.rs-status-draft { background: rgba(148, 163, 184, 0.15); color: #94A3B8; }
.rs-status-published { background: rgba(16, 185, 129, 0.15); color: #6EE7B7; }
.rs-status-archived { background: rgba(245, 158, 11, 0.15); color: #FCD34D; }

/* Type badge */
.rs-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(37, 99, 235, 0.12);
    color: #93B4FF;
}

/* --- Wizard Form --- */
.rs-wizard {
    max-width: 800px;
}

.rs-wizard-steps {
    display: flex;
    gap: 4px;
    margin-bottom: 32px;
}

.rs-wizard-step {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    transition: background 0.3s;
}

.rs-wizard-step.done {
    background: var(--primary);
}

.rs-wizard-step.current {
    background: rgba(37, 99, 235, 0.5);
}

.rs-form-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
}

.rs-form-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 6px;
}

.rs-form-card p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 24px;
}

.rs-field {
    margin-bottom: 20px;
}

.rs-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.rs-field input,
.rs-field select,
.rs-field textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 14px;
    font-family: var(--font-family);
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.rs-field input:focus,
.rs-field select:focus,
.rs-field textarea:focus {
    border-color: rgba(37, 99, 235, 0.5);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.rs-field textarea {
    min-height: 120px;
    resize: vertical;
}

.rs-field select option {
    background: #1E293B;
    color: #E2E8F0;
}

.rs-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Wizard buttons */
.rs-wizard-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

/* --- Client Report View --- */
.rs-client-header {
    padding: 120px 0 48px;
    text-align: center;
    background: linear-gradient(180deg, #0F172A 0%, #0B1120 100%);
}

.rs-report-list {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

.rs-report-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.rs-report-card:hover {
    border-color: rgba(37, 99, 235, 0.2);
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
}

.rs-report-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.rs-report-card-info {
    flex: 1;
    min-width: 0;
}

.rs-report-card-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.rs-report-card-info p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

.rs-report-card-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.rs-report-card-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

/* --- Empty State --- */
.rs-empty {
    text-align: center;
    padding: 80px 24px;
}

.rs-empty i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
}

.rs-empty h3 {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.rs-empty p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.3);
}

/* --- Responsive --- */
@media (max-width: 1023px) {
    .rs-master-layout {
        grid-template-columns: 1fr;
    }

    .rs-sidebar {
        display: none;
    }

    .rs-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rs-field-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .rs-main {
        padding: 20px;
    }

    .rs-type-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .rs-type-card {
        padding: 16px 12px;
    }

    .rs-table-wrap {
        overflow-x: auto;
    }

    .rs-table {
        min-width: 600px;
    }

    .rs-report-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .rs-report-card-meta {
        align-items: flex-start;
        flex-direction: row;
        gap: 12px;
    }
}
