/* ============================================
   MODERN ADMIN PANEL STYLES
   ============================================ */

/* ========== TOPBAR STYLING ========== */
.admin-topbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    transition: all 0.3s ease;
}

.admin-topbar .navbar-brand {
    color: #fff !important;
    font-weight: 600;
    font-size: 1.25rem;
    transition: opacity 0.3s ease;
}

.admin-topbar .navbar-brand:hover {
    opacity: 0.9;
}

.admin-topbar .sidebar-toggle {
    color: #fff !important;
    text-decoration: none;
    padding: 0.5rem;
    font-size: 1.25rem;
    border: none;
    background: transparent;
    transition: all 0.3s ease;
}

.admin-topbar .sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.admin-topbar .sidebar-toggle:focus {
    box-shadow: none;
}

.admin-topbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-topbar .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.admin-topbar .nav-link i {
    font-size: 1.1rem;
}

.admin-topbar .dropdown-toggle {
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-topbar .dropdown-menu {
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}

.admin-topbar .dropdown-item {
    padding: 0.6rem 1.25rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-topbar .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

.admin-topbar .dropdown-item i {
    width: 20px;
    text-align: center;
}

/* ========== SIDEBAR STYLING ========== */
.admin-sidebar {
    background-color: #101010;
    min-height: 100vh;
    padding: 1.5rem 0;
    position: fixed;
    left: 0;
    top: 56px;
    width: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s ease;
    z-index: 1020;
}

.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.admin-sidebar .btn-toggle {
    width: 100%;
    padding: 0.75rem 1.25rem;
    color: rgba(255, 255, 255, 0.85) !important;
    background: transparent;
    border: none;
    text-align: left;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0;
}

.admin-sidebar .btn-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.admin-sidebar .btn-toggle[aria-expanded="true"] {
    background-color: rgba(102, 126, 234, 0.2);
    color: #fff !important;
}

.admin-sidebar .btn-toggle i {
    transition: transform 0.3s ease;
}

.admin-sidebar .btn-toggle[aria-expanded="true"] i.bi-chevron-down {
    transform: rotate(180deg);
}

.admin-sidebar .btn-toggle-nav {
    padding-left: 0;
    margin-top: 0.5rem;
}

.admin-sidebar .btn-toggle-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem 0.65rem 2.5rem;
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.admin-sidebar .btn-toggle-nav a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff !important;
    border-left-color: #667eea;
    padding-left: 2.75rem;
}

.admin-sidebar .btn-toggle-nav a.active {
    background-color: rgba(102, 126, 234, 0.15);
    color: #fff !important;
    border-left-color: #667eea;
    font-weight: 500;
}

.admin-sidebar .btn-toggle-nav a i.bi-circle {
    font-size: 6px;
    color: rgba(255, 255, 255, 0.5);
}

.admin-sidebar .btn-toggle-nav a:hover i.bi-circle,
.admin-sidebar .btn-toggle-nav a.active i.bi-circle {
    color: #667eea;
}

.admin-sidebar .border-top {
    border-color: rgba(255, 255, 255, 0.1) !important;
    margin: 1.5rem 0;
}

/* Super Admin Section */
.admin-sidebar .btn-toggle .bi-shield {
    color: #ffc107;
}

/* ========== DASHBOARD STAT CARDS ========== */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: none;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card-primary::before {
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
}

.stat-card-success::before {
    --gradient-start: #11998e;
    --gradient-end: #38ef7d;
}

.stat-card-info::before {
    --gradient-start: #3494e6;
    --gradient-end: #ec6ead;
}

.stat-card-warning::before {
    --gradient-start: #f093fb;
    --gradient-end: #f5576c;
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #fff;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

.stat-card-primary .stat-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.stat-card-success .stat-icon {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.stat-card-info .stat-icon {
    background: linear-gradient(135deg, #3494e6, #ec6ead);
}

.stat-card-warning .stat-icon {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== QUICK ACCESS CARDS ========== */
.quick-access-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: none;
    height: 100%;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
}

.quick-access-card::after {
    content: '→';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.quick-access-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.quick-access-card:hover::after {
    right: 1rem;
    color: rgba(0, 0, 0, 0.4);
}

.quick-access-card .icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

.quick-access-card-primary .icon-wrapper {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.quick-access-card-info .icon-wrapper {
    background: linear-gradient(135deg, #3494e6, #ec6ead);
}

.quick-access-card-success .icon-wrapper {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.quick-access-card-warning .icon-wrapper {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.quick-access-card-danger .icon-wrapper {
    background: linear-gradient(135deg, #ee0979, #ff6a00);
}

.quick-access-card-secondary .icon-wrapper {
    background: linear-gradient(135deg, #8360c3, #2ebf91);
}

.quick-access-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.quick-access-card .card-subtitle {
    font-size: 0.85rem;
    color: #718096;
}

/* ========== CONTENT AREA ========== */
.content-wrapper {
    margin-top: 56px;
    margin-left: 250px;
    padding: 2rem;
    min-height: calc(100vh - 56px);
    background-color: #f7fafc;
    transition: all 0.3s ease;
}

.content-right {
    padding: 0 !important;
}

/* ========== CARD HEADERS ========== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 12px 12px 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

/* ========== FORM CONTROLS ========== */
.form-control {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

/* ========== TABLES ========== */
.table {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.table thead th {
    border: none;
    padding: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f7fafc;
    transform: scale(1.01);
}

.table tbody td {
    padding: 1rem;
    border-color: #e2e8f0;
    vertical-align: middle;
}

/* ========== BUTTONS ========== */
.btn {
    border-radius: 8px;
    padding: 0.65rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.btn-info {
    background: linear-gradient(135deg, #3494e6 0%, #ec6ead 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ========== PAGINATION ========== */
.pagination {
    gap: 0.5rem;
}

.pagination .page-link {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    color: #667eea;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: #667eea;
    color: #fff;
    border-color: #667eea;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #fff;
}

/* ========== ALERT MESSAGES ========== */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.alert-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
}

.alert-danger {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    color: #fff;
}

.alert-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.alert-info {
    background: linear-gradient(135deg, #3494e6 0%, #ec6ead 100%);
    color: #fff;
}

/* ========== WELCOME SECTION ========== */
.welcome-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 2rem;
    color: #fff;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.welcome-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcome-section p {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

/* ========== SIDEBAR BACKDROP ========== */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1015;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
    display: block;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
        width: 250px;
        z-index: 1020;
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .content-wrapper {
        margin-left: 0;
    }

    .stat-card,
    .quick-access-card {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .content-wrapper {
        padding: 1rem;
    }

    .welcome-section {
        padding: 1.5rem;
    }

    .welcome-section h2 {
        font-size: 1.5rem;
    }

    .stat-card .stat-number {
        font-size: 1.5rem;
    }

    .quick-access-card .icon-wrapper {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .admin-topbar {
        padding: 0.5rem;
    }

    .admin-topbar .navbar-brand {
        font-size: 1rem;
    }

    .admin-topbar .nav-link {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.9rem;
    }

    .content-wrapper {
        padding: 0.75rem;
    }

    .stat-card,
    .quick-access-card {
        padding: 1rem;
    }
}

/* ========== LEGACY COMPATIBILITY ========== */
.panel-heading {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px 8px 0 0;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.panel {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.has-success .form-control {
    border-color: #38ef7d;
}

.has-error .form-control {
    border-color: #ff6a00;
}

.error,
.error * {
    color: #ff6a00;
}

.required {
    color: #ff6a00;
}

/* ========== UTILITY CLASSES ========== */
.no-padding {
    padding: 0 !important;
}

.text-small {
    font-size: 0.85rem;
    color: #718096;
}

.status-active {
    background: linear-gradient(135deg, #11998e, #38ef7d) !important;
    color: #fff !important;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-inactive {
    background: linear-gradient(135deg, #ee0979, #ff6a00) !important;
    color: #fff !important;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.tbl-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

/* Image Upload */
.image-upload > input {
    display: none;
}

.image-upload img {
    cursor: pointer;
    border-radius: 8px;
}

/* Media File List */
.media-file-list {
    max-height: 500px;
    overflow-y: auto;
    background-color: #f7fafc;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.word-wrap {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

/* Action Links */
a.delete {
    color: #ff6a00 !important;
    transition: color 0.3s ease;
}

a.delete:hover {
    color: #ee0979 !important;
}

a.edit {
    color: #667eea !important;
    transition: color 0.3s ease;
}

a.edit:hover {
    color: #764ba2 !important;
}
