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

/* Sidebar */
.admin-sidebar {
    width: 250px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.admin-sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid var(--border);
}

.admin-sidebar-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.admin-sidebar-logo:hover { color: var(--accent); }

.admin-sidebar-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 5px;
}

.admin-nav { padding: 15px 0; }

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}

.admin-nav-item:hover,
.admin-nav-item.active {
    background: var(--bg-tertiary);
    color: var(--accent);
}

.admin-nav-item span.icon { font-size: 18px; }

/* Main content */
.admin-main {
    flex: 1;
    margin-left: 250px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    height: 60px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 25px;
    gap: 15px;
}

.admin-user {
    text-align: right;
}

.admin-user-name {
    font-size: 14px;
    color: var(--text-primary);
}

.admin-user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.admin-logout {
    padding: 8px 15px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    text-decoration: none;
}

.admin-logout:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.admin-content {
    flex: 1;
    padding: 30px;
}

/* Page header */
.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-page-title {
    font-size: 1.75rem;
    margin: 0;
}

.admin-page-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 5px;
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    border-color: rgba(219, 9, 123, 0.5);
    transform: translateY(-2px);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    opacity: 0;
    transition: opacity 0.2s;
}

.stat-card:hover::after { opacity: 1; }

.stat-icon { font-size: 2rem; margin-bottom: 10px; }
.stat-label { font-size: 13px; color: var(--text-muted); }
.stat-value { font-size: 2rem; font-family: 'Orbitron', sans-serif; font-weight: 700; margin-top: 5px; }

.stat-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 10px;
    background: rgba(219, 9, 123, 0.2);
    color: var(--accent-light);
    font-size: 11px;
    border-radius: 20px;
}

/* Table */
.admin-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

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

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

.admin-table th {
    background: var(--bg-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-table tr:hover td { background: var(--bg-secondary); }

/* Badges */
.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.badge-new { background: rgba(219, 9, 123, 0.2); color: var(--accent-light); }
.badge-read { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.badge-archived { background: rgba(100, 100, 100, 0.2); color: var(--text-muted); }
.badge-featured { background: rgba(219, 9, 123, 0.2); color: var(--accent); }
.badge-external { background: rgba(100, 100, 100, 0.2); color: var(--text-muted); }

/* Action buttons */
.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.action-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.action-btn.danger:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* Cards */
.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.admin-card-title {
    font-size: 1.1rem;
    margin: 0;
}

/* Forms */
.form-row {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 768px) {
    .form-row.cols-2,
    .form-row.cols-3 { grid-template-columns: 1fr; }
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Alert messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Messages list */
.message-list { list-style: none; padding: 0; margin: 0; }

.message-item {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.message-item:last-child { border-bottom: none; }
.message-item:hover { background: var(--bg-secondary); }

.message-item.selected { background: var(--bg-tertiary); border-left: 3px solid var(--accent); }

.message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.message-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.message-dot.new { background: var(--accent); }
.message-dot.read { background: #22c55e; }
.message-dot.archived { background: var(--text-muted); }

.message-name { font-weight: 500; }
.message-date { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.message-preview { font-size: 14px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Message detail */
.message-detail {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 25px;
}

.message-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.message-detail-body {
    background: rgba(255,255,255,0.02);
    padding: 20px;
    border-radius: 8px;
    white-space: pre-wrap;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon { font-size: 3rem; margin-bottom: 15px; opacity: 0.5; }

/* Logo grid */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.logo-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.logo-card.hidden { opacity: 0.5; border-color: rgba(239, 68, 68, 0.3); }

.logo-card-image {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.logo-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-card-name {
    font-size: 14px;
    margin-bottom: 10px;
}

/* Filter tabs */
.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-tab {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.filter-tab:hover { color: var(--text-primary); }
.filter-tab.active { background: var(--accent); color: white; }

/* Responsive */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .admin-sidebar.open { transform: translateX(0); }
    
    .admin-main { margin-left: 0; }
}

/* Quick actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.quick-action:hover {
    background: rgba(219, 9, 123, 0.1);
    color: var(--accent);
}

.quick-action-icon { font-size: 1.5rem; margin-bottom: 10px; }
.quick-action-label { font-size: 13px; }
