/* ═══════════════════════════════════════════════════════════════════════════
   L&B SYSTEM - Admin Dashboard Styles
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+KR:wght@300;400;500;600;700&display=swap');

:root {
    --admin-primary: #6366f1;
    --admin-bg: #0f0f14;
    --admin-card: #1a1a24;
    --admin-border: rgba(255, 255, 255, 0.1);
    --admin-text: #ffffff;
    --admin-text-muted: rgba(255, 255, 255, 0.6);
    --admin-success: #10b981;
    --admin-danger: #ef4444;
    --admin-warning: #f59e0b;
}

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

body {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    background: var(--admin-bg);
    color: var(--admin-text);
    min-height: 100vh;
}

/* Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--admin-card);
    border-right: 1px solid var(--admin-border);
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
}

/* Sidebar */
.admin-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-decoration: none;
    color: var(--admin-text);
}

.admin-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    color: var(--admin-text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--admin-primary);
}

.admin-nav-link svg {
    width: 20px;
    height: 20px;
}

.admin-nav-divider {
    height: 1px;
    background: var(--admin-border);
    margin: 1rem 0;
}

/* Header */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    background: var(--admin-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Stats Cards */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    padding: 1.5rem;
}

.stat-card__label {
    font-size: 0.875rem;
    color: var(--admin-text-muted);
    margin-bottom: 0.5rem;
}

.stat-card__value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card__change {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.stat-card__change--up {
    color: var(--admin-success);
}

.stat-card__change--down {
    color: var(--admin-danger);
}

/* Cards */
.admin-card {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-card__title {
    font-size: 1.125rem;
    font-weight: 600;
}

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

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid var(--admin-border);
}

.admin-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--admin-text-muted);
    font-weight: 600;
}

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

/* Buttons */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.admin-btn--primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.admin-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.admin-btn--secondary {
    background: transparent;
    border: 1px solid var(--admin-border);
    color: var(--admin-text);
}

.admin-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.admin-btn--danger {
    background: var(--admin-danger);
    color: white;
}

.admin-btn--sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

.admin-btn svg {
    width: 16px;
    height: 16px;
}

/* Forms */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--admin-text-muted);
}

.form-input,
.form-textarea,
.form-select {
    padding: 0.875rem 1rem;
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    color: var(--admin-text);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge--unread {
    background: rgba(99, 102, 241, 0.2);
    color: var(--admin-primary);
}

.badge--read {
    background: rgba(255, 255, 255, 0.1);
    color: var(--admin-text-muted);
}

.badge--ai {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.badge--bigdata {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
}

.badge--cloud {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.badge--devops {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--admin-bg);
}

.login-card {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 400px;
}

.login-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-card__subtitle {
    text-align: center;
    color: var(--admin-text-muted);
    margin-bottom: 2rem;
}

.login-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--admin-danger);
    color: var(--admin-danger);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: none;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--admin-card);
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal__title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal__close {
    background: none;
    border: none;
    color: var(--admin-text-muted);
    cursor: pointer;
    font-size: 1.5rem;
}

/* Message Detail */
.message-detail__meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--admin-border);
}

.message-detail__item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.message-detail__label {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
    text-transform: uppercase;
}

.message-detail__content {
    line-height: 1.75;
    color: var(--admin-text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        display: none;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }

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