:root {
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 60px;
    --primary-color: #0d6efd;
    --sidebar-bg: #2c3e50;
    --sidebar-header-bg: #e3f2fd;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background-color: var(--sidebar-header-bg);
}

.sidebar-brand {
    display: block;
    text-align: center;
}

.sidebar-brand img {
    max-width: 100%;
    height: auto;
    max-height: 40px;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    margin: 0.5rem 0;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link i {
    width: 20px;
    margin-right: 1rem;
    text-align: center;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Top Bar */
.topbar {
    height: var(--topbar-height);
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.toggle-sidebar {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
    transition: color 0.3s ease;
}

.toggle-sidebar:hover {
    color: var(--primary-color);
}

.user-profile {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.user-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-left: 1rem;
    object-fit: cover;
}

/* Page Content */
.page-content {
    padding: 1.5rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 1rem 1.5rem;
    border-bottom: none;
}

.card-body {
    padding: 1.5rem;
}

/* Forms */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .topbar {
        left: 0;
    }
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
  margin-bottom: 60px;
  background-color: #1e3a5f;
  color: #ffffff;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Custom styles */
.profile-picture {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card {
  background-color: #ffffff;
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.card-header {
  background-color: #ffffff;
  border-bottom: 1px solid #eee;
  padding: 1rem;
}

.table th {
  font-weight: 600;
  border-top: none;
}

.badge {
  padding: 0.5em 0.75em;
  font-weight: 500;
}

.btn {
  padding: 0.5rem 1rem;
  font-weight: 500;
  border-radius: 5px;
}

.btn-primary {
  background-color: #007bff;
  border-color: #007bff;
}

.btn-primary:hover {
  background-color: #0069d9;
  border-color: #0062cc;
}

.form-control {
  border-radius: 5px;
  border: 1px solid #ced4da;
  padding: 0.5rem 0.75rem;
}

.form-control:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.navbar {
  background-color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-weight: bold;
}

.navbar-brand img {
  height: 30px;
  margin-right: 10px;
}

.navbar-nav .nav-link {
  color: #333333 !important;
}

.navbar-nav .nav-link:hover {
  color: #007bff !important;
}

.footer {
  background-color: #152a45;
  padding: 1rem 0;
  position: fixed;
  bottom: 0;
  width: 100%;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

.container-fluid {
  padding-top: 20px;
  padding-bottom: 80px;
}

.validation-summary-errors {
  color: #dc3545;
  margin-bottom: 1rem;
}

.validation-summary-errors ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.field-validation-error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.input-validation-error {
  border-color: #dc3545;
}

.input-validation-error:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.dropdown-menu {
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  color: #333333;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
  color: #007bff;
}

.dropdown-divider {
  margin: 0.5rem 0;
  border-top: 1px solid #eee;
}

.nav-section-header {
    padding: 0.5rem 1rem;
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-top: 1rem;
}

.nav-section-header i {
    margin-right: 0.5rem;
}

/* Video Modal Styles */
#videoModal .modal-dialog {
    max-width: 800px;
}

#videoModal .modal-content {
    background-color: #000;
    border: none;
}

#videoModal .modal-header {
    border-bottom: 1px solid #333;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 1rem;
}

#videoModal .modal-title {
    color: #fff;
}

#videoModal .modal-body {
    padding: 0;
    background-color: #000;
}

#videoModal .video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

#videoModal .video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #000;
}

#videoModal .modal-footer {
    border-top: 1px solid #333;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 1rem;
}

#videoModal .form-check-label {
    color: #fff;
}

#videoModal .btn-close {
    color: #fff;
    opacity: 0.8;
    filter: invert(1) grayscale(100%) brightness(200%);
}

#videoModal .btn-close:hover {
    opacity: 1;
}

#videoModal .btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
}

#videoModal .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Hide header and footer when video is in fullscreen */
#videoModal:-webkit-full-screen .modal-header,
#videoModal:-webkit-full-screen .modal-footer,
#videoModal:-moz-full-screen .modal-header,
#videoModal:-moz-full-screen .modal-footer,
#videoModal:fullscreen .modal-header,
#videoModal:fullscreen .modal-footer {
    display: none;
}