/* ============================================================
   dashboard.css — Admin Panel Shared Styles
   Project: Balimeen Admin Panel
   Pages  : dashboard.php, manage_services.php, manage_pages.php,
            manage_blogs.php, job_applications.php
   ============================================================ */


/* ──────────────────────────────────────────
   BODY (shared layout base)
────────────────────────────────────────── */
body {
    display: flex;
    background: #f4f6f9;
    font-family: 'Segoe UI', sans-serif;
}


/* ──────────────────────────────────────────
   SIDEBAR
────────────────────────────────────────── */
.sidebar {
    width: 280px;
    height: 100vh;
    min-height: 100vh;
    background: #13176e;
    color: white;
    position: sticky;
    top: 0;
}

.sidebar a {
    color: #a0aec0;
    text-decoration: none;
    display: block;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 2px;
    transition: all 0.2s;
}

.sidebar a:hover,
.sidebar a.active {
    background: #215fef;
    color: white;
}


/* ──────────────────────────────────────────
   MAIN CONTENT  (dashboard)
────────────────────────────────────────── */
.main-content {
    padding: 20px;
}


/* ──────────────────────────────────────────
   STAT CARDS  (dashboard)
────────────────────────────────────────── */
.stat-card {
    border-radius: 10px;
    color: white;
    padding: 20px;
}


/* ──────────────────────────────────────────
   CONTENT AREA  (manage_services, manage_pages, job_applications)
────────────────────────────────────────── */
.content {
    flex: 1;
    padding: 20px;
}


/* ──────────────────────────────────────────
   MANAGE BLOGS — FILTER TABS
────────────────────────────────────────── */
.view-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.view-tab {
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1.5px solid #dee2e6;
    background: white;
    color: #495057;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.view-tab:hover {
    border-color: #0d6efd;
    color: #0d6efd;
}

.view-tab.active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.view-tab .badge {
    font-size: 11px;
}


/* ──────────────────────────────────────────
   MANAGE BLOGS — BLOG TABLE
────────────────────────────────────────── */
.blog-table {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.blog-table table {
    margin: 0;
}

.blog-table thead {
    background: #f8f9fa;
}

.blog-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    padding: 14px 16px;
    border-bottom: 2px solid #e9ecef;
}

.blog-table td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.blog-table tr:last-child td {
    border-bottom: none;
}

.blog-table tr:hover {
    background: #f8f9ff;
}

.blog-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
}

.blog-title-cell {
    max-width: 280px;
}

.blog-title {
    font-weight: 600;
    color: #212529;
    font-size: 14px;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-excerpt {
    color: #868e96;
    font-size: 12px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}


/* ──────────────────────────────────────────
   MANAGE BLOGS — STAR / FAVORITE BUTTON
────────────────────────────────────────── */
.star-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #dee2e6;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s, transform 0.15s;
    line-height: 1;
}

.star-btn:hover {
    color: #ffc107;
    transform: scale(1.2);
}

.star-btn.favorited {
    color: #ffc107;
}


/* ──────────────────────────────────────────
   MANAGE BLOGS — ACTION BUTTONS
────────────────────────────────────────── */
.action-btns {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-icon-sm {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    border: 1.5px solid currentColor;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-icon-sm:hover {
    transform: translateY(-2px);
    opacity: 0.85;
}

.btn-icon-sm.edit    { color: #d97706; border-color: #d97706; }
.btn-icon-sm.trash   { color: #6b7280; border-color: #6b7280; }
.btn-icon-sm.restore { color: #16a34a; border-color: #16a34a; }
.btn-icon-sm.danger  { color: #dc2626; border-color: #dc2626; }

.btn-icon-sm:hover.edit    { background: #d97706; color: white; }
.btn-icon-sm:hover.trash   { background: #6b7280; color: white; }
.btn-icon-sm:hover.restore { background: #16a34a; color: white; }
.btn-icon-sm:hover.danger  { background: #dc2626; color: white; }


/* ──────────────────────────────────────────
   MANAGE BLOGS — SEARCH BOX
────────────────────────────────────────── */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 38px;
    border-radius: 10px;
    border: 1.5px solid #dee2e6;
}

.search-box .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}


/* ──────────────────────────────────────────
   MANAGE BLOGS — EMPTY STATE
────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}


/* ──────────────────────────────────────────
   MANAGE BLOGS — CONFIRM MODAL
────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: white;
    border-radius: 14px;
    padding: 28px 32px;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: popIn 0.18s ease;
}

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.modal-box h5 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-box p {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 22px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.modal-btn.cancel               { background: #f3f4f6; color: #374151; }
.modal-btn.cancel:hover         { background: #e5e7eb; }
.modal-btn.confirm-trash        { background: #374151; color: white; }
.modal-btn.confirm-trash:hover  { background: #1f2937; }
.modal-btn.confirm-delete       { background: #dc2626; color: white; }
.modal-btn.confirm-delete:hover { background: #b91c1c; }


/* ──────────────────────────────────────────
   MANAGE BLOGS — TOAST NOTIFICATIONS
────────────────────────────────────────── */
#toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

.toast-msg {
    background: #1e2a38;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 8px;
    animation: fadeUp 0.2s;
}

.toast-msg.success { background: #198754; }
.toast-msg.error   { background: #dc3545; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}


/* ──────────────────────────────────────────
   MANAGE BLOGS — ROW REMOVE ANIMATION
────────────────────────────────────────── */
tr.removing {
    opacity: 0;
    transition: opacity 0.3s;
}


/* ──────────────────────────────────────────
   JOB APPLICATIONS — FAVORITE STAR
────────────────────────────────────────── */
.fav-star {
    cursor: pointer;
    color: #ccc;
    font-size: 1.2rem;
}

.fav-star.active {
    color: #ffc107;
}
