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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
}

.hidden { display: none !important; }

/* Login Screen */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.login-card {
    background: #1e293b;
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid #334155;
    width: 100%;
    max-width: 400px;
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo h1 {
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

.logo p {
    color: #64748b;
    font-size: 0.875rem;
}

/* Dashboard */
.dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: #1e293b;
    border-bottom: 1px solid #334155;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h2 {
    color: #3b82f6;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-content {
    flex: 1;
    display: flex;
}

.sidebar {
    width: 250px;
    background: #1e293b;
    border-right: 1px solid #334155;
    padding: 2rem 0;
}

.nav-menu {
    list-style: none;
}

.nav-link {
    display: block;
    padding: 0.75rem 2rem;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background: #334155;
    color: #3b82f6;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #334155;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
    font-weight: 500;
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 0.375rem;
    color: #e2e8f0;
    font-size: 0.875rem;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #64748b;
    color: white;
}

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

.btn-danger {
    background: #ef4444;
    color: white;
}

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

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.article-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    overflow: hidden;
}

.article-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: #334155;
}

.article-content {
    padding: 1rem;
}

.article-category {
    background: #3b82f6;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.article-title {
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.article-excerpt {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.article-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.article-actions {
    display: flex;
    gap: 0.5rem;
}

/* Users Grid */
.users-grid {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    overflow: hidden;
}

.users-header {
    background: #334155;
    padding: 1rem;
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr 1fr;
    gap: 1rem;
    font-weight: 500;
}

.user-row {
    padding: 1rem;
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr 1fr;
    gap: 1rem;
    border-bottom: 1px solid #334155;
    align-items: center;
}

.user-row:last-child {
    border-bottom: none;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h4 {
    color: #e2e8f0;
}

.close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #e2e8f0;
}

.modal form {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Error */
.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        order: 2;
    }

    .content {
        order: 1;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .navbar {
        padding: 1rem;
    }
}
