/* ==========================================================================
   GLOBAL STYLES & VARIABLES
   ========================================================================== */

/* CSS Variables for Theming */
:root {
  /* Light Theme Colors */
  --bg-color: #f5f7fa;
  --card-bg: #ffffff;
  --text-color: #2c3e50;
  --border-color: #e1e4e8;
  --sidebar-bg: #2c3e50;
  --sidebar-text: #ecf0f1;
  --header-bg: #ffffff;
  --input-bg: #ffffff;
  --table-header-bg: #f8f9fa;
  --hover-bg: #f1f3f5;
  --body-text: #000;
  --body-text-second: #2c3e50;

  /* Color Palette */
  --primary-color: #1a5276;
  --secondary-color: #2874a6;
  --accent-color: #3498db;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --light-color: #ecf0f1;

  /* Layout Dimensions */
  --sidebar-width: 260px;
  --header-height: 60px;

  /* Design Elements */
  --border-radius: 6px;
  --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --card-bg: #2d2d2d;
  --text-color: #e0e0e0;
  --border-color: #404040;
  --sidebar-bg: #1e1e1e;
  --sidebar-text: #e0e0e0;
  --header-bg: #2d2d2d;
  --input-bg: #3d3d3d;
  --table-header-bg: #3a3a3a;
  --hover-bg: #3a3a3a;
  --body-text: #e0e0e0;
  --body-text-second: #b0b0b0;
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--body-text);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-color);
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

p {
  margin-bottom: 1rem;
  color: var(--body-text-second);
}

a {
  text-decoration: none;
  color: var(--accent-color);
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  transition: var(--transition);
}

/* ==========================================================================
   THEME & LANGUAGE SWITCHERS
   ========================================================================== */

/* Theme Switcher */
.theme-switcher {
  display: flex;
  align-items: center;
  margin-right: 15px;
  gap: 0.5rem;
}

.theme-switcher i {
  margin: 0 5px;
  color: var(--text-color);
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Language Switcher */
.language-switcher {
  margin-right: 15px;
}

.language-select {
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.language-select:hover {
  border-color: var(--accent-color);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: var(--transition);
  gap: 0.5rem;
}

.btn i {
  margin-right: 6px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background-color: var(--light-color);
  color: var(--body-text-second);
}

.btn-secondary:hover {
  background-color: #d5dbdb;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--body-text-second);
}

.btn-icon:hover {
  background-color: var(--hover-bg);
}

.btn-icon.delete:hover {
  background-color: rgba(231, 76, 60, 0.1);
  color: var(--danger-color);
}

/* ==========================================================================
   FORMS
   ========================================================================== */

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 14px;
  background-color: var(--input-bg);
  color: var(--text-color);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-control::placeholder {
  color: #999;
}

/* Form Validation */
.form-control.error {
  border-color: var(--danger-color);
}

.form-control.valid {
  border-color: var(--success-color);
}

.error-message {
  color: var(--danger-color);
  font-size: 12px;
  margin-top: 5px;
}

/* Password Input */
.password-input {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
}

/* ==========================================================================
   LAYOUT COMPONENTS
   ========================================================================== */

/* App Container */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.logo h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--sidebar-text);
}

.sidebar-menu {
  flex: 1;
  padding: 20px 0;
}

.sidebar-menu ul {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 5px;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--sidebar-text);
  transition: var(--transition);
  gap: 1rem;
}

.sidebar-menu li a i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.sidebar-menu li.active a,
.sidebar-menu li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 10px;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--sidebar-text);
}

.user-role {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.logout-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px;
  color: rgba(255, 255, 255, 0.7);
  border-radius: var(--border-radius);
  transition: var(--transition);
  gap: 0.5rem;
}

.logout-btn i {
  margin-right: 10px;
}

.logout-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: var(--transition);
}

/* Content Header */
.content-header {
  height: var(--header-height);
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.3s ease;
}

.header {
  background-color: var(--header-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.3s ease;
  padding: 0 20px;
}

.header-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
}

.header-actions {
  display: flex;
  align-items: center;
}

.header-actions .btn-icon {
  margin-left: 10px;
}

/* Content Body */
.content-body {
  padding: 20px;
}

/* ==========================================================================
   DASHBOARD STYLES
   ========================================================================== */

.dashboard-container {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-bottom: 20px;
  transition: background-color 0.3s ease;
}

.margin_center {
  margin: 0 !important;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.dashboard-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-color);
}

.dashboard-actions {
  display: flex;
  gap: 10px;
}

/* Dashboard Widgets */
.dashboard-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.widget {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  border-left: 4px solid var(--accent-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.widget:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.widget-header h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--body-text-second);
}

.widget-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--accent-color);
}

.widget-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-color);
}

.widget-change {
  font-size: 14px;
  font-weight: 500;
}

.widget-change.positive {
  color: var(--success-color);
}

.widget-change.negative {
  color: var(--danger-color);
}

.widget-change.neutral {
  color: var(--warning-color);
}

/* Dashboard Charts */
.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.chart-container {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  transition: background-color 0.3s ease;
}

.chart-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.chart-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
}

.chart-actions {
  display: flex;
}

.chart {
  height: 300px;
}

/* Recent Activities & Notifications */
.dashboard-recent {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
}

.recent-activities,
.notifications {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  transition: background-color 0.3s ease;
}

.recent-activities h3,
.notifications h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-color);
}

.activity-list,
.notification-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.activity-item,
.notification-item {
  display: flex;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}

.activity-item:last-child,
.notification-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-icon,
.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.activity-icon {
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--accent-color);
}

.notification-icon {
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--accent-color);
}

.notification-item.warning .notification-icon {
  background-color: rgba(243, 156, 18, 0.1);
  color: var(--warning-color);
}

.notification-item.info .notification-icon {
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--accent-color);
}

.notification-item.success .notification-icon {
  background-color: rgba(46, 204, 113, 0.1);
  color: var(--success-color);
}

.activity-details,
.notification-details {
  flex: 1;
}

.activity-title,
.notification-title {
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-color);
}

.activity-description,
.notification-description {
  font-size: 14px;
  color: var(--body-text-second);
  margin-bottom: 5px;
}

.activity-time {
  font-size: 12px;
  color: #999;
}

/* ==========================================================================
   USERS MANAGEMENT STYLES
   ========================================================================== */

.users-container {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  transition: background-color 0.3s ease;
}

.users-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.users-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-color);
}

.users-actions {
  display: flex;
  gap: 10px;
}

.users-filters {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: var(--box-shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-color);
}

.users-table-container {
  overflow-x: auto;
  margin-bottom: 20px;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.users-table th {
  background-color: var(--table-header-bg);
  font-weight: 600;
  color: var(--text-color);
}

.users-table tr:hover {
  background-color: var(--hover-bg);
}

.role-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.role-badge.super_admin {
  background-color: rgba(231, 76, 60, 0.1);
  color: var(--danger-color);
}

.role-badge.department_admin {
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--accent-color);
}

.role-badge.user {
  background-color: rgba(46, 204, 113, 0.1);
  color: var(--success-color);
}

.actions {
  display: flex;
  gap: 5px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pagination-info {
  font-size: 14px;
  color: var(--body-text-second);
}

.pagination-controls {
  display: flex;
  gap: 5px;
}

.btn-pagination {
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  transition: var(--transition);
}

.btn-pagination:hover {
  background-color: var(--hover-bg);
}

.btn-pagination.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-pagination:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================================================
   ADD USER FORM STYLES
   ========================================================================== */

.add-user-container {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  transition: background-color 0.3s ease;
}

.add-user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.add-user-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-color);
}

.add-user-form {
  max-width: 800px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-color);
}

.permissions-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.permission-item {
  display: flex;
  align-items: center;
}

.permission-item input {
  margin-right: 8px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* ==========================================================================
   COMING SOON STYLES
   ========================================================================== */

.coming-soon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - var(--header-height));
  padding: 20px;
}

.coming-soon-content {
  text-align: center;
  max-width: 600px;
}

.coming-soon-icon {
  font-size: 80px;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.coming-soon-content h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-color);
}

.coming-soon-content p {
  font-size: 18px;
  color: var(--body-text-second);
  margin-bottom: 30px;
}

.coming-soon-features {
  text-align: left;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: var(--box-shadow);
}

.coming-soon-features h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-color);
}

.coming-soon-features ul {
  list-style-type: none;
}

.coming-soon-features li {
  padding: 8px 0;
  padding-left: 25px;
  position: relative;
  color: var(--body-text-second);
}

.coming-soon-features li:before {
  content: "\f00c";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--success-color);
}

.coming-soon-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

/* ==========================================================================
   AUTHENTICATION STYLES
   ========================================================================== */

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  padding: 20px;
}

.auth-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  padding: 30px;
  transition: background-color 0.3s ease;
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 36px;
}

.auth-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-color);
}

.auth-header p {
  color: var(--body-text-second);
  margin-top: 5px;
}

.auth-form .form-group {
  margin-bottom: 20px;
}

.auth-form .form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-color);
}

.auth-form .form-control {
  width: 100%;
}

.auth-form .form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.auth-form .btn {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
}

.auth-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.auth-divider:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--border-color);
}

.auth-divider span {
  background-color: var(--card-bg);
  padding: 0 10px;
  color: var(--body-text-second);
  font-size: 14px;
}

.auth-links {
  text-align: center;
  margin-top: 20px;
}

.auth-links a {
  color: var(--accent-color);
  font-weight: 500;
}

/* ==========================================================================
   PROFILE PAGE STYLES
   ========================================================================== */

.profile-page {
  background: linear-gradient(135deg, var(--bg-color) 0%, var(--hover-bg) 100%);
  min-height: 100vh;
  transition: background 0.3s ease;
}

/* Page Header */
.page-header {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  color: #fff;
}

.page-header h1 i {
  margin-right: 15px;
  color: #ffd700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.breadcrumb {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  margin-bottom: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  list-style: none;
  gap: 10px;
}

.breadcrumb-item a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
  color: #ffd700;
  text-decoration: none;
}

.breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: rgba(255, 255, 255, 0.6);
  font-weight: bold;
  margin: 0 10px 0 0;
}

/* Alert Styles */
.alert {
  border-radius: 15px;
  border: none;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.alert-success {
  background: linear-gradient(
    135deg,
    rgba(40, 167, 69, 0.9),
    rgba(25, 135, 84, 0.9)
  );
  color: white;
  border-left: 5px solid var(--success-color);
}

.alert-danger {
  background: linear-gradient(
    135deg,
    rgba(220, 53, 69, 0.9),
    rgba(187, 45, 59, 0.9)
  );
  color: white;
  border-left: 5px solid var(--danger-color);
}

.alert i {
  margin-right: 10px;
  font-size: 1.1em;
}

.alert .close {
  color: white;
  opacity: 0.8;
  font-size: 1.5rem;
  padding: 0.5rem;
  transition: opacity 0.3s ease;
}

.alert .close:hover {
  opacity: 1;
  color: white;
  text-decoration: none;
}

/* Profile Card */
.profile-card {
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--hover-bg) 100%);
  border: none;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.profile-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--primary-color) 0%,
    var(--secondary-color) 50%,
    var(--primary-color) 100%
  );
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.profile-card .card-body {
  padding: 2rem;
  text-align: center;
}

/* Profile Avatar */
.profile-avatar {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.profile-avatar img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--card-bg);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-avatar:hover img {
  transform: scale(1.05);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.avatar-overlay {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: 3px solid var(--card-bg);
}

.avatar-overlay:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.avatar-overlay i {
  font-size: 16px;
}

/* Profile Info */
.profile-card h4 {
  color: var(--text-color);
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.profile-card .text-muted {
  color: var(--body-text-second) !important;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.profile-card .text-muted i {
  margin-right: 8px;
  color: var(--primary-color);
}

/* Profile Stats */
.profile-stats {
  border-top: 2px solid var(--border-color);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.stat-item {
  padding: 0.5rem;
  transition: transform 0.2s ease;
}

.stat-item:hover {
  transform: translateY(-2px);
}

.stat-item h5 {
  color: var(--text-color);
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.stat-item p {
  color: var(--body-text-second);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0;
}

/* Main Form Card */
.card {
  background: var(--card-bg);
  border: none;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.card:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
  background: linear-gradient(
    135deg,
    var(--hover-bg) 0%,
    var(--border-color) 100%
  );
  border-bottom: 2px solid var(--border-color);
  padding: 0;
}

/* Navigation Tabs */
.nav-tabs {
  border-bottom: none;
  background: transparent;
  display: flex;
  list-style: none;
  padding: 1rem 0;
}

.nav-tabs .nav-item {
  margin-bottom: 0;
}

.nav-tabs .nav-link {
  color: var(--body-text-second);
  border: none;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  background: transparent;
}

.nav-tabs .nav-link:hover {
  color: var(--primary-color);
  background: rgba(102, 126, 234, 0.05);
  border-color: transparent;
}

.nav-tabs .nav-link.active {
  color: var(--primary-color);
  background: rgba(102, 126, 234, 0.1);
  border-bottom: 3px solid var(--primary-color);
  font-weight: 700;
}

.nav-tabs .nav-link i {
  margin-right: 8px;
  font-size: 1.1em;
}

/* Tab Content */
.card-body {
  padding: 2rem;
}

.tab-content .tab-pane {
  opacity: 0;
  display: none;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.tab-content .tab-pane.show.active {
  opacity: 1;
  display: block;
  transform: translateY(0);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  color: var(--text-color);
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  display: block;
}

.form-group label .text-danger {
  color: var(--danger-color) !important;
  margin-left: 3px;
}

.form-control {
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: var(--input-bg);
  color: var(--text-color);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
  background: var(--card-bg);
  outline: none;
}

.form-control:hover {
  border-color: var(--border-color);
}

.form-control[readonly] {
  background-color: var(--hover-bg);
  opacity: 1;
  cursor: not-allowed;
}

/* Form Validation Styles */
.form-control.is-valid {
  border-color: var(--success-color);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.13-.13 2.2-2.2c.31-.31.85-.31 1.16 0l.13.13c.31.31.31.85 0 1.16L4.16 7.45c-.31.31-.85.31-1.16 0L1.14 5.59a.83.83 0 0 1 0-1.16z'/%3e%3cpath fill='none' stroke='%2328a745' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m1 4 2 2 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 18px;
  padding-right: 45px;
}

.form-control.is-invalid {
  border-color: var(--danger-color);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 2.4 2.4M8.2 4.6 5.8 7'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 18px;
  padding-right: 45px;
}

.form-text {
  color: var(--body-text-second);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Button Styles */
.btn {
  border-radius: 10px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

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

.btn-warning {
  background: linear-gradient(135deg, var(--warning-color), #ff8c00);
  color: var(--body-text);
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
  color: var(--body-text);
}

.btn i {
  margin-right: 8px;
}

/* Password Strength Indicator */
.password-strength {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--hover-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.strength-meter {
  width: 100%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.strength-bar {
  height: 100%;
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 4px;
  position: relative;
}

.strength-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.strength-bar.weak {
  background: linear-gradient(135deg, var(--danger-color), #c82333);
}

.strength-bar.medium {
  background: linear-gradient(135deg, var(--warning-color), #e0a800);
}

.strength-bar.strong {
  background: linear-gradient(135deg, #17a2b8, #138496);
}

.strength-bar.very-strong {
  background: linear-gradient(135deg, var(--success-color), #1e7e34);
}

.strength-text {
  font-size: 0.85rem;
  color: var(--body-text-second);
  font-weight: 600;
  text-align: center;
}

/* Character Counter */
.char-counter {
  font-size: 0.8rem;
  color: var(--body-text-second);
  text-align: right;
  margin-top: 0.25rem;
  font-weight: 500;
}

.char-counter.warning {
  color: var(--warning-color);
  font-weight: 700;
}

/* Row and Column Spacing */
.row {
  margin-left: -15px;
  margin-right: -15px;
  display: flex;
}

.row > [class*="col-"] {
  padding-left: 15px;
  padding-right: 15px;
  margin-bottom: 1rem;
}

/* Utility Classes */
.text-center {
  text-align: center !important;
}

.mt-3 {
  margin-top: 1rem !important;
}

.mt-4 {
  margin-top: 1.5rem !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.rounded-circle {
  border-radius: 50% !important;
}

/* Loading Animation */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Focus Accessibility */
button:focus,
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .page-header,
  .breadcrumb,
  .btn,
  .alert {
    display: none !important;
  }
  .profile-card,
  .card {
    box-shadow: none !important;
    border: 1px solid var(--border-color) !important;
  }
}

.p-4 {
  padding: 20px;
}

/* ==========================================================================
   DATA MANAGEMENT STYLES
   ========================================================================== */

.data-management-container,
.add-data-container,
.edit-data-container {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-bottom: 20px;
  transition: background-color 0.3s ease;
}

.data-management-header,
.add-data-header,
.edit-data-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.data-management-header h1,
.add-data-header h1,
.edit-data-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-color);
}

.data-actions {
  display: flex;
  gap: 10px;
}

.data-filters {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 15px;
  margin-bottom: 20px;
}

.data-filters form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
}

.data-table-container {
  margin-bottom: 30px;
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background-color: var(--table-header-bg);
  font-weight: 600;
  color: var(--text-color);
}

.data-table tr:hover {
  background-color: var(--hover-bg);
}

.no-records {
  text-align: center;
  padding: 20px;
  color: var(--body-text-second);
  font-style: italic;
}

/* Chart Section */
.chart-section {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-top: 30px;
  transition: background-color 0.3s ease;
}

.chart-controls {
  display: flex;
  gap: 10px;
}

.chart-container {
  height: 400px;
}

/* Form Styles */
.add-data-form,
.edit-data-form {
  max-width: 800px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-color);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.pagination {
  display: flex;
  padding-left: 0;
  list-style: none;
  border-radius: 0.25rem;
}

.page-item {
  position: relative;
  display: block;
  padding: 0.5rem 0.75rem;
  margin-left: -1px;
  line-height: 1.25;
  color: #007bff;
}

.page-item:first-child {
  margin-left: 0;
  border-top-left-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
}

.page-item:last-child {
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
}

.page-item.active .page-link {
  z-index: 1;
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

.page-link {
  position: relative;
  display: block;
  padding: 0.5rem 0.75rem;
  margin-left: -1px;
  line-height: 1.25;
  color: #007bff;
  background-color: #fff;
  border: 1px solid #dee2e6;
  text-decoration: none;
}

.page-link:hover {
  z-index: 2;
  color: #0056b3;
  text-decoration: none;
  background-color: #e9ecef;
  border-color: #dee2e6;
}

.last-updated-container {
  margin-top: 20px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
  text-align: center;
}

.last-updated {
  color: #6c757d;
  font-size: 0.9rem;
  text-align: center;
}

.last-updated i {
  margin-right: 5px;
}

.last-updated strong {
  color: #495057;
}

@media (min-width: 768px) {
  .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (min-width: 1240px) {
  .col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-lg-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
}

.space_between {
  justify-content: space-between;
}

.space_between {
  justify-content: space-between;
}
.max_1500 {
  max-width: 1500px;
  margin: 0 auto;
}
.users-table tr th:last-child,
.users-table tr td:last-child {
  width: 150px;
}

.dashboard-time-period {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 15px;
    font-size: 16px;
    font-weight: 500;
}

.dashboard-time-period .current-period {
    color: #007bff;
}

.dashboard-time-period .previous-period {
    color: #6c757d;
}

.category-filter {
    margin-bottom: 20px;
}

.category-filter .btn {
    margin-right: 5px;
    margin-bottom: 5px;
}

.video-category {
    margin-bottom: 30px;
}

.video-category h4 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.video-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.video-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.video-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.video-thumbnail {
    height: 180px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    padding: 15px;
}

.video-info h5 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

.video-info p {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.video-actions {
    display: flex;
    gap: 10px;
}


.video-thumbnail {
    height: 200px;
    overflow: hidden;
    background-color: #000;
    position: relative;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-preview {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background-color: #f8f9fa;
}

.video-item {
    transition: transform 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.video-actions {
    margin-top: 15px;
}