/* assets/css/admin.css - Premium Dynamic Admin Dashboard & UI Kit */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --border-color: #e2e8f0;
    --border-highlight: var(--accent-primary, #2563eb);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-dim: #94a3b8;

    --accent-primary: #2563eb;
    --accent-primary-hover: #1d4ed8;
    --accent-secondary: #3b82f6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;

    --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
    --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --font-family: 'Inter', 'Noto Sans KR', 'Malgun Gothic', '맑은 고딕', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Glassmorphism background effect */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background: 
        radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(79, 70, 229, 0.05) 0%, transparent 40%);
}

/* Layout */
.admin-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: #ffffff;
    backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.02);
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.sidebar-brand span {
    color: var(--accent-primary);
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-link:hover {
    color: var(--text-main);
    background: #f1f5f9;
}

.nav-link.active {
    color: #ffffff !important;
    background: var(--accent-primary) !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12) !important;
    font-weight: 700 !important;
}
.nav-link.active i, .nav-link.active svg {
    color: #ffffff !important;
}

.user-profile {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info .username {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.user-info .role {
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-weight: 600;
}

/* Main Content Area */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.admin-header {
    height: 70px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.header-title h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

.admin-content {
    padding: 2rem;
    flex: 1;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #ffffff;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-subtle);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-highlight);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin: 0.5rem 0;
    color: var(--text-main);
}

.stat-card .stat-desc {
    font-size: 0.75rem;
    color: var(--accent-success);
    font-weight: 600;
}

/* UI Elements: Buttons, Tables, Cards */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.btn-primary:hover {
    background: var(--accent-primary-hover, var(--accent-primary));
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-danger {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: #fee2e2;
}

/* Tables */
.card-panel {
    background: #ffffff;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-subtle);
}

.card-panel .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

.data-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8fafc;
}

.data-table tr:hover td {
    background: #f8fafc;
}

/* Login Page Styles */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

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

.login-card .login-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: var(--font-family);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

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

.badge-primary { background: #e0e7ff; color: #4338ca; }
.badge-success { background: #d1fae5; color: #047857; }
.badge-warning { background: #fef3c7; color: #b45309; }

/* ⚡ Line Icons (Lucide System) Standard Styles */
.lucide, svg.icon-line {
    width: 18px;
    height: 18px;
    stroke-width: 2px;
    vertical-align: -3px;
    display: inline-block;
}
.icon-xs { width: 14px; height: 14px; stroke-width: 2px; vertical-align: -2px; }
.icon-sm { width: 16px; height: 16px; stroke-width: 2px; vertical-align: -2px; }
.icon-md { width: 18px; height: 18px; stroke-width: 2px; vertical-align: -3px; }
.icon-lg { width: 22px; height: 22px; stroke-width: 2px; vertical-align: -4px; }

/* ─── Summernote Modal & Dialog Global Fix ─── */
.note-modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.6) !important;
    z-index: 99990 !important;
}
.note-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
}
.note-modal.open {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.note-modal .note-modal-content {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25) !important;
    border: 1px solid #e2e8f0 !important;
    max-width: 520px !important;
    width: 90% !important;
    margin: auto !important;
    position: relative !important;
    z-index: 100000 !important;
}
.note-modal .note-modal-header {
    padding: 1rem 1.25rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
.note-modal .note-modal-title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}
.note-modal .note-modal-body {
    padding: 1.25rem !important;
}
.note-modal .note-modal-footer {
    padding: 0.75rem 1.25rem !important;
    border-top: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 0.5rem !important;
}
.note-modal .note-btn {
    border-radius: 6px !important;
    font-size: 0.85rem !important;
    padding: 0.4rem 0.85rem !important;
}
.note-modal .note-btn-primary {
    background: var(--accent-primary, #2563eb) !important;
    color: #fff !important;
    border: none !important;
}
.note-modal .note-input {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.9rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ─── Global & Editor Custom Scrollbars ──────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}



