/* Navy Blue Admin Theme */
:root {
    --primary-navy: #1e3a8a;
    --secondary-navy: #1e40af;
    --light-navy: #3b82f6;
    --dark-navy: #1e293b;
    --accent-blue: #60a5fa;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-600: #475569;
    --gray-800: #1e293b;
}

/* Base Styles */
body {
    background-color: var(--light-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h4,h5,h6{
    font-size: 15px;
}


/* Sidebar Styles */
.sidebar {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    min-height: 100vh;
    width: 250px;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar .nav-link {
    color: var(--white);
    padding: 12px 20px;
    margin: 2px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-blue);
    transform: translateX(5px);
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
}

.sidebar-brand {
    color: var(--white);
    font-size: 1rem;
    font-weight: bold;
    padding: 20px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main-content {
    margin-left: 250px;
    min-height: 100vh;
    background-color: var(--light-bg);
}

.top-navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 30px;
    border-bottom: 1px solid var(--gray-200);
}

/* Cards - Merged all card styles */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    padding: 10px;
    font-weight: 600;
}

/* Buttons - Merged all button styles */
.btn-navy {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    border: none;
    color: var(--white);
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-navy:hover {
    background: linear-gradient(135deg, var(--secondary-navy) 0%, var(--primary-navy) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 58, 138, 0.3);
    color: var(--white);
}

.btn-outline-navy {
    border: 2px solid var(--primary-navy);
    color: var(--primary-navy);
    background: transparent;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-navy:hover {
    background: var(--primary-navy);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Tables - Merged all table styles */
.table {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-size: 0.6rem;
    font-weight: bold;
}

.table thead th {
    background: var(--primary-navy);
    color: var(--white);
    border: none;
    padding: 10px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.6rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.3s ease;
}

.table tbody tr:hover {
    background-color: var(--gray-100);
}

.table tbody td {
    padding: 5px;
    border-color: var(--gray-200);
    vertical-align: middle;
}

/* Table Variants - Specific table styles */
.users-table,
.categories-table {
    font-size: 0.6rem;
    font-weight: bold;
}

.users-table th,
.categories-table th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 0.55rem 0.2rem;
    font-size: 0.6rem;
}

.users-table td,
.categories-table td {
    padding: 0.55rem 0.2rem;
    vertical-align: middle;
}

.table-responsive {
    border-radius: 0.375rem;
}

/* Forms - Merged all form styles */
.form-control {
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 5px 8px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
}

/* Filter Section - Merged filter styles */
.filter-section {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-section .form-control,
.filter-section .form-select {
    height: 42px;
}

.filter-section .btn {
    height: 42px;
    min-width: 42px;
}

/* User/Category Specific Styles */
.user-avatar,
.category-image {
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar {
    width: 28px;
    height: 28px;
}

.category-image {
    width: 40px;
    height: 40px;
    border-radius: 0.375rem;
}

.user-avatar-placeholder,
.category-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #6c757d;
}

.user-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.75rem;
}

.category-image-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.user-name,
.category-name {
    font-weight: 500;
    font-size: 0.75rem;
}

.user-slug {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Status Badges - Merged badge styles */
.badge {
    font-size: 0.5rem;
    padding: 0.25rem 0.5rem;
}

.badge-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.badge-info {
    background: linear-gradient(135deg, var(--light-navy) 0%, var(--primary-navy) 100%);
}

/* Pagination - Merged pagination styles */
.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Empty State - Merged empty state styles */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
}

.empty-state i {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Content Sections - Blog/Category Forms */
.slug-preview {
    color: #6c757d;
    font-size: 0.5em;
    margin-top: 5px;
    font-style: italic;
}

.secondary-slug-preview {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 0.375rem;
    padding: 8px 12px;
    color: #1976d2;
    font-size: 0.5em;
    margin-top: 5px;
}

.section-divider {
    border-top: 2px solid #e9ecef;
    margin: 30px 0;
    position: relative;
}

.section-divider::before {
    content: attr(data-title);
    position: absolute;
    top: -12px;
    left: 20px;
    background: white;
    padding: 0 15px;
    font-weight: 600;
    color: #6c757d;
    font-size: 14px;
}

.metadata-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0.375rem;
    padding: 20px;
    margin-bottom: 20px;
}

.points-section {
    background: #f8f9fa;
    border-radius: 0.375rem;
    padding: 15px;
    margin: 15px 0;
}

.points-header {
    font-weight: 600;
    color: #495057;
    margin-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
}

.content-section {
    border-left: 4px solid #667eea;
    padding-left: 20px;
    margin: 25px 0;
}

.dynamic-field {
    margin-bottom: 15px;
}

/* Image Upload Sections - Merged image styles */
.image-upload-section {
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 0.375rem;
    padding: 15px;
    margin-top: 10px;
}

.image-preview-container {
    text-align: center;
    margin-top: 10px;
}

.point-image-preview {
    max-width: 150px;
    max-height: 100px;
    border-radius: 0.375rem;
    margin-top: 10px;
}

.remove-image-btn {
    margin-top: 5px;
}

/* Stats Cards */
.stats-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-100) 100%);
    border-left: 4px solid var(--primary-navy);
    transition: all 0.3s ease;
}

.stats-card:hover {
    border-left-width: 8px;
    transform: translateX(5px);
}

.stats-card .stats-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

/* Login Page */
.login-container {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: var(--primary-navy);
    font-weight: bold;
    margin-bottom: 10px;
}

.login-header p {
    color: var(--gray-600);
}

/* Alert Styles */
.alert-navy {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
}

.usage-alert {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

/* Dropdown */
.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.dropdown-item:hover {
    background: var(--primary-navy);
    color: var(--white);
}

/* Loading Spinner */
.spinner-navy {
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-navy);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-content.shifted {
        margin-left: 250px;
    }
}

.editor {
    overflow: hidden;
}

/* Jodit specific fixes */
.jodit-container {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Prevent Jodit fullscreen flicker */
.jodit-container.jodit_fullsize {
    transition: none !important;
    animation: none !important;
}

.jodit-container.jodit_fullsize .jodit-wysiwyg {
    transition: none !important;
    animation: none !important;
}

/* Smooth fullscreen transition */
.jodit-container {
    transition: all 0.1s ease !important;
}

/* Prevent body scroll when in fullscreen */
body.jodit_fullsize_box {
    overflow: hidden !important;
    transition: none !important;
}

/* Fix z-index issues that might cause flicker */
.jodit-container.jodit_fullsize {
    z-index: 999999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: white !important;
}


/*home page toggle button*/

.switch {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 30px;
  border: 4px solid rgba(58, 58, 58, 0.1);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5) inset;
  height: 48px;
  margin: 2px;
  position: relative;
  width: 120px;
  display: inline-block;
  user-select: none;
}

.switch-check {
  position: absolute;
  visibility: hidden;
  user-select: none;
}

.switch-label {
  cursor: pointer;
  display: block;
  height: 42px;
  text-indent: -9999px;
  width: 115px;
  user-select: none;
}

.switch-label:before {
  background: #fff;
  background: -webkit-radial-gradient(45%, circle, rgb(255, 58, 58) 0%, rgb(255, 113, 113) 100%);
  border-radius: 10px;
  border: 1px solid #742323;
  box-shadow: 0 2px 5px rgba(255, 67, 48, 0.6), 0 0 5px rgba(255, 159, 109, 0.5) inset;
  content: "";
  display: block;
  height: 10px;
  left: -20%;
  position: absolute;
  top: 16px;
  transition: all 0.2s;
  width: 10px;
  z-index: 12;
  user-select: none;
}

.switch-label:after {
  background: #fff;
  background: -moz-radial-gradient(45%, circle, rgba(60, 60, 60, 0.6) 0%, rgba(151, 151, 151, 0.6) 100%);
  border-radius: 10px;
  border: 1px solid #111;
  box-shadow: 0 2px 5px rgba(20, 20, 20, 0.5);
  content: "";
  display: block;
  height: 10px;
  right: -20%;
  position: absolute;
  top: 16px;
  transition: all 0.2s;
  width: 10px;
  z-index: 12;
  user-select: none;
}

.switch-label span {
  background: linear-gradient(#4f4f4f, #2b2b2b);
  border-radius: 30px;
  border: 1px solid #1a1a1a;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5), 0 1px 1px rgba(255, 255, 255, 0.1) inset, 0 -2px 0 rgba(0, 0, 0, 0.2) inset;
  display: block;
  height: 38px;
  left: 1px;
  position: absolute;
  top: 1px;
  -webkit-transition: all 0.2s linear;
  -moz-transition: all 0.2s linear;
  -o-transition: all 0.2s linear;
  transition: all 0.2s linear;
  width: 53px;
  user-select: none;
}

.switch-label span:before {
  background: #fff;
  background: -webkit-linear-gradient(left, rgba(48, 48, 48, 0.4), rgba(34, 34, 34, 0.4));
  background: linear-gradient(left, rgba(48, 48, 48, 0.4), rgba(34, 34, 34, 0.4));
  border-radius: 30px 10px 10px 30px;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2) inset;
  content: "";
  display: block;
  height: 33px;
  left: 2px;
  position: absolute;
  top: 2px;
  width: 21px;
  user-select: none;
}

.switch-label span:after {
  background: #fff;
  background: -webkit-linear-gradient(right, rgba(48, 48, 48, 0.4), rgba(34, 34, 34, 0.4));
  border-radius: 10px 30px 30px 10px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2) inset;
  content: "";
  display: block;
  height: 33px;
  position: absolute;
  right: 2px;
  top: 2px;
  width: 21px;
  user-select: none;
}

.switch-check:checked + .switch-label span {
  left: 59px;
}

.switch-check:checked + .switch-label:before {
  background: -webkit-radial-gradient(45%, circle, rgba(60, 60, 60, 0.6) 0%, rgba(151, 151, 151, 0.6) 100%);
  border: 1px solid #111;
  box-shadow: 0 2px 5px rgba(20, 20, 20, 0.5);
  user-select: none;
}

.switch-check:checked + .switch-label:after {
  background: -webkit-radial-gradient(45%, circle, lightgreen  0%, lightgreen 100%);
  border: 1px solid #004562;
  box-shadow: 0 2px 5px green, 0 0 5px green inset;
  user-select: none;
}