
/*

 * Wangyalgya Admin Panel

 * Shared stylesheet

 */





/* =========================================================

   RESET

   ========================================================= */



* {

    box-sizing: border-box;

}



html,

body {

    margin: 0;

    padding: 0;

    min-height: 100%;

}



body {

    font-family: Arial, Helvetica, sans-serif;

    background: #f4f6f8;

    color: #222;

}





/* =========================================================

   LINKS

   ========================================================= */



a {

    color: inherit;

    text-decoration: none;

}





/* =========================================================

   LOGIN PAGE

   ========================================================= */



.login-page {

    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #eef1f5;

}



.login-container {

    width: 100%;

    max-width: 420px;

    padding: 24px;

}



.login-card {

    background: #ffffff;

    border: 1px solid #e1e5ea;

    border-radius: 10px;

    padding: 32px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);

}



.login-header {

    text-align: center;

    margin-bottom: 28px;

}



.login-header h1 {

    margin: 0 0 8px;

    font-size: 28px;

}



.login-header p {

    margin: 0;

    color: #6b7280;

}





/* =========================================================

   ADMIN LAYOUT

   ========================================================= */



.admin-layout {

    min-height: 100vh;

    display: flex;

}



.sidebar {

    width: 250px;

    flex-shrink: 0;

    min-height: 100vh;

    background: #1f2937;

    color: #ffffff;

}



.sidebar-header {

    padding: 24px 20px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.1);

}



.sidebar-header h1 {

    margin: 0 0 5px;

    font-size: 22px;

}



.sidebar-header p {

    margin: 0;

    color: #b8c1cc;

    font-size: 13px;

}



.sidebar-nav {

    padding: 16px 12px;

}



.sidebar-nav a {

    display: block;

    padding: 11px 12px;

    margin-bottom: 4px;

    border-radius: 6px;

    color: #dbe2ea;

    font-size: 14px;

}



.sidebar-nav a:hover,

.sidebar-nav a.active {

    background: #374151;

    color: #ffffff;

}



.sidebar-nav .nav-divider {

    height: 1px;

    margin: 14px 0;

    background: rgba(255, 255, 255, 0.1);

}





/* =========================================================

   MAIN AREA

   ========================================================= */



.admin-main {

    flex: 1;

    min-width: 0;

}



.admin-header {

    min-height: 72px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 0 28px;

    background: #ffffff;

    border-bottom: 1px solid #e1e5ea;

}



.admin-header h2 {

    margin: 0;

    font-size: 22px;

}



.admin-content {

    padding: 28px;

}





/* =========================================================

   BUTTONS

   ========================================================= */



.button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 38px;

    padding: 8px 14px;

    border: 1px solid transparent;

    border-radius: 6px;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

}



.button-primary {

    background: #2563eb;

    color: #ffffff;

}



.button-primary:hover {

    background: #1d4ed8;

}



.button-secondary {

    background: #ffffff;

    color: #374151;

    border-color: #d1d5db;

}



.button-secondary:hover {

    background: #f9fafb;

}



.button-danger {

    background: #dc2626;

    color: #ffffff;

}



.button-danger:hover {

    background: #b91c1c;

}



.button-success {

    background: #16a34a;

    color: #ffffff;

}



.button-success:hover {

    background: #15803d;

}



.button-full {

    width: 100%;

}





/* =========================================================

   FORMS

   ========================================================= */



.form-group {

    margin-bottom: 18px;

}



.form-group label {

    display: block;

    margin-bottom: 7px;

    font-size: 14px;

    font-weight: 600;

}



.form-group input,

.form-group textarea,

.form-group select {

    width: 100%;

    padding: 10px 12px;

    border: 1px solid #d1d5db;

    border-radius: 6px;

    background: #ffffff;

    color: #222;

    font: inherit;

}



.form-group textarea {

    min-height: 160px;

    resize: vertical;

}



.form-group input:focus,

.form-group textarea:focus,

.form-group select:focus {

    outline: none;

    border-color: #2563eb;

    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);

}



.form-error {

    min-height: 20px;

    margin: 12px 0 0;

    color: #dc2626;

    font-size: 14px;

}





/* =========================================================

   PAGE TOOLBAR

   ========================================================= */



.page-toolbar {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 16px;

    margin-bottom: 20px;

}



.page-toolbar h3 {

    margin: 0;

    font-size: 18px;

}



.toolbar-actions {

    display: flex;

    align-items: center;

    gap: 8px;

}





/* =========================================================

   CARDS

   ========================================================= */



.card-grid {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));

    gap: 18px;

}



.card {

    display: block;

    background: #ffffff;

    border: 1px solid #e1e5ea;

    border-radius: 8px;

    padding: 20px;

}



.card h3 {

    margin: 0 0 8px;

    font-size: 16px;

}



.card p {

    margin: 0;

    color: #6b7280;

    font-size: 14px;

}



.card-value {

    margin-top: 10px;

    font-size: 28px;

    font-weight: 700;

    color: #111827;

}





/* =========================================================

   TABLE

   ========================================================= */



.table-container {

    width: 100%;

    overflow-x: auto;

    background: #ffffff;

    border: 1px solid #e1e5ea;

    border-radius: 8px;

}



.admin-table {

    width: 100%;

    border-collapse: collapse;

}



.admin-table th,

.admin-table td {

    padding: 13px 14px;

    border-bottom: 1px solid #e5e7eb;

    text-align: left;

    vertical-align: middle;

    font-size: 14px;

}



.admin-table th {

    background: #f9fafb;

    color: #374151;

    font-weight: 600;

}



.admin-table tbody tr:last-child td {

    border-bottom: 0;

}



.table-actions {

    display: flex;

    flex-wrap: wrap;

    gap: 6px;

}





/* =========================================================

   STATUS

   ========================================================= */



.status {

    display: inline-block;

    padding: 4px 8px;

    border-radius: 999px;

    font-size: 12px;

    font-weight: 600;

}



.status-published {

    background: #dcfce7;

    color: #166534;

}



.status-draft {

    background: #fef3c7;

    color: #92400e;

}



.status-unpublished {

    background: #fee2e2;

    color: #991b1b;

}





/* =========================================================

   EMPTY / LOADING

   ========================================================= */



.empty-state {

    padding: 40px 20px;

    text-align: center;

    color: #6b7280;

}



.loading {

    padding: 30px;

    text-align: center;

    color: #6b7280;

}





/* =========================================================

   RESPONSIVE

   ========================================================= */



@media (max-width: 800px) {



    .admin-layout {

        display: block;

    }



    .sidebar {

        width: 100%;

        min-height: auto;

    }



    .sidebar-nav {

        display: flex;

        flex-wrap: wrap;

        gap: 5px;

    }



    .sidebar-nav a {

        margin-bottom: 0;

    }



    .admin-header {

        padding: 0 18px;

    }



    .admin-content {

        padding: 18px;

    }



    .page-toolbar {

        align-items: flex-start;

        flex-direction: column;

    }



}




/* Article management controls */



.search-input,

.select-input {

    min-height: 40px;

    padding: 0 12px;

    border: 1px solid #d1d5db;

    border-radius: 6px;

    background: #ffffff;

    color: #111827;

    font-size: 14px;

}



.search-input {

    flex: 1;

    min-width: 220px;

}



.select-input {

    min-width: 160px;

}



.search-input:focus,

.select-input:focus {

    outline: none;

    border-color: #2563eb;

    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);

}



.table-wrapper {

    width: 100%;

    overflow-x: auto;

}



.data-table {

    width: 100%;

    border-collapse: collapse;

    min-width: 760px;

}



.data-table th,

.data-table td {

    padding: 14px 16px;

    border-bottom: 1px solid #e5e7eb;

    text-align: left;

    vertical-align: middle;

}



.data-table th {

    background: #f9fafb;

    color: #374151;

    font-size: 13px;

    font-weight: 600;

}



.data-table td {

    color: #4b5563;

    font-size: 14px;

}



.data-table tbody tr:hover {

    background: #f9fafb;

}



.button-small {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 34px;

    padding: 0 12px;

    font-size: 13px;

}

