body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    font-size: 14px;
    /* Add Android-like overscroll behavior */
    overscroll-behavior: contain;
}

/* Enhanced Sidebar Styles */
.sidebar {
    background: linear-gradient(180deg, #2c3e50 0%, #1a2530 100%);
    color: #fff;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border-right: none;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h4 {
    font-weight: 600;
    color: #fff;
    font-size: 22px;
}

.sidebar-header p {
    color: #aab7c4;
}

.sidebar a {
    color: #aab7c4;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 15px;
    font-weight: 400;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar a.active {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.2) 0%, rgba(52, 152, 219, 0) 100%);
    color: #3498db;
    border-left: 4px solid #3498db;
}

.sidebar a.active:hover {
    color: #3498db;
}

.sidebar a i {
    width: 24px;
    text-align: center;
    font-size: 16px;
}

.sidebar a .nav-text {
    transition: opacity 0.2s ease;
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aab7c4;
}

/* Sidebar scrollbar styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.main-content {
    margin-left: 0;
    padding: 0;
    transition: margin-left 0.3s ease-in-out;
    background-color: #ffffff;
}

.main-content.sidebar-active {
    margin-left: 280px;
}

/* Top navigation for mobile - Android Material Design */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #3498db 0%, #2c3e50 100%);
    padding: 0 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 999;
    height: 56px;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.page-title {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    color: white;
    flex-grow: 1;
    text-align: center;
    margin-left: -48px;
    /* Center title by accounting for left icon */
}

/* Content area with Android-like padding */
.content-area {
    padding: 16px;
    padding-top: 16px;
}

/* Stats cards - Android Material Design */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    transition: all 0.3s cubic-bezier(.25, .8, .25, 1);
    margin-bottom: 0;
    background: white;
}

.card:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

.card-body {
    padding: 16px;
}

.card-title {
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
}

.card h2 {
    font-size: 24px;
    margin: 0;
    font-weight: 500;
}

/* News cards - Android Material Design */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.news-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    transition: all 0.3s cubic-bezier(.25, .8, .25, 1);
    background: white;
    border: 1px solid #eee;
}

.news-card:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
    transform: translateY(-2px);
}

.news-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.news-card .card-body {
    padding: 16px;
}

.news-card .card-title {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 500;
    color: #212121;
}

.news-card .card-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.news-card .d-flex {
    justify-content: space-between;
    margin-bottom: 12px;
}

.news-card .btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    margin-right: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 70px;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: all 0.2s;
}

.news-card .btn:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.stats-card {
    border-radius: 8px;
    color: white;
    padding: 16px;
    margin-bottom: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.bg-primary {
    background-color: #3498db !important;
}

.bg-success {
    background-color: #2ecc71 !important;
}

.bg-warning {
    background-color: #f39c12 !important;
}

.bg-info {
    background-color: #1abc9c !important;
}

/* Modal - Android-like dialog */
.modal-content {
    border-radius: 8px;
    box-shadow: 0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12);
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #eee;
    background-color: #3498db;
    color: white;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.modal-title {
    font-weight: 500;
    font-size: 20px;
    margin: 0;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    justify-content: flex-end;
}

/* Image Crop Modal */
.modal-lg {
    max-width: 95%;
    margin: 10px auto;
}

.img-container {
    width: 100%;
    height: 70vh;
    max-height: 600px;
}

.img-container img {
    max-width: 100%;
    max-height: 100%;
}

/* Form controls */
.form-control {
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 16px;
    /* Better for mobile touch */
    border: 1px solid #ddd;
    height: auto;
    margin-bottom: 8px;
    background-color: #fafafa;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.25);
    background-color: #fff;
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #212121;
}

.btn {
    border-radius: 4px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    border: none;
    min-width: 70px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #757575;
    color: white;
}

.btn-secondary:hover {
    background-color: #616161;
}

/* Toast notifications - Android-like snackbars */
#feedback-toast {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    padding: 14px 24px !important;
    border-radius: 4px !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    z-index: 9999 !important;
    box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12) !important;
    max-width: 90% !important;
    width: auto !important;
    text-align: center !important;
    background-color: #323232 !important;
}

/* Ripple effect for buttons (Android-like) */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple:after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .5s, opacity 1s;
}

.ripple:active:after {
    transform: scale(0, 0);
    opacity: .2;
    transition: 0s;
}

/* Desktop styles */
@media (min-width: 768px) {
    .sidebar {
        transform: translateX(0);
        width: 250px;
        background: linear-gradient(180deg, #2c3e50 0%, #1a2530 100%);
        color: white;
        top: 0;
        height: 100vh;
        overflow-y: auto;
    }

    .sidebar a {
        color: rgba(255, 255, 255, 0.8);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .sidebar a:hover {
        color: white;
        background-color: rgba(255, 255, 255, 0.05);
    }

    .sidebar a.active {
        background: linear-gradient(90deg, rgba(52, 152, 219, 0.2) 0%, rgba(52, 152, 219, 0) 100%);
        color: #3498db;
        border-left: 4px solid #3498db;
    }

    .sidebar-header {
        background: transparent;
        color: white;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-content {
        margin-left: 250px;
    }

    .top-nav {
        display: none;
    }

    .stats-container {
        grid-template-columns: repeat(4, 1fr);
    }

    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .menu-toggle {
        display: none;
    }

    .content-area {
        padding: 20px;
    }

    /* Desktop image crop modal */
    .modal-lg {
        max-width: 800px;
        margin: 30px auto;
    }

    .img-container {
        height: 500px;
    }
}

/* Larger screens */
@media (min-width: 992px) {
    body {
        font-size: 16px;
    }

    .main-content {
        padding: 0;
    }

    .card-title {
        font-size: 16px;
    }

    .card h2 {
        font-size: 28px;
    }

    .news-card .card-title {
        font-size: 18px;
    }

    .news-card .card-text {
        font-size: 14px;
    }

    .img-container {
        height: 550px;
    }

    .sidebar {
        width: 260px;
    }

    .main-content {
        margin-left: 260px;
    }
}

/* Custom styles for the admin panel */

/* Progress bar styles */
.progress {
    height: 20px;
    margin-bottom: 10px;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Ripple effect for buttons */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Mobile header icons */
.mobile-header-icons {
    display: flex;
    gap: 10px;
}

/* Card styles */
.card {
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.375rem;
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 0.75rem 1.25rem;
}

/* Badge styles */
.badge {
    font-size: 0.75em;
}

/* Table styles */
.table th {
    border-top: none;
    font-weight: 500;
}

.table td,
.table th {
    vertical-align: middle;
}

/* Pagination styles */
.pagination {
    margin-top: 20px;
}

.page-link {
    color: #007bff;
}

.page-link:hover {
    color: #0056b3;
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* Alert styles */
.alert {
    border-radius: 0.375rem;
}

/* Utility classes */
.gap-2 {
    gap: 0.5rem;
}