/* Admin Panel Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0c0c0f;
    color: #e0e0e0;
    line-height: 1.6;
}

.admin-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: linear-gradient(135deg, #2c1a1a 0%, #1a1010 100%);
    padding: 1rem 2rem;
    border-bottom: 2px solid #d35400;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    color: #f39c12;
    font-size: 1.8rem;
}

.admin-header h1 i {
    margin-right: 10px;
    color: #d35400;
}

.admin-nav {
    display: flex;
    gap: 1rem;
}

.admin-content {
    display: flex;
    flex: 1;
}

.admin-sidebar {
    width: 250px;
    background: #1a1010;
    border-right: 1px solid #333;
    padding: 2rem 0;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h3 {
    color: #f39c12;
    padding: 0 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.sidebar-section ul {
    list-style: none;
}

.sidebar-section li {
    margin-bottom: 0.5rem;
}

.sidebar-section a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: #cccccc;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-section a:hover,
.sidebar-section a.active {
    background: rgba(211, 84, 0, 0.1);
    color: #f39c12;
    border-left-color: #d35400;
}

.sidebar-section a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.admin-main {
    flex: 1;
    padding: 2rem;
    background: #121218;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.section-header h2 {
    color: #f39c12;
    font-size: 1.5rem;
}

.section-header h2 i {
    margin-right: 10px;
    color: #d35400;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #d35400, #e67e22);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(211, 84, 0, 0.3);
}

.btn-secondary {
    background: rgba(211, 84, 0, 0.2);
    color: #f39c12;
    border: 1px solid #d35400;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: rgba(211, 84, 0, 0.3);
    color: #ffb347;
}

/* Articles List */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-item {
    background: rgba(40, 30, 30, 0.6);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.article-item:hover {
    border-color: #d35400;
    background: rgba(60, 40, 40, 0.8);
}

.article-info h3 {
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.article-meta {
    color: #999;
    font-size: 0.9rem;
}

.article-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid #3498db;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit:hover {
    background: rgba(52, 152, 219, 0.3);
}

.btn-delete {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid #e74c3c;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: rgba(231, 76, 60, 0.3);
}

/* Article Editor */
.article-editor {
    background: rgba(40, 30, 30, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
}

.article-editor h3 {
    color: #f39c12;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #f39c12;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    background: #1a1010;
    border: 1px solid #333;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #d35400;
    box-shadow: 0 0 0 2px rgba(211, 84, 0, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
}

/* Responsive Design */
@media (max-width: 968px) {
    .admin-content {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #333;
    }
    
    .sidebar-section {
        margin-bottom: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .article-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .article-actions {
        justify-content: center;
    }
}

/* Users table */
.users-wrap { background:#161620; border:1px solid #333; border-radius:8px; overflow:auto; }
.users-table { width:100%; border-collapse:collapse; }
.users-table th, .users-table td { padding:12px 14px; border-bottom:1px solid #2b2b36; text-align:left; }
.users-table thead th { background:linear-gradient(to bottom, #2c1a1a, #1a1010); color:#f39c12; border-bottom:2px solid #d35400; }
.users-table tr:hover td { background:rgba(211,84,0,0.08); }

.badge { padding:.15rem .5rem; border-radius:999px; font-size:.85rem; border:1px solid #444; }
.badge.admin { color:#ffd86b; border-color:#8e44ad; background:rgba(142,68,173,.15); }
.badge.member { color:#b7c7ff; border-color:#3498db; background:rgba(52,152,219,.15); }
.badge.deleted { color:#ffb1a8; border-color:#e74c3c; background:rgba(231,76,60,.15); }

.btn-danger-sm {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
  border: 1px solid #e74c3c;
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all .2s ease;
}
.btn-danger-sm:hover { background:rgba(231,76,60,.3); }

.users-empty { text-align:center; padding:24px; opacity:.8; }

.check-row { display:flex; align-items:center; gap:10px; border:1px solid #2a2a2a; border-radius:10px; padding:10px; background:#1b1b1b; }
.check-row.completed { opacity:.7; }
.check-drag { cursor:grab; opacity:.8; }
.check-title { font-weight:600; }
.check-meta { font-size:.9rem; opacity:.85; }
.check-actions { 
    margin-left:auto; display:flex; gap:6px; 
}

.check-desc {
  margin: 4px 0 0 26px; /* indent under checkbox */
  font-size: 0.9rem;
  color: #bbb;
  line-height: 1.4;
}