* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f4f6f9;
    color: #333;
}

/* Navbar Layout */
.navbar {
    background-color: #343a40;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-brand a, 
.navbar-brand span {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
}

.navbar-brand img {
    max-height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-btn {
    background: #dc3545;
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s ease-in-out;
}

.logout-btn:hover {
    background: #c82333;
}

/* Dashboard 2-Column Split Layout */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 60px);
    width: 100%;
}

/* Left Sidebar: 30% Width */
.sidebar {
    width: 30%;
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    padding: 1.5rem 1rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.2rem;
    color: #495057;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Sidebar Item Hover & Active Effects */
.sidebar-item a:hover,
.sidebar-item a.active {
    background: #007bff;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
    border-color: #007bff;
}

/* Right Main Content: Remaining Width */
.main-content {
    width: 70%;
    padding: 2rem;
    background: #f4f6f9;
}

/* Data Table Styling */
.panel-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.panel-header {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.data-table th, 
.data-table td {
    padding: 0.85rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.data-table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
}

.data-table tr:hover {
    background-color: #f1f3f5;
}

/* Action Buttons */
.btn-action {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    margin-right: 0.25rem;
    display: inline-block;
    color: #fff;
}

.btn-edit { background-color: #ffc107; color: #212529; }
.btn-update { background-color: #17a2b8; }
.btn-delete { background-color: #dc3545; }

.btn-action:hover {
    opacity: 0.85;
}

.action-buttons-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.icon-action {
    position: relative;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.icon-action:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.icon-action::after {
    content: attr(data-label);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 5px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.icon-action:hover::after {
    opacity: 1;
}

.icon-action.btn-edit {
    background: linear-gradient(135deg, #f5b700, #ffca2c);
    color: #1f2937;
}

.icon-action.btn-delete {
    background: linear-gradient(135deg, #dc3545, #e8576d);
}

.icon-action.btn-status.published {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1f2937;
}

.icon-action.btn-status.draft {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

/* Modal Popup */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Form Styles for Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 360px;
}

.login-card h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #333333;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666666;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cccccc;
    border-radius: 4px;
}

.btn {
    width: 100%;
    padding: 0.75rem;
    background: #007bff;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.btn:hover {
    background: #0056b3;
}

.alert {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.content {
    padding: 2rem;
}

/* Responsiveness for Tablets and Mobile Devices */
@media (max-width: 992px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding: 1rem;
    }

    .main-content {
        width: 100%;
        padding: 1rem;
    }
}


/* Add New & Action Buttons */
.btn-add-new {
    background-color: #28a745;
    color: #ffffff;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
}
.btn-add-new:hover { background-color: #218838; }

.btn-secondary { background-color: #6c757d; color: #fff; }
.btn-secondary:hover { background-color: #5a6268; }

.btn-save {
    background-color: #007bff;
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}
.btn-save:hover { background-color: #0056b3; }

/* Dynamic Status Button & Badges */
.status-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.status-badge.published { background-color: #d4edda; color: #155724; }
.status-badge.draft { background-color: #fff3cd; color: #856404; }

.btn-status.published { background-color: #ffc107; color: #212529; }
.btn-status.draft { background-color: #28a745; color: #ffffff; }

/* Admin Form Layout */
.admin-form {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: flex;
    gap: 1.25rem;
}

.flex-1 { flex: 1; }

.admin-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.admin-form .form-group input[type="text"],
.admin-form .form-group input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* CKEditor Custom Styling */
.ck-editor__editable_inline {
    min-height: 250px;
    max-height: 500px;
}

/* Form Responsive Behavior for Tablets and Mobile */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
}