/* Updated Notion‑style Theme for Raghav's Toolkit */

/* Color Variables */
:root {
  /* Neutrals */
  --bg-primary: #F9FAFB;
  --bg-surface: #FFFFFF;
  --bg-muted: #F1F3F5;

  /* Text */
  --text-primary: #1A1D1F;
  --text-secondary: #5C6670;
  --text-placeholder: #A0AAB4;

  /* Borders & Dividers */
  --border-default: #E2E8F0;

  /* Accents */
  --accent-primary: #3B82F6;
  --accent-hover: #2563EB;

  /* Feedback */
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  
  /* Badge Colors */
  --blue-100: #dbeafe;
  --blue-800: #1e40af;
  --green-100: #dcfce7;
  --green-800: #166534;
  --yellow-100: #fef9c3;
  --yellow-800: #854d0e;
  --red-100: #fee2e2;
  --red-800: #991b1b;
  
  /* Legacy mapping for compatibility */
  --neocore-primary: var(--accent-primary);
  --neocore-accent: var(--success);
  --neocore-background: var(--bg-primary);
  --neocore-surface: var(--bg-surface);
  --neocore-text-primary: var(--text-primary);
  --neocore-text-secondary: var(--text-secondary);
  --neocore-highlight: var(--warning);
  --neocore-danger: var(--error);
  
  /* Override Bootstrap variables */
  --bs-primary: var(--accent-primary);
  --bs-primary-rgb: 59, 130, 246;
  --bs-secondary: var(--text-secondary);
  --bs-secondary-rgb: 92, 102, 112;
  --bs-success: var(--success);
  --bs-success-rgb: 16, 185, 129;
  --bs-info: var(--accent-primary);
  --bs-info-rgb: 59, 130, 246;
  --bs-warning: var(--warning);
  --bs-warning-rgb: 245, 158, 11;
  --bs-danger: var(--error);
  --bs-danger-rgb: 239, 68, 68;
  --bs-light: #F9FAFB;
  --bs-light-rgb: 249, 250, 251;
  --bs-dark: #1A1D1F;
  --bs-dark-rgb: 26, 29, 31;
  --bs-body-bg: var(--bg-primary);
  --bs-body-color: var(--text-primary);
}

/* Global Layout */
body {
    padding-top: 60px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    line-height: 1.5;
}

/* Override for bootstrap text colors in light mode */
body[data-bs-theme="light"] {
    color: var(--text-primary) !important;
}

body[data-bs-theme="light"] p, 
body[data-bs-theme="light"] div, 
body[data-bs-theme="light"] span, 
body[data-bs-theme="light"] label, 
body[data-bs-theme="light"] h1, 
body[data-bs-theme="light"] h2, 
body[data-bs-theme="light"] h3, 
body[data-bs-theme="light"] h4, 
body[data-bs-theme="light"] h5, 
body[data-bs-theme="light"] h6,
body[data-bs-theme="light"] th,
body[data-bs-theme="light"] td,
body[data-bs-theme="light"] a:not(.btn):not(.nav-link),
body[data-bs-theme="light"] li {
    color: var(--text-primary);
}

/* Custom circular radio buttons */
.circular-radio {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 50% !important;
    outline: none !important;
    background-color: #fff !important;
    cursor: pointer !important;
    position: relative !important;
    margin: 0 !important;
    vertical-align: middle !important;
    box-shadow: none !important;
}

.circular-radio:checked {
    border-color: #0d6efd !important;
    background-color: #fff !important;
    background-image: none !important;
}

.circular-radio:checked::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    background-color: #0d6efd !important;
}

/* Dashboard-specific overrides */
.report-card .card-body h5,
.report-card .card-body p,
.dashboard-stats .card-body h3,
.dashboard-stats .card-body p,
.table td, .table th {
    color: var(--text-primary) !important;
}

/* Tables */
.table, table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

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

.table tbody tr:nth-child(even), table tbody tr:nth-child(even) {
    background-color: var(--bg-muted);
}

/* Force light table styles */
.table-dark {
    background-color: var(--bg-surface) !important;
    color: var(--text-primary) !important;
}

.table-dark th,
.table-dark td,
.table-dark thead th {
    border-color: var(--border-default) !important;
    color: var(--text-primary) !important;
    background-color: transparent !important;
}

/* Dashboard styling */
.dashboard-header h3 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.4rem;
    border-bottom: 1px solid var(--border-default);
    padding-bottom: 0.75rem;
}

.report-card {
    border: 1px solid var(--border-default);
    background-color: var(--bg-surface);
    transition: all 0.2s ease;
}

.report-card:hover {
    border-color: var(--border-focus);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.report-card .card-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.report-card .card-body h5 {
    color: var(--text-primary);
    font-weight: 600;
}

.report-card .card-footer {
    background-color: var(--bg-muted);
    border-top: 1px solid var(--border-subtle);
}

/* Override for text colors in small text elements */
.small.text-info {
    color: var(--indigo) !important;
}

.small.text-primary {
    color: var(--blue) !important;
}

/* Badge overrides for better visibility in light theme */
.badge.bg-info {
    background-color: var(--blue-100) !important;
    color: var(--blue-800) !important;
}

.badge.bg-warning {
    background-color: var(--yellow-100) !important; 
    color: var(--yellow-800) !important;
}

.badge.bg-success {
    background-color: var(--green-100) !important;
    color: var(--green-800) !important;
}

.badge.bg-danger {
    background-color: var(--red-100) !important;
    color: var(--red-800) !important;
}

/* Uniform outcome badge styling */
.outcome-badge {
    min-width: 90px;
    text-align: center;
    display: inline-block;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    line-height: 1;
}

main {
    flex: 1;
    padding: 2rem;
}

footer {
    margin-top: auto;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-default);
    padding: 1.5rem 0;
}

/* Upload page styles */
.upload-container {
    border: 2px dashed var(--border-default);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    background-color: var(--bg-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.upload-container:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

/* Processing overlay */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 29, 31, 0.8) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.processing-content {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 90%;
    width: 500px;
}

/* Report page styles */
.report-header {
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

.category-card {
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.chart-container {
    height: 200px;
    margin: 1rem 0;
}

.rating-container {
    margin: 1rem 0;
    font-size: 1.5rem;
}

/* Rating colors */
.rating-win {
    color: var(--bs-success);
}

.rating-progress {
    color: var(--bs-info);
}

.rating-no-decision {
    color: var(--bs-warning);
}

.rating-loss {
    color: var(--bs-danger);
}

/* Summary section styles */
.summary-section {
    font-size: 1.1rem;
    line-height: 1.7;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

/* Analysis Content Styling */
.analysis-content {
    margin-bottom: 1rem;
}

.analysis-points {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.analysis-points li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
    position: relative;
}

.analysis-points li::before {
    content: "";
    position: absolute;
    left: -1.25rem;
    top: 0.5rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--bs-info);
}

.key-takeaway {
    font-size: 0.95rem;
    border-left: 4px solid var(--bs-warning);
}

.key-takeaway strong {
    color: var(--bs-warning);
}

h5.border-bottom, h4.border-bottom {
    color: var(--bs-light);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Performance insights styling */
.performance-insights {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.performance-insights .analysis-points li::before {
    background-color: var(--bs-info);
}

.performance-insights h4.text-info + .analysis-points li::before {
    background-color: var(--bs-info);
}

.performance-insights h4.text-warning + .analysis-points li::before {
    background-color: var(--bs-warning);
}

.summary-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Processing modal and timeline styling */
.processing-timeline {
    margin: 2rem 0;
}

.processing-step {
    display: flex;
    margin-bottom: 1.5rem;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.processing-step.active {
    opacity: 1;
}

.processing-step.completed .step-icon {
    background-color: var(--bs-success);
    color: white;
}

.processing-step.error .step-icon {
    background-color: var(--bs-danger);
    color: white;
}

.step-icon {
    width: 50px;
    height: 50px;
    /* background-color: var(--bs-dark); */
    border: 1px solid var(--bs-border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-indicator{
    display: flex;
    justify-content: space-between;
}

.step-content {
    flex-grow: 1;
}

.step-content h5 {
    margin-bottom: 0.25rem;
}

.step-content p {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.step-time {
    font-size: 0.8rem;
    color: var(--bs-secondary);
}

#processingModal {
    z-index: 1055;
}

#processingModal .modal-backdrop {
    background-color: rgba(14, 15, 27, 0.7);
    opacity: 1;
}

#processingModal .modal-dialog {
    z-index: 1056;
}

#processingModal .modal-content {
    /* background: rgba(31, 34, 53, 1); */
    border: 1px solid rgba(108, 93, 211, 0.3);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

#processingModal .modal-header {
    border-bottom: 1px solid rgba(108, 93, 211, 0.2);
}

#processingModal .modal-footer {
    border-top: 1px solid rgba(108, 93, 211, 0.2);
}

#currentStep {
    margin-top: 1rem;
    color: var(--neocore-text-primary);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(108, 93, 211, 0.3);
}

/* NeoCore AI Specific Styling */

/* Cards */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Buttons */
button, .btn-primary, .btn-success, .btn-info {
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.2s ease;
    padding: 8px 16px;
    border: none;
    cursor: pointer;
}

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

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

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

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

.btn-success:hover, .btn-info:hover {
    opacity: 0.9;
}

/* Auth actions (Login/Register) - neutral, non-blue styling */
.auth-login-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  border-radius: 8px;
  padding: 6px 14px;
  line-height: 1.2;
  display: inline-block;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.auth-login-link:hover {
  color: #000 !important;
  background-color: #E9EDF2; /* slightly deeper than bg-muted for contrast */
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.auth-login-link:active {
  background-color: #E3E8EE;
}

.btn-auth {
  background-color: #111111;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.05s ease;
}

.btn-auth:hover {
  background-color: #0d0d0d;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-auth:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15);
}

.btn-auth:active {
  transform: translateY(0.5px);
}

/* Center align navbar auth items */
.navbar-nav .nav-item {
  display: flex;
  align-items: center;
}

/* Inputs & Forms */
input, select, textarea, .form-control, .form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder, textarea::placeholder, .form-control::placeholder {
    color: var(--text-placeholder);
}

input:focus, select:focus, textarea:focus, .form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Badges for status indicators */
.badge {
    border-radius: 6px;
    padding: 0.4em 0.8em;
    font-weight: 500;
    font-size: 0.85em;
    letter-spacing: 0.2px;
}

.badge-primary {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

/* Navbar styling - already implemented above */
.navbar-brand {
    font-weight: 600;
    color: var(--accent-primary) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--accent-primary) !important;
}

/* Ensure Login link uses custom sizing and hover, overriding generic nav-link */
.navbar .nav-link.auth-login-link {
    padding: 8px 14px !important;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 8px;
    display: inline-block;
}

.navbar .nav-link.auth-login-link:hover {
    background-color: #E9EDF2;
    color: #000 !important;
}

.navbar .nav-link.auth-login-link:active {
    background-color: #E3E8EE;
}

/* Report styling */
.category-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.key-takeaway {
    background-color: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--warning);
    border-radius: 0 6px 6px 0;
    padding: 1rem;
}

.key-takeaway strong {
    color: var(--warning);
}

/* Footer styling - already updated in the body section */

/* Navbar styling */
.navbar {
    background-color: var(--bg-surface) !important;
    border-bottom: 1px solid var(--border-default);
    box-shadow: none;
}

/* Sidebar Menu */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 250px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-default);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    z-index: 1030;
    padding-top: 60px;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(108, 93, 211, 0.2);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    color: var(--neocore-primary);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
}

.sidebar.collapsed .sidebar-brand{
    justify-content: center;
}

.sidebar-brand i {
    margin-right: 10px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 0 0.5rem;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: var(--bg-muted);
    color: var(--text-primary);
}

.sidebar-menu a.active {
    border-left: 2px solid var(--accent-primary);
    font-weight: 500;
}

.sidebar-menu i {
    min-width: 1.5rem;
    margin-right: 10px;
    font-size: 1.1rem;
}

.sidebar-menu .menu-text {
    transition: opacity 0.3s ease;
}

/* Dropdown menu in sidebar */
.dropdown-container {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-icon {
    margin-left: 10px;
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.dropdown-container.open .toggle-icon {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    padding-left: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.dropdown-container.open .submenu {
    max-height: 200px;
}

.submenu li a, .submenu li button {
    padding: 0.6rem 1rem 0.6rem 2.3rem;
    opacity: 0.85;
}

.sidebar.collapsed .sidebar-menu .menu-text,
.sidebar.collapsed .sidebar-brand .menu-text,
.sidebar.collapsed .sidebar-toggle span {
    opacity: 0;
    display: none;
}

.sidebar-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: var(--neocore-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1031;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background-color: #5a4ec4;
    transform: scale(1.05);
}

.content-with-sidebar {
    transition: all 0.3s ease;
    margin-left: 250px;
    width: calc(100% - 250px);
}

.content-with-sidebar.expanded {
    margin-left: 70px;
    width: calc(100% - 70px);
}

.sidebar-divider {
    height: 1px;
    background-color: var(--border-default);
    margin: 1rem 0.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin: 1rem 0.5rem;
    background-color: var(--bg-muted);
    border-radius: 6px;
    border: 1px solid var(--border-default);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--neocore-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
}

.user-info {
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.user-name {
    font-weight: 600;
    color: var(--neocore-text-primary);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.8rem;
    color: var(--neocore-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .user-info {
    opacity: 0;
    display: none;
}

/* Adjustments for the top navbar */
body.has-sidebar {
    padding-top: 0;
}

body.has-sidebar .navbar {
    background-color: transparent !important;
    box-shadow: none;
    border-bottom: none;
    margin-left: 250px;
    width: calc(100% - 250px);
    transition: all 0.3s ease;
}

body.has-sidebar .navbar.expanded {
    margin-left: 70px;
    width: calc(100% - 70px);
}

body.has-sidebar .navbar-brand {
    display: none;
}

body.has-sidebar .navbar .navbar-toggler {
    display: none;
}

body.has-sidebar .navbar-collapse {
    display: flex !important;
}

body.has-sidebar .navbar-nav {
    margin-left: auto;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .content-with-sidebar, 
    body.has-sidebar .navbar {
        margin-left: 0;
        width: 100%;
    }
    
    body.has-sidebar .navbar-brand,
    body.has-sidebar .navbar-toggler {
        display: block;
    }
    
    .sidebar-mobile-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1029;
    }
    
    .sidebar-mobile-backdrop.show {
        display: block;
    }
    
    /* Hide desktop collapse FAB on mobile */
    .sidebar-toggle {
        display: none;
    }
    
    /* Solid navbar on mobile when sidebar layout is active */
    body.has-sidebar .navbar {
        background-color: var(--bg-surface) !important;
        border-bottom: 1px solid var(--border-default);
        box-shadow: none;
    }
    
    /* Prevent body scroll when mobile sidebar is open */
    body.sidebar-open {
        overflow: hidden;
        touch-action: none;
    }
}

@media (max-width: 768px) {
    .chart-container {
        height: 250px;
    }
    
    .category-card {
        margin-bottom: 1rem;
    }
    
    .report-header h1 {
        font-size: 1.8rem;
    }
    
    .analysis-points {
        padding-left: 1.25rem;
    }
}

/* Calendar Integration Page styles */
.calendar-grid {
    border: 1px solid var(--border-default);
    border-radius: 0.25rem;
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: var(--bg-muted);
    border-bottom: 1px solid var(--border-default);
}

.calendar-day-header {
    padding: 10px;
    text-align: center;
    font-weight: 600;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    min-height: 600px;
}

.calendar-day {
    border-right: 1px solid var(--border-default);
    border-bottom: 1px solid var(--border-default);
    padding: 8px;
    min-height: 100px;
    position: relative;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day.empty {
    background-color: var(--bg-muted);
}

.calendar-day.today {
    background-color: rgba(59, 130, 246, 0.1);
}

.calendar-date {
    font-weight: 600;
    margin-bottom: 8px;
}

.calendar-day.today .calendar-date {
    color: var(--accent-primary);
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.calendar-events .meeting {
    background-color: #f0f8ff; /* Light blue background */
    border-radius: 8px; /* Rounded corners */
    padding: 10px; /* Padding for spacing */
    margin-bottom: 5px; /* Space between meetings */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    transition: background-color 0.3s, transform 0.2s; /* Smooth transition for hover and click effects */
    cursor: pointer; /* Pointer cursor to indicate clickability */
}

.calendar-events .meeting:hover {
    background-color: #e0f0ff; /* Slightly darker blue on hover */
    transform: translateY(-2px); /* Lift effect on hover */
}

.calendar-events .meeting:active {
    background-color: #d0e8ff; /* Even darker blue on click */
    transform: translateY(0); /* Reset lift effect on click */
}

.calendar-event {
    background-color: var(--accent-primary);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.calendar-event.google {
    background-color: #4285F4;
}

.calendar-event.outlook {
    background-color: #0078D4;
}

/* Meeting cards */
.meeting-card {
    transition: transform 0.2s;
}

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

/* Framework form styles */
.framework-form {
    transition: opacity 0.3s;
}

.framework-form.d-none {
    opacity: 0;
}

.framework-form:not(.d-none) {
    opacity: 1;
}

/* Workspace Display Styles */
.current-workspace-display {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: var(--bg-muted);
    border: 1px solid var(--border-default);
}
.workspace-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}
.workspace-name {
    flex-grow: 1;
    font-size: 0.9rem;
}
.current-workspace-display .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}
.current-workspace-display .badge-success {
    background: var(--success);
    color: white;
}
.current-workspace-display .badge-info {
    background: var(--accent-primary);
    color: white;
}
.submenu a.active {
    background: var(--bg-muted);
    color: var(--accent-primary);
    font-weight: 600;
}


.calendar-day-view {
    display: flex;
    flex-direction: column;
}

.calendar-day-header {
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.calendar-day {
    border: 1px solid var(--border-default);
    padding: 10px;
    min-height: 100px;
}

.calendar-events {
    margin-top: 10px;
}

.meeting {
    background-color: #f0f8ff;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.meeting:hover {
    background-color: #e0f0ff;
    transform: translateY(-2px);
}

.meeting:active {
    background-color: #d0e8ff;
    transform: translateY(0);
}


.more-meetings{
    font-weight: bold;
    cursor: pointer;
}


.container-footer{
    padding: 20px;
    background-color: var(--bg-surface);
}


.salesman-upload-file-type-card{
    border: 1px #0d6efd solid;
}

.salesman-text-analysis-recommended-characters,
.salesman-url-analysis-recommended-characters{
    color: #ffffff !important;
}



.tooltip-inner {
    color: white; /* Set the text color to white */
    background-color: black; /* Optional: Set the background color to black for contrast */
}

/* Ensure the page uses the full viewport height and the content fills the remaining space
   while accounting for the fixed top navbar. */
html, body { height: 100%; }
:root { --navbar-height: 70px; }
body { display: flex; min-height: 100vh; flex-direction: column; padding-top: var(--navbar-height); }
main.container { flex: 1 0 auto; min-height: calc(100vh - var(--navbar-height));  }
footer { margin-top: auto; }

/* Auth pages responsive layout - custom CSS */
.auth-page {
  padding-left: 16px;
  padding-right: 16px;
  margin-top: 3rem;
}

.login-form{
    margin-bottom: 3rem;
}

.auth-card {
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .auth-card {
    max-width: 600px;
  }
}

@media (min-width: 992px) {
  .auth-page--wide .auth-card {
    max-width: 840px;
  }
}

@media (max-width: 360px) {
  .auth-page {
    padding-left: 12px;
    padding-right: 12px;
    margin-top: 2rem;
  }
}

/* Fine-tuned responsive typography and spacing for auth pages */
.auth-card .card-header h3 {
  font-size: 1.5rem;
  line-height: 1.2;
}

.auth-card .card-body {
  padding: 1.25rem;
}

.auth-card .form-label {
  font-size: 0.95rem;
}

.auth-card .form-control,
.auth-card .form-select,
.auth-card input,
.auth-card textarea {
  font-size: 0.95rem;
  padding: 10px 12px;
}

.auth-card .btn {
  font-size: 0.95rem;
  padding: 10px 16px;
}

.auth-card .alert {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.auth-card .helper-text,
.auth-card .form-text,
.auth-card small {
  font-size: 0.9rem;
}

/* Scale down on small tablets/large phones */
@media (max-width: 768px) {
  .auth-page { margin-top: 2.5rem; }
  .auth-card .card-header h3 { font-size: 1.35rem; }
  .auth-card .card-body { padding: 1.125rem; }
  .auth-card .form-label { font-size: 0.9rem; }
  .auth-card .form-control,
  .auth-card .form-select,
  .auth-card input,
  .auth-card textarea { font-size: 0.9rem; padding: 9px 12px; }
  .auth-card .btn { font-size: 0.9rem; padding: 9px 14px; }
  .auth-card .alert { font-size: 0.82rem; padding: 6px 10px; }
  .auth-card .helper-text,
  .auth-card .form-text,
  .auth-card small { font-size: 0.88rem; }
}

/* Compact on narrow phones */
@media (max-width: 576px) {
  .auth-page { margin-top: 2rem; }
  .auth-card .card-header h3 { font-size: 1.25rem; }
  .auth-card .card-body { padding: 1rem; }
  .auth-card .form-label { font-size: 0.88rem; }
  .auth-card .form-control,
  .auth-card .form-select,
  .auth-card input,
  .auth-card textarea { font-size: 0.875rem; padding: 8px 10px; }
  .auth-card .btn { font-size: 0.875rem; padding: 8px 12px; }
  .auth-card .alert { font-size: 0.8rem; padding: 5px 8px; }
  .auth-card .helper-text,
  .auth-card .form-text,
  .auth-card small { font-size: 0.85rem; }
}