/**
 * Loyal Ladies Portal - Modern Theme
 * Desktop & Mobile friendly design
 * Version: 2.2.0 - Fixed Bootstrap 3 compatibility
 */

/* ============================================
   CSS VARIABLES - Easy customization
   ============================================ */
:root {
  /* Primary Colors */
  --primary: #021460;
  --primary-dark: #1F41AC;
  --primary-light: #d1fae5;
  --primary-gradient: linear-gradient(135deg, #021460 0%, #1F41AC 100%);
  
  /* Secondary Colors */
  --secondary: #1e3a5f;
  --secondary-dark: #0f2744;
  --secondary-light: #2d5a8a;
  
  /* Accent Colors */
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  
  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* Typography */
  --font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
}

/* ============================================
   BASE STYLES
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  font-size: 13px; /* Large base for better readability */
}

body {
  font-family: var(--font-family) !important;
  background-color: var(--gray-100) !important;
  color: var(--gray-700);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.nav-md,
body.nav-sm {
  background-color: var(--gray-100) !important;
}

/* ============================================
   TYPOGRAPHY - Headings
   ============================================ */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-family) !important;
  font-weight: 700;
  line-height: 1.25;
  color: var(--gray-800);
  margin-top: 0;
  margin-bottom: 0.4rem;
}

h1, .h1 {
  font-size: 2rem;
}

h2, .h2 {
  font-size: 1.6rem;
}

h3, .h3 {
  font-size: 1.35rem;
}

h4, .h4 {
  font-size: 1.15rem;
}

h5, .h5 {
  font-size: 1.05rem;
}

h6, .h6 {
  font-size: 1rem;
}

/* ============================================
   TYPOGRAPHY - Paragraphs & Text
   ============================================ */
p {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gray-600);
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* Content area paragraphs */
.x_content p,
.tab-content p,
.modal-body p,
.profile_left p,
.profile_details p {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gray-600);
}

/* Lead paragraph */
.lead, p.lead {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--gray-600);
}

/* Small text */
small, .small {
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* Strong/Bold */
strong, b {
  font-weight: 600;
  color: var(--gray-800);
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Lists */
ul, ol {
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
}

ul li, ol li {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.35rem;
  color: var(--gray-600);
}

/* ============================================
   SIDEBAR STYLES
   Keep original Gentelella structure but restyle
   ============================================ */
.left_col {
  background: var(--secondary-dark) !important;
}

/* Site Title / Logo */
.navbar.nav_title {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.site_title {
  color: var(--white) !important;
  font-weight: 600;
  text-decoration: none !important;
  letter-spacing: -0.02em;
}

.site_title:hover,
.site_title:focus {
  color: var(--primary-light) !important;
  text-decoration: none !important;
}

.site_title i,
.site_title .fa {
  color: var(--primary);
}

/* Profile Section */
.profile.clearfix {
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile_pic .img-circle.profile_img {
  border: 2px solid var(--primary) !important;
  object-fit: cover;
}

.profile_info span {
  color: var(--gray-400);
}

.profile_info h2 {
  color: var(--white) !important;
  font-weight: 600;
}

/* Sidebar Menu */
.menu_section h3 {
  color: var(--gray-400) !important;
  font-size: 0.75rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Navigation Items */
.nav.side-menu > li {
  margin: 2px 8px;
}

.nav.side-menu > li > a {
  color: var(--gray-300) !important;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  text-decoration: none !important;
}

.nav.side-menu > li > a:hover,
.nav.side-menu > li > a:focus {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--white) !important;
}

.nav.side-menu > li > a:hover i,
.nav.side-menu > li > a:hover .fa {
  color: var(--primary);
}

.nav.side-menu > li.active > a,
.nav.side-menu > li.current-page > a {
  background: var(--primary-gradient) !important;
  color: var(--white) !important;
  box-shadow: var(--shadow-md);
}

.nav.side-menu > li.active > a i,
.nav.side-menu > li.active > a .fa {
  color: var(--white) !important;
}

/* Child Menu */
.nav.child_menu {
  background: rgba(0, 0, 0, 0.15);
}

.nav.child_menu li a {
  color: var(--gray-400) !important;
  font-size: 14px;
  transition: all var(--transition);
  text-decoration: none !important;
}

.nav.child_menu li a:hover,
.nav.child_menu li a:focus {
  color: var(--white) !important;
  background: rgba(255, 255, 255, 0.05);
}

.nav.child_menu li.current-page a,
.nav.child_menu li a.active {
  color: var(--primary) !important;
}

/* Sidebar Footer */
.sidebar-footer {
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer a {
  color: var(--gray-400) !important;
  transition: all var(--transition);
}

.sidebar-footer a:hover {
  color: var(--white) !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   TOP NAVIGATION
   ============================================ */
.top_nav {
  background: var(--white) !important;
}

.nav_menu {
  background: var(--white) !important;
  box-shadow: var(--shadow);
}

/* Menu Toggle Button */
#menu_toggle {
  color: var(--gray-600);
  transition: all var(--transition);
}

#menu_toggle:hover {
  color: var(--primary);
}

/* Navbar Right Items */
.nav.navbar-nav.navbar-right > li > a {
  color: var(--gray-600) !important;
  transition: all var(--transition);
}

.nav.navbar-nav.navbar-right > li > a:hover {
  color: var(--primary) !important;
  background: var(--gray-100) !important;
}

/* User Profile Dropdown */
.user-profile.dropdown-toggle {
  color: var(--gray-700) !important;
  font-weight: 500;
}

.user-profile.dropdown-toggle img {
  border-radius: var(--radius-full);
  border: 2px solid var(--primary-light);
  object-fit: cover;
}

/* Dropdown Menus */
.dropdown-menu {
  border: none !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-xl) !important;
}

.dropdown-menu > li > a {
  border-radius: var(--radius) !important;
  color: var(--gray-700) !important;
  transition: all var(--transition);
}

.dropdown-menu > li > a:hover {
  background: var(--gray-100) !important;
  color: var(--primary-dark) !important;
}

/* Notification Badge */
.info-number .badge,
.badge.bg-red {
  background: var(--danger) !important;
  border-radius: var(--radius-full) !important;
}

/* Notification Dropdown */
.dropdown-menu.msg_list li.unread {
  background: var(--primary-light) !important;
  border-left: 3px solid var(--primary) !important;
}

/* Points Display */
li.points a {
  background: var(--primary-light) !important;
  border-radius: var(--radius-full) !important;
  font-weight: 600 !important;
  color: var(--primary-dark) !important;
}

li.points .bg-green {
  background: var(--primary) !important;
  color: var(--white) !important;
  border-radius: var(--radius-full);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.right_col {
  background: var(--gray-100) !important;
}

/* ============================================
   CARDS & PANELS
   ============================================ */
.x_panel {
  background: var(--white) !important;
  border-radius: var(--radius-lg) !important;
  border: none !important;
  box-shadow: var(--shadow) !important;
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.x_panel:hover {
  box-shadow: var(--shadow-md) !important;
}

/* Border-top colored panels */
.x_panel.bt-red {
  border-top: 3px solid var(--danger) !important;
}

.x_panel.bt-yellow {
  border-top: 3px solid var(--warning) !important;
}

.x_panel.bt-green {
  border-top: 3px solid var(--success) !important;
}

.x_panel.bt-blue {
  border-top: 3px solid var(--info) !important;
}

.x_title {
  background: var(--gray-50) !important;
  border-bottom: 1px solid var(--gray-200) !important;
  padding: 10px 12px !important;
  margin-bottom: 0 !important;
}

.x_title h2,
.x_title h3 {
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  color: var(--gray-800) !important;
  *margin: 0 !important;
  margin: 5px 0 6px;
  float: left;
  display: block;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: middle;
}

.x_title h2 small,
.x_title h3 small {
  *display: block;
  font-size: 0.85rem !important;
  color: var(--gray-500) !important;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  margin-top: 2px;
}

.x_title small.red {
  color: var(--danger) !important;
}

.x_title .nav.navbar-right li a {
  color: var(--primary) !important;
  font-size: 0.75rem;
  font-weight: 600;
}

.x_title .nav.navbar-right li a:hover {
  color: var(--primary-dark) !important;
}

.x_content {
  padding: 10px !important;
}

/* Tile Stats */
.tile-stats {
  background: var(--white) !important;
  border-radius: var(--radius-lg) !important;
  padding: 15px !important;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: none !important;
  margin-bottom: 10px;
}

.tile-stats:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.tile-stats .icon {
  opacity: 0.1 !important;
  color: var(--primary) !important;
}

.tile-stats .count {
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  color: var(--gray-800) !important;
}

.tile-stats .count a {
  color: var(--gray-800);
  text-decoration: none;
}

.tile-stats .count a:hover {
  color: var(--primary);
}

.tile-stats h3 {
  font-size: 0.9rem !important;
  font-weight: 600;
  color: var(--gray-500) !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tile-stats p {
  font-size: 0.95rem !important;
  margin: 0 !important;
}

.tile-stats p i {
  font-style: normal !important;
}

.tile-stats p i.red {
  color: var(--danger) !important;
}

.tile-stats p i.green {
  color: var(--success) !important;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  border-radius: var(--radius) !important;
  font-weight: 500;
  transition: all var(--transition);
}

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

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

.btn-success {
  background: var(--success) !important;
  border-color: var(--success) !important;
}

.btn-danger {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
}

.btn-default {
  background: var(--gray-100) !important;
  border-color: var(--gray-300) !important;
  color: var(--gray-700) !important;
}

.btn-default:hover {
  background: var(--gray-200) !important;
}

/* ============================================
   FORMS
   ============================================ */
.form-control {
  border-radius: var(--radius) !important;
  border-color: var(--gray-300) !important;
  transition: all var(--transition);
}

.form-control:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

/* ============================================
   TABLES
   ============================================ */
.table > thead > tr > th {
  background: var(--gray-50);
  border-bottom-color: var(--gray-200) !important;
  color: var(--gray-600);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.table > tbody > tr > td {
  border-top-color: var(--gray-100) !important;
  color: var(--gray-700);
}

.table > tbody > tr:hover {
  background: var(--gray-50);
}

/* ============================================
   BADGES & LABELS
   ============================================ */
.badge,
.label {
  border-radius: var(--radius-full) !important;
  font-weight: 500;
}

.bg-green,
.label-success {
  background-color: var(--success) !important;
}

.bg-red,
.label-danger {
  background-color: var(--danger) !important;
}

.bg-blue,
.label-primary {
  background-color: var(--info) !important;
}

.bg-orange,
.label-warning {
  background-color: var(--warning) !important;
}

/* ============================================
   MEMBER LISTS
   ============================================ */
.x_leaders {
  max-height: 320px;
  overflow-y: auto;
}

.media.event,
article.media.event {
  padding: 10px;
  margin-bottom: 8px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.media.event:last-child {
  margin-bottom: 0;
}

.media.event:hover {
  background: var(--white);
  box-shadow: var(--shadow);
}

.media.event .pull-left img {
  border-radius: var(--radius-full) !important;
  object-fit: cover;
  border: 2px solid var(--gray-200);
}

.media.event:hover .pull-left img {
  border-color: var(--primary);
}

.media.event .media-body .title,
.media.event .media-body a.title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--gray-800);
  text-decoration: none;
}

.media.event .media-body .title:hover,
.media.event .media-body a.title:hover {
  color: var(--primary);
}

.media.event .media-body p {
  margin: 3px 0 0;
  font-size: 0.9rem;
  color: var(--gray-500);
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ============================================
   MOBILE STYLES
   ============================================ */
@media (max-width: 767px) {
  .x_title {
    padding: 10px 12px !important;
  }
  
  .x_title h2,
  .x_title h3 {
    font-size: 0.95rem !important;
  }
  
  .x_content {
    padding: 12px !important;
  }
  
  .tile-stats {
    padding: 15px !important;
  }
  
  .tile-stats .count {
    font-size: 1.1rem !important;
  }
  
  .media.event {
    padding: 8px;
  }
  
  .user-profile.dropdown-toggle span:not(.fa):not(.caret) {
    display: none;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .left_col,
  .top_nav,
  .sidebar-footer {
    display: none !important;
  }
  
  .right_col {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
}
