/* ============================================
   DOJOSTACK ADMIN CMS - BRANDING STYLES
   Powering dojos everywhere.
   ============================================ */

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* ============================================
   DOJOSTACK BRAND COLORS
   ============================================ */
:root {
  --dojostack-primary: #0d6efd;
  --dojostack-secondary: #6c757d;
  --dojostack-success: #198754;
  --dojostack-info: #0dcaf0;
  --dojostack-warning: #ffc107;
  --dojostack-danger: #dc3545;
  --dojostack-dark: #212529;
  --dojostack-light: #f8f9fa;
}

/* ============================================
   FOCUS STATES
   ============================================ */
.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 {
  /* Remove fixed margin to prevent overlap */
  margin-bottom: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Ensure main content takes up available space */
.container-fluid {
  flex: 1 0 auto;
}

/* ============================================
   NAVIGATION BRANDING
   ============================================ */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    transition: opacity 0.2s;
}

.navbar-brand:hover {
    opacity: 0.9;
}

.navbar-brand img {
    transition: transform 0.2s;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Active navigation highlighting */
.navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
 border-radius: 4px;
    font-weight: 600;
}

.navbar-nav .nav-link {
    transition: background-color 0.2s, transform 0.1s;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

/* ============================================
   FOOTER BRANDING - FIXED TO NOT OVERLAP
   ============================================ */
.footer {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    border-top: 2px solid #e9ecef;
    /* Changed from absolute to relative positioning */
 position: relative;
    width: 100%;
    padding: 1.5rem 0;
    margin-top: 3rem;
  /* Flex shrink to stay at bottom */
    flex-shrink: 0;
}

.footer img {
    filter: grayscale(30%);
    transition: filter 0.2s;
}

.footer img:hover {
    filter: grayscale(0%);
}

/* Ensure main content has proper spacing */
main {
    padding-bottom: 2rem !important;
    min-height: calc(100vh - 400px);
}

/* ============================================
 DOJOSTACK HERO SECTIONS (for landing/home)
   ============================================ */
.dojostack-hero {
    background: linear-gradient(135deg, var(--dojostack-primary) 0%, #0056b3 100%);
    color: white;
  padding: 4rem 0;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

.dojostack-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.dojostack-hero .subhead {
  font-size: 1.25rem;
    opacity: 0.95;
    font-weight: 300;
}

/* ============================================
   DOJOSTACK SECTION HEADERS
   ============================================ */
.dojostack-section-header {
  text-align: center;
    margin: 3rem 0 2rem;
}

.dojostack-section-header h2 {
    font-size: 2rem;
 font-weight: 600;
    color: var(--dojostack-dark);
    margin-bottom: 0.5rem;
}

.dojostack-section-header .tagline {
 font-size: 1.1rem;
    color: var(--dojostack-secondary);
    font-weight: 400;
}

/* ============================================
   DASHBOARD STAT CARDS
   ============================================ */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e9ecef;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-header {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
}

/* ============================================
   CARD HEADER TEXT COLOR FIX
   Ensures card header text is always readable
   ============================================ */

/* Default card headers - dark text on light background */
.card-header {
    color: #212529 !important;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    color: #212529 !important;
}

/* ?? CRITICAL FIX: Override Bootstrap's text-white class on colored card headers */
/* This ensures text is ALWAYS BLACK unless explicitly styled otherwise */

.card-header.bg-primary,
.card-header.bg-success,
.card-header.bg-danger,
.card-header.bg-dark,
.card-header.bg-secondary {
    /* Remove these lines - we want dark text on ALL backgrounds */
}

.card-header.bg-primary h1,
.card-header.bg-primary h2,
.card-header.bg-primary h3,
.card-header.bg-primary h4,
.card-header.bg-primary h5,
.card-header.bg-primary h6,
.card-header.bg-success h1,
.card-header.bg-success h2,
.card-header.bg-success h3,
.card-header.bg-success h4,
.card-header.bg-success h5,
.card-header.bg-success h6,
.card-header.bg-danger h1,
.card-header.bg-danger h2,
.card-header.bg-danger h3,
.card-header.bg-danger h4,
.card-header.bg-danger h5,
.card-header.bg-danger h6,
.card-header.bg-dark h1,
.card-header.bg-dark h2,
.card-header.bg-dark h3,
.card-header.bg-dark h4,
.card-header.bg-dark h5,
.card-header.bg-dark h6,
.card-header.bg-secondary h1,
.card-header.bg-secondary h2,
.card-header.bg-secondary h3,
.card-header.bg-secondary h4,
.card-header.bg-secondary h5,
.card-header.bg-secondary h6 {
    color: #212529 !important;
}

/* Warning and Info - already dark text for better contrast */
.card-header.bg-warning,
.card-header.bg-info {
 color: #212529 !important;
}

.card-header.bg-warning h1,
.card-header.bg-warning h2,
.card-header.bg-warning h3,
.card-header.bg-warning h4,
.card-header.bg-warning h5,
.card-header.bg-warning h6,
.card-header.bg-info h1,
.card-header.bg-info h2,
.card-header.bg-info h3,
.card-header.bg-info h4,
.card-header.bg-info h5,
.card-header.bg-info h6 {
    color: #212529 !important;
}

/* ?? CRITICAL: Override text-white class specifically on card headers */
/* This is the main fix - text-white should NOT apply to card headers */
.card-header.text-white,
.card-header.text-white h1,
.card-header.text-white h2,
.card-header.text-white h3,
.card-header.text-white h4,
.card-header.text-white h5,
.card-header.text-white h6,
.card-header.bg-primary.text-white,
.card-header.bg-primary.text-white h1,
.card-header.bg-primary.text-white h2,
.card-header.bg-primary.text-white h3,
.card-header.bg-primary.text-white h4,
.card-header.bg-primary.text-white h5,
.card-header.bg-primary.text-white h6,
.card-header.bg-success.text-white,
.card-header.bg-success.text-white h1,
.card-header.bg-success.text-white h2,
.card-header.bg-success.text-white h3,
.card-header.bg-success.text-white h4,
.card-header.bg-success.text-white h5,
.card-header.bg-success.text-white h6,
.card-header.bg-danger.text-white,
.card-header.bg-danger.text-white h1,
.card-header.bg-danger.text-white h2,
.card-header.bg-danger.text-white h3,
.card-header.bg-danger.text-white h4,
.card-header.bg-danger.text-white h5,
.card-header.bg-danger.text-white h6,
.card-header.bg-secondary.text-white,
.card-header.bg-secondary.text-white h1,
.card-header.bg-secondary.text-white h2,
.card-header.bg-secondary.text-white h3,
.card-header.bg-secondary.text-white h4,
.card-header.bg-secondary.text-white h5,
.card-header.bg-secondary.text-white h6 {
    color: #212529 !important;
}

/* ============================================
   STAT CARDS WITH ICONS
   ============================================ */
.stat-card {
padding: 1.5rem;
    border-radius: 0.5rem;
    background: white;
    border-left: 4px solid var(--dojostack-primary);
}

.stat-card.success {
 border-left-color: var(--dojostack-success);
}

.stat-card.warning {
    border-left-color: var(--dojostack-warning);
}

.stat-card.danger {
    border-left-color: var(--dojostack-danger);
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.7;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-card .stat-label {
    color: var(--dojostack-secondary);
  font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
    text-align: center;
 padding: 4rem 2rem;
    color: var(--dojostack-secondary);
}

.empty-state .empty-icon {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dojostack-dark);
    margin-bottom: 0.5rem;
}

.empty-state .tagline {
    font-size: 0.95rem;
    color: var(--dojostack-secondary);
    font-style: italic;
}

/* ============================================
   RECENT ACTIVITY & LIST ITEMS
   ============================================ */
.list-group-item-action {
    transition: background-color 0.2s, transform 0.1s;
    border-left: 3px solid transparent;
}

.list-group-item-action:hover {
    background-color: #f8f9fa;
  transform: translateX(4px);
    border-left-color: var(--dojostack-primary);
}

.list-group-item-action:active {
    background-color: #e9ecef;
}

/* ============================================
 BADGES & LABELS
   ============================================ */
.badge {
    font-weight: 600;
    padding: 0.35em 0.65em;
}

/* ? NOTIFICATION BADGE - EXPLICIT RED COLOR */
/* Notification bell badge - MUST BE RED */
.notification-badge {
    background-color: #dc3545 !important; /* Bootstrap danger red */
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    padding: 0.35rem 0.5rem !important;
    border: 2px solid white !important;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.4) !important;
}

/* Ensure it stays red even if other classes are applied */
.badge.notification-badge {
    background-color: #dc3545 !important;
color: #ffffff !important;
}

span.notification-badge {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--dojostack-primary) 0%, #0056b3 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
}

/* ============================================
TOOLTIPS & HELP TEXT
   ============================================ */
.help-text {
 font-size: 0.875rem;
    color: var(--dojostack-secondary);
  font-style: italic;
}

.help-text::before {
    content: "?? ";
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
  align-items: center;
    justify-content: center;
    z-index: 999;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.25rem solid var(--dojostack-light);
    border-top-color: var(--dojostack-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 768px) {
    .dojostack-hero h1 {
font-size: 1.75rem;
    }
    
  .dojostack-hero .subhead {
 font-size: 1rem;
    }
    
    .navbar-brand span {
      display: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
.navbar, .footer, .btn, .card-header .dropdown {
  display: none !important;
    }
    
    .card {
    border: 1px solid #000;
        page-break-inside: avoid;
  }
}

/* ============================================
   ACCESSIBILITY
 ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
border: 0;
}

/* ============================================
   DOJOSTACK SIGNATURE (for email templates)
   ============================================ */
.dojostack-signature {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.dojostack-signature .logo {
    max-width: 120px;
    margin-bottom: 8px;
}

.dojostack-signature .tagline {
    font-size: 12px;
    color: #666;
    font-style: italic;
}