/* =========================================
   LADLI KHABARSETU - ADMIN CSS
========================================= */

:root {
    --admin-primary: #2563eb;
    --admin-primary-dark: #1d4ed8;
    --admin-secondary: #0f172a;
    --admin-bg: #f1f5f9;
    --admin-card: #ffffff;
    --admin-border: #e2e8f0;
    --admin-text: #0f172a;
    --admin-muted: #64748b;
    --admin-success: #15803d;
    --admin-danger: #dc2626;
    --admin-warning: #d97706;
    --admin-radius: 18px;
    --admin-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--admin-bg);
    color: var(--admin-text);
    font-family:
        "Noto Sans Devanagari",
        "Nirmala UI",
        Arial,
        sans-serif;
    line-height: 1.6;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

a {
    color: inherit;
    text-decoration: none;
}

[hidden] {
    display: none !important;
}


/* =========================================
   LOGIN SCREEN
========================================= */

.admin-login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    background:
        radial-gradient(
            circle at top left,
            rgba(37, 99, 235, 0.16),
            transparent 35%
        ),
        linear-gradient(135deg, #eff6ff, #f8fafc 55%, #e0f2fe);
}

.admin-login-card {
    width: min(100%, 450px);
    background: var(--admin-card);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 28px;
    padding: 38px 32px;
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.14);
    text-align: center;
}

.admin-logo {
    width: 86px;
    height: 86px;
    margin: 0 auto 18px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    overflow: hidden;
}

.admin-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.admin-label,
.admin-section-label {
    display: inline-block;
    color: var(--admin-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.admin-login-card h1 {
    margin-top: 8px;
    font-size: clamp(28px, 5vw, 38px);
    line-height: 1.25;
}

.admin-login-card > p {
    margin: 12px auto 26px;
    color: var(--admin-muted);
    font-size: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    text-align: left;
}

.form-group label {
    color: var(--admin-text);
    font-size: 14px;
    font-weight: 700;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    outline: none;
    background: #ffffff;
    color: var(--admin-text);
    padding: 13px 14px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group input {
    min-height: 48px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.admin-submit-btn,
.admin-primary-btn,
.admin-secondary-btn,
.admin-cancel-btn,
.admin-logout-btn,
.admin-small-btn {
    border: 0;
    border-radius: 11px;
    padding: 12px 17px;
    font-weight: 800;
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.admin-submit-btn {
    width: 100%;
    min-height: 50px;
    margin-top: 5px;
    background: var(--admin-secondary);
    color: #ffffff;
}

.admin-submit-btn:hover,
.admin-primary-btn:hover,
.admin-secondary-btn:hover,
.admin-logout-btn:hover,
.admin-small-btn:hover {
    transform: translateY(-1px);
}

.admin-submit-btn:hover {
    background: #1e293b;
}

.back-home-link {
    display: inline-block;
    margin-top: 24px;
    color: var(--admin-primary);
    font-size: 14px;
    font-weight: 700;
}

.admin-message {
    min-height: 24px;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 700;
}

.admin-message.error {
    color: var(--admin-danger);
}

.admin-message.success {
    color: var(--admin-success);
}


/* =========================================
   DASHBOARD HEADER
========================================= */

.admin-dashboard-section {
    min-height: 100vh;
}

.admin-header {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 28px;
    background: #ffffff;
    border-bottom: 1px solid var(--admin-border);
}

.admin-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.admin-header-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 12px;
}

.admin-header-brand h1 {
    font-size: 20px;
    line-height: 1.2;
}

.admin-header-brand p {
    color: var(--admin-muted);
    font-size: 12px;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-user-email {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--admin-muted);
    font-size: 13px;
}

.admin-logout-btn {
    background: #fee2e2;
    color: #b91c1c;
}


/* =========================================
   MAIN LAYOUT
========================================= */

.admin-layout {
    display: flex;
    min-height: calc(100vh - 76px);
}

.admin-sidebar {
    width: 245px;
    flex: 0 0 245px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 15px;
    background: var(--admin-secondary);
    color: #ffffff;
}

.sidebar-title {
    padding: 0 12px 15px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.sidebar-item {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 13px 14px;
    background: transparent;
    color: #cbd5e1;
    text-align: left;
    font-weight: 700;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.sidebar-item:hover,
.sidebar-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.sidebar-home-link {
    margin-top: auto;
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #93c5fd;
    font-size: 14px;
    font-weight: 700;
}

.admin-main {
    flex: 1;
    min-width: 0;
    padding: 30px;
}

.admin-content-section {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
}

.admin-page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.admin-page-heading h2 {
    margin-top: 5px;
    font-size: clamp(25px, 4vw, 34px);
    line-height: 1.25;
}

.admin-page-heading p {
    margin-top: 7px;
    color: var(--admin-muted);
    font-size: 14px;
}


/* =========================================
   STAT CARDS
========================================= */

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.admin-stat-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
}

.stat-icon {
    font-size: 25px;
}

.stat-label {
    color: var(--admin-muted);
    font-size: 13px;
    font-weight: 700;
}

.admin-stat-card strong {
    font-size: 30px;
    line-height: 1.1;
}


/* =========================================
   PANELS
========================================= */

.admin-panel {
    padding: 25px;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
}

.admin-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}

.admin-panel h3 {
    margin-top: 5px;
    font-size: 21px;
}

.admin-panel p {
    color: var(--admin-muted);
    font-size: 14px;
}

.admin-primary-btn {
    background: var(--admin-primary);
    color: #ffffff;
}

.admin-primary-btn:hover {
    background: var(--admin-primary-dark);
}

.admin-secondary-btn {
    background: #e0f2fe;
    color: #075985;
}

.admin-cancel-btn {
    background: #f1f5f9;
    color: #475569;
}


/* =========================================
   NEWS FORM
========================================= */

.admin-news-form {
    padding: 26px;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin: 10px 0 24px;
}

.admin-checkbox-label {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--admin-text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.admin-checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--admin-primary);
}

.admin-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}


/* =========================================
   NEWS LIST
========================================= */

.admin-news-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.admin-news-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
}

.admin-news-item > img {
    width: 180px;
    height: 130px;
    flex: 0 0 180px;
    border-radius: 13px;
    object-fit: cover;
    background: #e2e8f0;
}

.admin-news-item-content {
    flex: 1;
    min-width: 0;
}

.admin-news-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 700;
}

.admin-news-item-content h3 {
    margin: 8px 0;
    font-size: 20px;
    line-height: 1.35;
}

.admin-news-item-content p {
    color: var(--admin-muted);
    font-size: 14px;
}

.status-published,
.status-draft {
    padding: 4px 9px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
}

.status-published {
    background: #dcfce7;
    color: #166534;
}

.status-draft {
    background: #fef3c7;
    color: #92400e;
}

.admin-news-item-actions,
.admin-comment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 15px;
}

.admin-small-btn {
    padding: 8px 12px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
}

.admin-small-btn.danger {
    background: #fee2e2;
    color: #b91c1c;
}


/* =========================================
   CATEGORIES
========================================= */

.admin-categories-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.admin-category-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    box-shadow: var(--admin-shadow);
}

.admin-category-item span {
    font-weight: 800;
}

.admin-category-item small {
    color: var(--admin-muted);
}


/* =========================================
   COMMENTS
========================================= */

.admin-comments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-comment-item {
    padding: 20px;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 15px;
    box-shadow: var(--admin-shadow);
}

.admin-comment-item h4 {
    font-size: 17px;
}

.admin-comment-item p {
    margin: 8px 0;
    color: var(--admin-muted);
}

.admin-comment-item small {
    color: #94a3b8;
}


/* =========================================
   LOADING / EMPTY / ERROR
========================================= */

.admin-loading,
.admin-empty,
.admin-error {
    padding: 35px 20px;
    background: #ffffff;
    border: 1px dashed var(--admin-border);
    border-radius: 15px;
    color: var(--admin-muted);
    text-align: center;
}

.admin-error {
    color: var(--admin-danger);
}


/* =========================================
   MOBILE NAVBAR
========================================= */

.admin-mobile-navbar {
    display: none;
}


/* =========================================
   RESPONSIVE DESIGN
========================================= */

@media (max-width: 1050px) {

    .admin-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-sidebar {
        width: 220px;
        flex-basis: 220px;
    }

    .admin-main {
        padding: 24px;
    }

    .admin-categories-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 760px) {

    body {
        padding-bottom: 76px;
    }

    .admin-header {
        padding: 12px 16px;
    }

    .admin-header-brand h1 {
        font-size: 17px;
    }

    .admin-header-brand img {
        width: 40px;
        height: 40px;
    }

    .admin-user-email {
        display: none;
    }

    .admin-layout {
        display: block;
    }

    .admin-sidebar {
        display: none;
    }

    .admin-main {
        padding: 22px 15px;
    }

    .admin-page-heading {
        margin-bottom: 20px;
    }

    .admin-stats-grid {
        gap: 12px;
    }

    .admin-stat-card {
        padding: 17px;
    }

    .admin-stat-card strong {
        font-size: 25px;
    }

    .admin-panel,
    .admin-news-form {
        padding: 19px;
    }

    .admin-panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .admin-news-item {
        flex-direction: column;
        padding: 15px;
    }

    .admin-news-item > img {
        width: 100%;
        height: 190px;
        flex-basis: auto;
    }

    .admin-categories-list {
        grid-template-columns: 1fr;
    }

    .admin-mobile-navbar {
        position: fixed;
        z-index: 1000;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
        padding: 8px 5px;
        background: #ffffff;
        border-top: 1px solid var(--admin-border);
        box-shadow: 0 -8px 25px rgba(15, 23, 42, 0.08);
    }

    .admin-mobile-nav-item {
        display: flex;
        min-width: 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        border: 0;
        border-radius: 10px;
        padding: 7px 3px;
        background: transparent;
        color: var(--admin-muted);
    }

    .admin-mobile-nav-item span {
        font-size: 18px;
        line-height: 1;
    }

    .admin-mobile-nav-item small {
        overflow: hidden;
        max-width: 100%;
        font-size: 10px;
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .admin-mobile-nav-item.active {
        background: #eff6ff;
        color: var(--admin-primary);
    }

}

@media (max-width: 430px) {

    .admin-login-card {
        padding: 30px 20px;
        border-radius: 22px;
    }

    .admin-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-stat-card {
        padding: 14px;
    }

    .stat-icon {
        font-size: 21px;
    }

    .stat-label {
        font-size: 11px;
    }

    .admin-stat-card strong {
        font-size: 23px;
    }

    .admin-form-actions {
        flex-direction: column;
    }

    .admin-form-actions button {
        width: 100%;
    }

}