
:root {
    --bg: #050805;
    --surface: #0b100b;
    --card: #101810;
    --green: #a3ff12;
    --white: #f5f8f2;
    --muted: #899387;
    --border: rgba(163,255,18,.13);
    --red: #ff5555;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--white);
    font-family: 'Inter', sans-serif;
}

button, input, textarea, select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    text-decoration: none;
    color: inherit;
}

[hidden] {
    display: none !important;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -1.5px;
}

.logo span,
.logo b {
    color: var(--green);
}

/* LOGIN */

.login-screen {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px;
    background:
        radial-gradient(circle at 50% 20%, rgba(163,255,18,.09), transparent 35%),
        var(--bg);
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 45px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 25px 80px rgba(0,0,0,.4);
}

.login-card > .logo {
    display: inline-block;
    margin-bottom: 40px;
}

.login-icon {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    background: rgba(163,255,18,.1);
    color: var(--green);
    display: grid;
    place-items: center;
    font-size: 25px;
    margin-bottom: 25px;
}

.eyebrow {
    display: block;
    color: var(--green);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.login-card h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 35px;
    margin-bottom: 10px;
}

.login-card h1 span {
    color: var(--green);
}

.login-card > p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
    margin-bottom: 30px;
}

label {
    display: block;
    color: #c4cec0;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
}

input, textarea, select {
    width: 100%;
    background: #080d08;
    color: white;
    border: 1px solid var(--border);
    outline: none;
    padding: 15px;
    border-radius: 6px;
    font-size: 12px;
    transition: .3s;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(163,255,18,.06);
}

input::placeholder,
textarea::placeholder {
    color: #65705f;
}

.login-card form input {
    margin-bottom: 22px;
}

.green-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--green);
    color: #050805;
    border-radius: 5px;
    padding: 15px 22px;
    font-size: 11px;
    font-weight: 900;
    transition: .3s;
}

.green-btn:hover {
    background: white;
    transform: translateY(-2px);
}

.login-card .green-btn {
    width: 100%;
    margin-top: 5px;
}

.green-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.back-link {
    display: inline-block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 25px;
}

.back-link:hover {
    color: var(--green);
}

.message {
    font-size: 11px;
    margin-top: 15px;
    line-height: 1.6;
}

.message.error {
    color: var(--red);
}

.message.success {
    color: var(--green);
}

/* DASHBOARD */

.dashboard {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 255px;
    height: 100vh;
    background: #080d08;
    border-right: 1px solid var(--border);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar > .logo {
    padding: 0 10px;
    margin-bottom: 55px;
}

.sidebar-label {
    padding: 0 10px;
    font-size: 9px;
    letter-spacing: 2px;
    color: #65705f;
    margin-bottom: 17px;
    font-weight: 800;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px;
    border-radius: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    transition: .3s;
}

.side-link span {
    font-size: 19px;
}

.side-link:hover,
.side-link.active {
    background: rgba(163,255,18,.09);
    color: var(--green);
}

.sidebar-bottom {
    margin-top: auto;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 5px;
    border-top: 1px solid var(--border);
}

.avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: var(--green);
    color: black;
    border-radius: 50%;
    font-weight: 900;
}

.admin-profile strong {
    display: block;
    font-size: 11px;
}

.admin-profile small {
    display: block;
    color: var(--muted);
    font-size: 9px;
    margin-top: 5px;
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    width: 100%;
    padding: 13px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--red);
    font-size: 11px;
    font-weight: 700;
}

.logout-btn:hover {
    background: rgba(255,85,85,.08);
}

/* MAIN */

.main-content {
    width: calc(100% - 255px);
    margin-left: 255px;
    padding: 0 40px;
    max-width: 1700px;
}

.topbar {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 21px;
}

.topbar .eyebrow {
    margin-bottom: 5px;
}

.website-btn {
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 10px;
    font-weight: 800;
    color: var(--green);
}

.website-btn:hover {
    background: var(--green);
    color: black;
}

.mobile-menu {
    display: none;
    border: 0;
    background: transparent;
    color: var(--green);
    font-size: 23px;
}

/* CONTENT */

.content-section {
    margin-bottom: 65px;
    scroll-margin-top: 25px;
}

.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 35px;
}

.welcome-section h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(25px, 3vw, 38px);
    letter-spacing: -1px;
}

.welcome-section h1 span {
    color: var(--green);
}

.welcome-section p {
    color: var(--muted);
    font-size: 12px;
    margin-top: 12px;
}

.add-new-btn {
    white-space: nowrap;
}

/* STATS */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.stat-card {
    padding: 25px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.stat-card > span {
    font-size: 11px;
    color: var(--muted);
}

.stat-card h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 36px;
    color: var(--green);
    margin: 13px 0;
}

.stat-card small {
    color: #667260;
    font-size: 10px;
}

/* EDITOR */

.editor-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 30px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-heading h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 25px;
}

.section-heading h2 span {
    color: var(--green);
}

.editor-status {
    font-size: 9px;
    color: var(--green);
    border: 1px solid var(--border);
    padding: 9px 12px;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 23px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

textarea {
    resize: vertical;
    min-height: 200px;
    line-height: 1.8;
}

select {
    cursor: pointer;
}

select option {
    background: #101810;
}

.image-preview {
    width: 100%;
    height: 190px;
    background: #080d08;
    border: 1px dashed var(--border);
    border-radius: 7px;
    margin-top: -5px;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: #65705f;
    font-size: 10px;
    letter-spacing: 2px;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.form-actions {
    display: flex;
    gap: 12px;
}

.cancel-btn {
    padding: 14px 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    border-radius: 5px;
    font-size: 10px;
    font-weight: 800;
}

.cancel-btn:hover {
    color: white;
    border-color: white;
}

/* TABLE */

.table-container {
    width: 100%;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 1px;
    padding: 19px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 17px 19px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    font-size: 11px;
    color: #b7c0b3;
}

.article-cell {
    max-width: 270px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: white;
    font-weight: 700;
}

.category-badge {
    color: var(--green);
    background: rgba(163,255,18,.08);
    border-radius: 4px;
    padding: 7px 9px;
    font-size: 9px;
}

.action-group {
    display: flex;
    gap: 8px;
}

.edit-btn,
.delete-btn {
    border: 1px solid var(--border);
    background: transparent;
    border-radius: 4px;
    padding: 8px 11px;
    font-size: 10px;
    font-weight: 700;
}

.edit-btn {
    color: var(--green);
}

.delete-btn {
    color: var(--red);
}

.edit-btn:hover {
    background: var(--green);
    color: black;
}

.delete-btn:hover {
    background: var(--red);
    color: white;
}

.table-loading {
    text-align: center;
    padding: 35px;
    color: var(--muted);
}

.dashboard-footer {
    padding: 25px 0;
    border-top: 1px solid var(--border);
    color: #65705f;
    font-size: 9px;
    letter-spacing: 1px;
}

/* RESPONSIVE */

@media(max-width: 1000px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        width: calc(100% - 220px);
        margin-left: 220px;
        padding: 0 25px;
    }
}

@media(max-width: 700px) {
    .sidebar {
        transform: translateX(-100%);
        transition: .3s;
        width: 255px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        width: 100%;
        margin-left: 0;
        padding: 0 17px;
    }

    .mobile-menu {
        display: block;
    }

    .topbar {
        height: 75px;
    }

    .welcome-section {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .editor-section {
        padding: 20px;
    }

    .login-card {
        padding: 30px 22px;
    }

    .section-heading h2 {
        font-size: 21px;
    }

    .website-btn {
        padding: 10px;
        font-size: 9px;
    }
}
/* Add to admin.css */

.views-count {
    color: #52e0c0;
    font-size: 11px;
    font-weight: 600;
}

/* Update responsive table for mobile */
@media(max-width: 700px) {
    table {
        min-width: 750px; /* Increased to accommodate views column */
    }
}
/* Add to admin.css */

.stat-cell {
    font-size: 11px;
    color: #b7c0b3;
    white-space: nowrap;
}

.stat-icon {
    margin-right: 5px;
    font-size: 12px;
}

/* Make table wider to fit new columns */
table {
    min-width: 850px; 
}

/* Responsive adjustment for mobile */
@media(max-width: 700px) {
    .table-container {
        overflow-x: auto;
    }
}