/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #1a1a2e;
}

/* Sidebar */
.admin-sidebar {
    width: 220px;
    background: #16213e;
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.admin-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #0f3460;
}

.admin-sidebar-header h3 {
    margin: 0;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 18px;
    color: #e94560;
}

.admin-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.admin-nav-item {
    border-bottom: 1px solid #0f3460;
}

.admin-nav-item a,
.admin-nav-item NavLink {
    display: block;
    padding: 12px 20px;
    color: #a0a0b0;
    text-decoration: none;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
}

.admin-nav-item a:hover,
.admin-nav-item NavLink:hover {
    background: #0f3460;
    color: #fff;
}

.admin-nav-item.active a,
.admin-nav-item.active NavLink {
    background: #e94560;
    color: #fff;
}

.admin-nav-item.disabled a {
    color: #555;
    cursor: not-allowed;
}

/* Main Content */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: #16213e;
    border-bottom: 1px solid #0f3460;
}

.admin-topbar-title {
    color: #fff;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 16px;
}

.admin-content {
    flex: 1;
    padding: 25px;
    color: #fff;
}

/* Override global styles for admin */
.admin-content h1, .admin-content h2, .admin-content h3, .admin-content h4, .admin-content h5, .admin-content h6 {
    font-family: 'Open Sans', Arial, sans-serif;
    color: #fff;
}

.admin-content p, .admin-content div {
    color: #fff;
}

/* Toolbar */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.admin-toolbar .form-group {
    flex: 1;
    max-width: 300px;
    margin: 0;
}

.admin-toolbar .form-control {
    max-width: none;
}

/* Sortable Table */
.sortable-table {
    color: #fff;
    background: #16213e;
    border-radius: 4px;
}

/* Override Bootstrap 3 table-striped and table-hover for dark theme */
.table.sortable-table tbody > tr:nth-of-type(odd) {
    background: #1a1a2e;
}
.table.sortable-table tbody > tr:nth-of-type(even) {
    background: #16213e;
}
.table.sortable-table tbody > tr:hover {
    background: #0f3460;
}

.sortable-table thead {
    background: #0f3460;
}

.sortable-table th {
    border: none;
    padding: 12px 15px;
    color: #e94560;
    font-family: 'Open Sans', Arial, sans-serif;
    font-weight: 600;
}

.sortable-table th.sort-link {
    cursor: pointer;
    color: #e94560;
    text-decoration: none;
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    text-align: left;
    width: 100%;
}

.sortable-table th.sort-link:hover {
    color: #fff;
}

.sortable-table th.sort-link i {
    margin-left: 5px;
    font-size: 12px;
}

.sortable-table td {
    border-color: #0f3460;
    color: #fff;
    padding: 10px 15px;
    vertical-align: middle;
}

.sortable-table .text-right {
    text-align: right;
}

.sortable-table .text-center {
    text-align: center;
}

.sortable-table .actions-cell {
    white-space: nowrap;
}

.sortable-table .actions-cell .btn {
    margin: 0 2px;
    padding: 3px 8px;
    font-size: 12px;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    position: sticky;
    bottom: 0;
    background: #1a1a2e;
    padding: 15px 0 5px 0;
    z-index: 10;
}

.pagination-info {
    color: #a0a0b0;
    font-size: 13px;
}

.pagination {
    margin: 0;
}

.pagination-buttons {
    display: flex;
    gap: 4px;
}

.pagination-buttons > button {
    color: #e94560;
    background: #16213e;
    border: 1px solid #0f3460;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    font-family: 'Nobile', Arial, sans-serif;
}

.pagination-buttons > button:hover {
    background: #0f3460;
    color: #fff;
}

.pagination-buttons > button[disabled] {
    color: #555;
    cursor: not-allowed;
}

.pagination-buttons > button.active {
    background: #e94560;
    border-color: #e94560;
    color: #fff;
}

.pagination-buttons > button.disabled {
    color: #555;
    cursor: not-allowed;
}

/* Disabled sidebar links */
.admin-nav-item.disabled .disabled-link {
    display: block;
    padding: 12px 20px;
    color: #555;
    cursor: not-allowed;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 14px;
}

/* Login Page */
.admin-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #1a1a2e;
}

.admin-login-card {
    background: #16213e;
    padding: 40px;
    border-radius: 8px;
    width: 360px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.admin-login-card h2 {
    color: #e94560;
    font-family: 'Open Sans', Arial, sans-serif;
    text-align: center;
    margin-bottom: 30px;
}

.admin-login-card .form-group {
    margin-bottom: 20px;
}

.admin-login-card label {
    color: #a0a0b0;
    font-family: 'Nobile', Arial, sans-serif;
}

.admin-login-card .form-control {
    background: #0f3460;
    border-color: #0f3460;
    color: #fff;
    max-width: none;
}

.admin-login-card .btn-primary {
    background: #e94560;
    border-color: #e94560;
    margin-top: 10px;
}

/* Modal overrides for admin */
.modal-backdrop {
    background: #000;
    opacity: 0.7 !important;
    z-index: 1040 !important;
}

.modal {
    z-index: 1050 !important;
    overflow-y: auto !important;
}

.admin-content .modal-content,
.modal-content {
    background: #16213e;
    border: 1px solid #0f3460;
    color: #fff;
}

.admin-content .modal-header,
.modal-header {
    border-bottom-color: #0f3460;
}

.admin-content .modal-title,
.modal-title {
    color: #e94560;
    font-family: 'Open Sans', Arial, sans-serif;
}

.admin-content .modal-body .form-group label,
.modal-body .form-group label {
    color: #a0a0b0;
}

.admin-content .modal-body .form-control,
.modal-body .form-control {
    background: #0f3460;
    border-color: #0f3460;
    color: #fff;
    max-width: none;
}

.admin-content .modal-footer,
.modal-footer {
    border-top-color: #0f3460;
}

.admin-content .close,
.close {
    color: #fff;
    text-shadow: none;
}

.admin-checkbox {
    margin-top: 10px;
}

/* Status message */
.admin-content .alert-success {
    background: #1b4332;
    border-color: #2d6a4f;
    color: #fff;
}