/* Custom Stylesheet for Digital Media Pre-Sales CRM Platform */

/* General Styles */
body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fb;
    color: #333;
}

.container {
    max-width: 1280px;
}

/* Navbar Customization */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    color: #2c3e50 !important;
}

/* Card Styling */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    border: none;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease-in-out;
}

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

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

/* Status Badges */
.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
    font-size: 0.825rem;
}

/* Status Colors */
.bg-draft {
    background-color: #6c757d;
}

.bg-pending {
    background-color: #fd7e14;
}

.bg-approved {
    background-color: #198754;
}

.bg-rejected {
    background-color: #dc3545;
}

.bg-completed {
    background-color: #0dcaf0;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-sm.btn-info {
    padding: 0.5em 0.75em;
    font-size: 0.825rem;
    font-weight: 500;
    line-height: 1;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
}

/* Tables */
.table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: #f1f4f9;
}

/* Custom Dashboard Cards */
.dashboard-stat-card {
    transition: all 0.3s ease;
}

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

/* Form Elements */
.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
}

/* Flash Messages */
.alert {
    border-radius: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Comments Styling */
.comment-card {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    border-left: 3px solid #0d6efd;
}

.comment-header {
    margin-bottom: 0.5rem;
}

/* Timeline Styling for Activities */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-marker {
    position: absolute;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    left: -30px;
    top: 5px;
    background-color: #0d6efd;
}

.timeline-content {
    position: relative;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.timeline-title {
    margin-bottom: 5px;
    font-size: 1rem;
}

.timeline-title small {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
}

/* Custom Animation for Badges */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.badge.bg-pending {
    animation: pulse 2s infinite;
}

/* Footer Styling */
.footer {
    background-color: #fff;
    padding: 1rem 0;
    border-top: 1px solid #e9ecef;
    margin-top: 2rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card-header {
        padding: 0.75rem;
    }
    
    .dashboard-stat-card h3 {
        font-size: 1.5rem;
    }
}

/* Custom Modal Styling */
.modal-content {
    border-radius: 0.5rem;
    border: none;
}

.modal-header {
    border-radius: 0.5rem 0.5rem 0 0;
}

/* Login and Register Form */
.auth-form-container {
    max-width: 400px;
    margin: 0 auto;
}

.auth-form {
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    background-color: #fff;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* Utility Classes */
.text-muted {
    color: #6c757d !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* Custom Admin Button */
.admin-overview-btn {
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.admin-overview-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.admin-overview-btn::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 8px;
    height: 8px;
    background-color: #d9534f;
    border-radius: 50%;
}

/* Kanban Board Styles */
.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    min-height: 600px;
    padding: 1rem 0;
}

.kanban-column {
    flex: 1;
    min-width: 280px;
    max-width: 320px;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dee2e6;
}

.kanban-column-title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.kanban-column-count {
    background-color: #6c757d;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.kanban-cards {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.kanban-card {
    background: white;
    border-radius: 0.375rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    cursor: grab;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
    transform: translateY(-1px);
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    cursor: grabbing;
}

.kanban-card-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.kanban-card-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #212529;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.kanban-card-title a {
    text-decoration: none;
    color: inherit;
}

.kanban-card-title a:hover {
    text-decoration: underline;
    color: #007bff;
}

.kanban-card-client {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.kanban-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.kanban-card-probability {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.kanban-card-probability-bar {
    width: 40px;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.kanban-card-probability-fill {
    height: 100%;
    background-color: #28a745;
    transition: width 0.3s ease;
}

.kanban-card-value {
    font-weight: 600;
    color: #28a745;
}

.kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f3f4;
    font-size: 0.75rem;
    color: #6c757d;
}

.kanban-card-owner {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.kanban-card-actions {
    display: flex;
    gap: 0.25rem;
}

.kanban-card-actions .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    border-radius: 0.25rem;
}

/* Column-specific styling */
.kanban-column[data-status="Draft"] .kanban-column-header {
    border-bottom-color: #6c757d;
}

.kanban-column[data-status="Draft"] .kanban-column-count {
    background-color: #6c757d;
}

.kanban-column[data-status="Review"] .kanban-column-header {
    border-bottom-color: #17a2b8;
}

.kanban-column[data-status="Review"] .kanban-column-count {
    background-color: #17a2b8;
}

.kanban-column[data-status="Revision"] .kanban-column-header {
    border-bottom-color: #ffc107;
}

.kanban-column[data-status="Revision"] .kanban-column-count {
    background-color: #ffc107;
    color: #212529;
}

.kanban-column[data-status="Won"] .kanban-column-header {
    border-bottom-color: #28a745;
}

.kanban-column[data-status="Won"] .kanban-column-count {
    background-color: #28a745;
}

.kanban-column[data-status="Lost"] .kanban-column-header {
    border-bottom-color: #dc3545;
}

.kanban-column[data-status="Lost"] .kanban-column-count {
    background-color: #dc3545;
}

/* Drag and drop states */
.kanban-column.drag-over {
    background-color: #e3f2fd;
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.sortable-ghost {
    opacity: 0.4;
    background-color: #f8f9fa !important;
    border: 2px dashed #dee2e6 !important;
}

.sortable-chosen {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
    transform: rotate(2deg) !important;
}

/* Empty state */
.kanban-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    border: 2px dashed #dee2e6;
    border-radius: 0.375rem;
    color: #6c757d;
    font-style: italic;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .kanban-column {
        min-width: 250px;
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    .kanban-board {
        flex-direction: column;
        overflow-x: visible;
    }
    
    .kanban-column {
        min-width: 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    .kanban-cards {
        min-height: auto;
    }
}

/* View Toggle Buttons */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.view-toggle .btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Print Styles */
@media print {
    .btn, .navbar, .footer, form {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
    
    body {
        background-color: #fff !important;
    }
    
    .kanban-board {
        display: block !important;
    }
    
    .kanban-column {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}

/* Modern Sidebar UI - Media CRM Platform */

/* Base Variables */
:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --sidebar-width: 238px;
  --sidebar-collapsed-width: 67px;
  --header-height: 57px;
  --sidebar-bg: #fff;
  --body-bg: #f5f7fb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
  --card-hover-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  --transition-speed: 0.3s;
  --font-size-base: 0.95rem;
  --font-size-sm: 0.86rem;
  --font-size-lg: 1.07rem;
}

/* General Styles */
body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--body-bg);
  color: var(--text-primary);
  margin: 0;
  display: flex;
  min-height: 100vh;
  font-size: var(--font-size-base);
}

/* Sidebar Styles */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  border-right: 1px solid var(--border-color);
  z-index: 1000;
  transition: width var(--transition-speed) ease-in-out;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
}

.brand-logo {
  width: 40px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 11px;
}

.logo-img {
  width: 100%;
  height: auto;
  max-width: 40px;
}

.brand-text {
  font-weight: 600;
  font-size: 1.07rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
}

.env-badge {
  font-size: 9px;
  padding: 2px 6px;
  margin-left: 5px;
  vertical-align: top;
  border-radius: 4px;
}

.env-dev {
  background-color: #22c55e;
  color: white;
}

.env-prod {
  background-color: #ef4444;
  color: white;
}

/* Navigation */
.sidebar-nav {
  padding: 0.95rem 0;
  flex-grow: 1;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 0.48rem;
}

.nav-section-title {
  color: var(--text-secondary);
  font-size: 0.71rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.71rem 1.4rem 0.48rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.71rem 1.4rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-speed) ease;
  border-left: 3px solid transparent;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
  background-color: rgba(59, 130, 246, 0.05);
}

.nav-link.active {
  border-left-color: var(--primary-color);
}

.nav-icon {
  margin-right: 11px;
  width: 19px;
  text-align: center;
}

.nav-text {
  white-space: nowrap;
  overflow: hidden;
}

/* Badges for notifications */
.badge {
  padding: 0.24em 0.48em;
  font-size: 0.71rem;
  font-weight: 600;
  border-radius: 9999px;
  margin-left: auto;
}

.badge-danger {
  background-color: #ef4444;
  color: white;
}

/* User section at bottom */
.sidebar-user {
  padding: 0.95rem 1.4rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  color: var(--text-primary);
  margin-right: 9px;
}

.user-info {
  overflow: hidden;
}

.user-name {
  font-weight: 500;
  font-size: var(--font-size-base);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.71rem;
  color: var(--text-secondary);
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: margin-left var(--transition-speed) ease-in-out;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 1.4rem;
  background-color: white;
}

.header-title {
  font-size: 1.19rem;
  font-weight: 500;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.search-box {
  padding: 0.48rem 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  outline: none;
  width: 238px;
  transition: all var(--transition-speed) ease;
}

.search-box:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.content {
  padding: 1.4rem;
  flex-grow: 1;
}

/* Card Styling */
.card {
  background-color: white;
  border-radius: 0.48rem;
  box-shadow: var(--card-shadow);
  border: none;
  margin-bottom: 1.4rem;
  transition: all var(--transition-speed) ease;
}

.card:hover {
  box-shadow: var(--card-hover-shadow);
}

.card-header {
  padding: 0.95rem 1.19rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  border-radius: 0.48rem 0.48rem 0 0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body {
  padding: 1.19rem;
}

/* Tables */
.table {
  width: 100%;
  margin-bottom: 1rem;
  color: var(--text-primary);
  border-collapse: collapse;
}

.table th {
  padding: 0.71rem;
  font-weight: 600;
  font-size: var(--font-size-base);
  text-align: left;
  border-bottom: 2px solid var(--border-color);
}

.table td {
  padding: 0.71rem;
  font-size: var(--font-size-base);
  vertical-align: middle;
  border-top: 1px solid var(--border-color);
}

.table-hover tbody tr:hover {
  background-color: rgba(245, 247, 251, 0.7);
}

/* Sortable Tables */
th.sortable {
  cursor: pointer;
  position: relative;
  padding-right: 1.5rem;
}

th.sortable:hover {
  background-color: rgba(245, 247, 251, 0.9);
}

th.sortable:after {
  content: '↕️';
  font-size: 0.8rem;
  position: absolute;
  right: 0.5rem;
  opacity: 0.3;
}

th.sortable.sort-asc:after {
  content: '↑';
  opacity: 1;
}

th.sortable.sort-desc:after {
  content: '↓';
  opacity: 1;
}

/* Status Badges */
.status-badge {
  padding: 0.33em 0.62em;
  font-size: 0.71rem;
  font-weight: 600;
  border-radius: 9999px;
  display: inline-block;
}

.status-draft {
  background-color: #e5e7eb;
  color: #374151;
}

.status-pending {
  background-color: #fbbf24;
  color: #92400e;
}

.status-approved {
  background-color: #34d399;
  color: #065f46;
}

.status-rejected {
  background-color: #ef4444;
  color: #7f1d1d;
}

.status-completed {
  background-color: #60a5fa;
  color: #1e40af;
}

/* Buttons */
.btn {
  padding: 0.48rem 0.95rem;
  border-radius: 0.36rem;
  font-weight: 500;
  transition: all var(--transition-speed) ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: var(--font-size-base);
}

.btn-primary {
  background-color: var(--primary-color);
  border: 1px solid var(--primary-color);
  color: white;
}

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

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background-color: #f3f4f6;
}

.btn-icon {
  margin-right: 0.48rem;
}

/* Detail Group styling */
.detail-group {
  margin-bottom: 0.95rem;
}

.detail-label {
  font-size: 0.83rem;
  color: var(--text-secondary);
  margin-bottom: 0.24rem;
}

.detail-value {
  font-weight: 500;
  font-size: var(--font-size-base);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sidebar {
    width: var(--sidebar-collapsed-width);
  }
  
  .brand-text, .nav-text, .user-info {
    display: none;
  }
  
  .nav-link {
    justify-content: center;
    padding: 0.71rem;
  }
  
  .nav-icon {
    margin-right: 0;
  }
  
  .main-content {
    margin-left: var(--sidebar-collapsed-width);
  }
  
  .sidebar-user {
    justify-content: center;
    padding: 0.95rem;
  }
  
  .user-avatar {
    margin-right: 0;
  }
}

/* Utility classes */
.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.d-flex {
  display: flex;
}

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

.align-items-center {
  align-items: center;
}

.flex-column {
  flex-direction: column;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

/* Value displays for metrics */
.value-display {
  margin-bottom: 0.5rem;
}

.value-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.125rem;
}

.value-content {
  font-weight: 600;
}

/* Progress bars */
.progress {
  height: 0.5rem;
  background-color: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary-color);
}

/* Footer styling */
.footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* =============================================
   MODERN DEALS PAGE IMPROVEMENTS
   ============================================= */

/* Page Header Enhancements */
.page-header-content {
    padding: 0.5rem 0;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 1rem;
    color: #718096;
    margin-top: 0.25rem;
}

/* Modern Search Form */
.search-form .form-control,
.search-form .form-select {
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.search-form .form-control:focus,
.search-form .form-select:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
    background-color: white;
}

/* Modern Table Styling */
.modern-table {
    border: none;
}

.modern-table thead th {
    background-color: #f8fafc;
    border: none;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: #4a5568;
}

.modern-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.modern-table tbody tr:hover {
    background-color: #f7fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.modern-table tbody tr:last-child {
    border-bottom: none;
}

/* Deal Name Cell */
.deal-name-cell h6 a {
    transition: color 0.2s ease;
}

.deal-name-cell h6 a:hover {
    color: #3182ce !important;
}

/* Client Cell */
.client-cell a {
    transition: color 0.2s ease;
}

.client-cell a:hover {
    color: #3182ce !important;
}

/* Hover Effects */
.hover-primary:hover {
    color: #3182ce !important;
}

/* Enhanced Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    border-radius: 0.375rem;
}

.badge.rounded-pill {
    border-radius: 50rem !important;
}

/* Progress Bar Enhancements */
.progress {
    background-color: #e2e8f0;
    border-radius: 0.25rem;
}

.progress-bar {
    border-radius: 0.25rem;
    transition: width 0.3s ease;
}

/* Button Enhancements */
.btn {
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 0.375rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3182ce 0%, #2c5aa0 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(49, 130, 206, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2c5aa0 0%, #2a4f8c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(49, 130, 206, 0.3);
}

.btn-outline-primary {
    border: 1px solid #e2e8f0;
    color: #4a5568;
    background: white;
}

.btn-outline-primary:hover {
    background: #3182ce;
    border-color: #3182ce;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(49, 130, 206, 0.2);
}

.btn-outline-secondary {
    border: 1px solid #e2e8f0;
    color: #718096;
    background: white;
}

.btn-outline-secondary:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #4a5568;
}

.btn-outline-success {
    border: 1px solid #e2e8f0;
    color: #38a169;
    background: white;
}

.btn-outline-success:hover {
    background: #38a169;
    border-color: #38a169;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(56, 161, 105, 0.2);
}

/* Button Group Improvements */
.btn-group .btn {
    margin: 0 2px;
}

/* Card Enhancements */
.card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.card.border-0 {
    border: none;
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

/* Empty State Styling */
.empty-state {
    padding: 4rem 2rem;
}

.empty-state-icon {
    margin-bottom: 1.5rem;
}

.empty-state h4 {
    font-weight: 600;
    color: #4a5568;
}

.empty-state .lead {
    font-size: 1.1rem;
    color: #718096;
}

/* Form Control Improvements */
.form-control,
.form-select {
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Icon Enhancements */
.fas, .far {
    font-size: 0.875rem;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .modern-table {
        font-size: 0.8rem;
    }
    
    .modern-table th,
    .modern-table td {
        padding: 0.5rem;
    }
    
    .search-form .col-lg-5,
    .search-form .col-lg-3,
    .search-form .col-lg-1 {
        margin-bottom: 1rem;
    }
}

/* Animation for Loading States */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.modern-table tbody tr {
    animation: fadeIn 0.3s ease;
}

/* Print styles */
@media print {
    .sidebar, .header, .footer {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
 .content {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

input[type="number"] {
  -moz-appearance: textfield;  /* Removes spinner in Firefox */
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: inner-spin-button;
  opacity: 1;
} 

.objective-chip {
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 400;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  font-size: 0.90rem;
}

.objective-chip.selected {
  outline: 3px solid white;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px black;
}

.chip-checkmark {
  position: absolute;
  top: -5px;
  right: -5px;
  background: white;
  color: green;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border: 1px solid #ccc;
}

.objective-chip.selected .chip-checkmark {
  display: flex;
  opacity: 1;
}

/* Product list modal styles */
.product-item {
    transition: all 0.2s ease;
    border: 1px solid #dee2e6 !important;
}

.product-item:hover {
    background-color: #f8f9fa !important;
    border-color: #86b7fe !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-item.border-primary {
    border-color: #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.product-item.bg-primary-subtle {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.hover-bg-light:hover {
    background-color: #f8f9fa !important;
}

/* Filter options styling */
#filterOptions .card-body {
    padding: 1rem;
}

#filterOptions .form-select-sm {
    font-size: 0.875rem;
}

#filterOptions .form-label {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

/* Product list container */
#product_list {
    min-height: 200px;
}

#product_list:empty::after {
    content: "Loading products...";
    display: block;
    text-align: center;
    color: #6c757d;
    padding: 2rem;
    font-style: italic;
}

/* Product count styling */
#product_count {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Group headers in product list */
.text-primary.fw-bold {
    color: #0d6efd !important;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Form switches for grouping */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-label.small {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Modal dialog sizing */
.modal-lg {
    max-width: 900px;
}

/* Product details card styling */
#product-details-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

#product-details-card .table-sm td,
#product-details-card .table-sm th {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Cursor pointer for clickable elements */
.cursor-pointer {
    cursor: pointer !important;
}

/* =============================================
   FLOATING SUMMARY WIDGET STYLES
   ============================================= */

/* Floating Summary Container */
.floating-summary {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1045; /* Above modals but below modal backdrops */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Roboto', sans-serif;
}

/* Minimized State - Just the toggle button */
.floating-summary.minimized {
    width: 56px;
    height: 56px;
}

/* Expanded State - Horizontal layout with dynamic width */
.floating-summary.expanded {
    width: var(--dynamic-width, 980px);
    max-width: 95vw;
    height: 120px;
    min-height: 120px;
    max-height: 120px;
}

/* Toggle Button */
.floating-summary-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-summary-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

.floating-summary-toggle:active {
    transform: scale(0.95);
}

/* Toggle Icon Animation */
.floating-summary-toggle .fa-chart-bar {
    transition: transform 0.3s ease;
}

.floating-summary.expanded .floating-summary-toggle .fa-chart-bar {
    transform: rotate(90deg);
}

/* Widget Content */
.floating-summary-content {
    position: absolute;
    top: 0;
    right: 0;
    width: var(--dynamic-width, 980px);
    max-width: 95vw;
    height: 120px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    overflow: hidden;
}

.floating-summary.expanded .floating-summary-content {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

/* Widget Header */
.floating-summary-header {
    padding: 8px 16px 6px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px 12px 0 0;
    position: relative;
    height: 36px;
}

.floating-summary-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    padding-right: 30px;
}

.floating-summary-close {
    position: absolute;
    top: 6px;
    right: 12px;
    background: none;
    border: none;
    font-size: 14px;
    color: #6c757d;
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.floating-summary-close:hover {
    background: #e9ecef;
    color: #495057;
}

/* Widget Body */
.floating-summary-body {
    padding: 8px 16px;
    height: 84px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* Compact Summary Items - Horizontal layout */
.floating-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 6px;
    border-right: 1px solid #e9ecef;
    font-size: 11px;
    min-width: 120px;
    max-width: 160px;
    flex: 1 1 auto;
    flex-shrink: 1;
    overflow: hidden;
}

.floating-summary-item:last-child {
    border-right: none;
}

.floating-summary-label {
    color: #6c757d;
    font-weight: 500;
    font-size: 10px;
    margin-bottom: 2px;
    text-align: center;
    word-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
}

.floating-summary-value {
    color: #2c3e50;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    word-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
}

/* Special highlighting for key metrics */
.floating-summary-item.total-budget .floating-summary-value {
    color: #0d6efd;
    font-size: 13px;
    font-weight: 700;
}

.floating-summary-item.line-items-total .floating-summary-value {
    color: #198754;
    font-size: 13px;
    font-weight: 700;
}

.floating-summary-item.total-margin .floating-summary-value {
    font-size: 13px;
    font-weight: 700;
}

.floating-summary-item.total-margin.good .floating-summary-value {
    color: #198754;
}

.floating-summary-item.total-margin.okay .floating-summary-value {
    color: #fd7e14;
}

.floating-summary-item.total-margin.low .floating-summary-value {
    color: #dc3545;
}

/* Removed budget status indicator to make room for horizontal layout */

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .floating-summary {
        bottom: 15px;
        right: 15px;
    }
    
    .floating-summary.expanded {
        width: 95vw;
        height: 160px;
        min-height: 160px;
        max-height: 160px;
    }
    
    .floating-summary-content {
        width: 95vw;
        height: 160px;
    }
    
    .floating-summary-header {
        padding: 6px 12px 4px;
        height: 30px;
    }
    
    .floating-summary-body {
        padding: 6px 12px;
        height: 130px;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .floating-summary-item {
        min-width: 85px;
        font-size: 10px;
        padding: 3px 4px;
        flex: 0 1 calc(33.333% - 4px);
    }
    
    .floating-summary-label {
        font-size: 9px;
    }
    
    .floating-summary-value {
        font-size: 11px;
    }
}

/* Accessibility improvements */
.floating-summary-toggle:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.floating-summary-close:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 1px;
}

/* Print media - hide floating widget */
@media print {
    .floating-summary {
        display: none !important;
    }
}
/* My Work Toggle Styles */
.form-switch .form-check-input {
    width: 2rem;
    height: 1rem;
}

.form-switch .form-check-label {
    font-weight: 500;
    transition: color 0.15s ease-in-out;
    margin-left: 0.5rem;
}

.form-switch .form-check-input:checked + .form-check-label {
    color: #0d6efd;
}

.form-switch .form-check-input:not(:checked) + .form-check-label {
    color: #6c757d;
}
