/* ===================================
   Sketch Builder - Modern Theme
   Inspired by modern project management UIs
   =================================== */

:root {
    /* Modern Color Palette */
    --bs-body-bg: #f6f8fa;
    --bs-primary: #5e6ad2;
    --bs-primary-rgb: 94, 106, 210;

    /* Status Colors - Vibrant & Modern */
    --status-success: #00c875;
    --status-success-light: #e6f7ef;
    --status-danger: #e2445c;
    --status-danger-light: #fde8ec;
    --status-warning: #fdab3d;
    --status-warning-light: #fff4e6;
    --status-info: #579bfc;
    --status-info-light: #e8f2ff;
    --status-purple: #a25ddc;
    --status-purple-light: #f3ebfa;

    /* Neutral Colors */
    --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;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-pill: 100px;
}

/* ===================================
   Global Styles
   =================================== */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--gray-800);
    background-color: var(--bs-body-bg);
    line-height: 1.6;
}

/* Make the layout wrapper full height */
.layout-wrapper {
    min-height: calc(100vh - 56px); /* Subtract navbar height */
}

.main-content {
    flex: 1;
}

/* Add extra padding to main content container */
.main-content .container-fluid {
    padding-left: calc(var(--bs-gutter-x, 0.75rem) + 10px);
    padding-right: calc(var(--bs-gutter-x, 0.75rem) + 10px);
    padding-top: calc(1.5rem + 10px);
    padding-bottom: calc(1.5rem + 10px);
}

/* ===================================
   Typography
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--gray-900);
}

.h3 {
    font-weight: 600;
}

/* Increase page title size by 15% */
.main-content h1.h3 {
    font-size: 2.01rem; /* 1.75rem * 1.15 = 2.0125rem */
}

/* Ensure white text in headers stays white */
.text-white h1,
.text-white h2,
.text-white h3,
.text-white h4,
.text-white h5,
.text-white h6 {
    color: white !important;
}

/* ===================================
   Navigation
   =================================== */

.navbar {
    background-color: #222021 !important;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.575rem; /* 0.5rem * 1.15 = 0.575rem */
    padding-bottom: 0.575rem;
    padding-left: calc(1rem + 5px);
    padding-right: calc(1rem + 5px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4375rem; /* 1.25rem * 1.15 = 1.4375rem */
}

/* ===================================
   Cards
   =================================== */

.card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

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

.card-header {
    background-color: #fff;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

/* ===================================
   Badges & Status Pills
   =================================== */

.badge {
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

/* Status Badge Variants - Vibrant Colors */
.badge.bg-success {
    background-color: var(--status-success) !important;
    color: white;
}

.badge.bg-danger {
    background-color: var(--status-danger) !important;
    color: white;
}

.badge.bg-warning {
    background-color: var(--status-warning) !important;
    color: white;
}

.badge.bg-info {
    background-color: var(--status-info) !important;
    color: white;
}

.badge.bg-primary {
    background-color: var(--bs-primary) !important;
    color: white;
}

.badge.bg-secondary {
    background-color: var(--gray-500) !important;
    color: white;
}

/* Status Badge Light Variants */
.badge-success-light {
    background-color: var(--status-success-light) !important;
    color: var(--status-success) !important;
    font-weight: 600;
}

.badge-danger-light {
    background-color: var(--status-danger-light) !important;
    color: var(--status-danger) !important;
    font-weight: 600;
}

.badge-warning-light {
    background-color: var(--status-warning-light) !important;
    color: var(--status-warning) !important;
    font-weight: 600;
}

.badge-info-light {
    background-color: var(--status-info-light) !important;
    color: var(--status-info) !important;
    font-weight: 600;
}

.badge-purple {
    background-color: var(--status-purple) !important;
    color: white;
}

.badge-purple-light {
    background-color: var(--status-purple-light) !important;
    color: var(--status-purple) !important;
    font-weight: 600;
}

/* ===================================
   Buttons
   =================================== */

.btn {
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background-color: #4c5bc4;
    border-color: #4c5bc4;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(94, 106, 210, 0.3);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-group {
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

/* ===================================
   Forms
   =================================== */

.form-control,
.form-select {
    border-radius: var(--radius-md);
    border-color: var(--gray-300);
    padding: 0.625rem 0.875rem;
    background-color: white;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.1);
    background-color: white;
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* ===================================
   Tables & Lists
   =================================== */

.table {
    border-color: var(--gray-200);
}

.table thead th {
    background-color: var(--gray-50);
    border-bottom: 2px solid var(--gray-300);
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 0.875rem;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

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

.list-group-item {
    border-color: var(--gray-200);
    border-radius: var(--radius-md) !important;
    margin-bottom: 0.5rem;
}

.list-group-flush .list-group-item {
    margin-bottom: 0;
    border-radius: 0 !important;
}

/* ===================================
   Alerts
   =================================== */

.alert {
    border-radius: var(--radius-lg);
    border: none;
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.alert-success {
    background-color: var(--status-success-light);
    color: var(--status-success);
}

.alert-danger {
    background-color: var(--status-danger-light);
    color: var(--status-danger);
}

.alert-warning {
    background-color: var(--status-warning-light);
    color: var(--status-warning);
}

.alert-info {
    background-color: var(--status-info-light);
    color: var(--status-info);
}

/* ===================================
   Modals
   =================================== */

.modal-content {
    border-radius: var(--radius-xl);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
}

/* ===================================
   Breadcrumbs
   =================================== */

.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: var(--gray-600);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--bs-primary);
}

.breadcrumb-item.active {
    color: var(--gray-900);
    font-weight: 500;
}

/* ===================================
   Utilities
   =================================== */

.text-muted {
    color: var(--gray-500) !important;
}

.bg-light {
    background-color: var(--gray-50) !important;
}

.border {
    border-color: var(--gray-200) !important;
}

.rounded {
    border-radius: var(--radius-md) !important;
}

.rounded-lg {
    border-radius: var(--radius-lg) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

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

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* ===================================
   Custom Components
   =================================== */

/* Status Pills with Gradients (like in screenshot) */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
}

.status-pill-success {
    background: linear-gradient(135deg, #00c875 0%, #00b461 100%);
    color: white;
}

.status-pill-danger {
    background: linear-gradient(135deg, #e2445c 0%, #d63850 100%);
    color: white;
}

.status-pill-warning {
    background: linear-gradient(135deg, #fdab3d 0%, #fc9a26 100%);
    color: white;
}

.status-pill-purple {
    background: linear-gradient(135deg, #a25ddc 0%, #9349ce 100%);
    color: white;
}

.status-pill-info {
    background: linear-gradient(135deg, #579bfc 0%, #4189f0 100%);
    color: white;
}

/* Hover Effects */
.card-hover {
    transition: all 0.2s ease;
}

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

/* Avatar Circles */
.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bs-primary);
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.avatar-sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
}

.avatar-lg {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
}

/* ===================================
   Responsive
   =================================== */

@media (max-width: 767.98px) {
    .mobile-friendly {
        font-size: 1.1rem;
        padding: 0.75rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    h1, .h3 {
        font-size: 1.5rem;
    }
}

/* ===================================
   Sidebar (Slack-style)
   =================================== */

.sidebar {
    width: 240px;
    min-height: 100%;
    background-color: #3f0e40 !important;
    position: relative;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-logout {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-button {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7) !important;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
}

.logout-button:hover {
    background-color: rgba(255, 67, 54, 0.15);
    border-color: rgba(255, 67, 54, 0.3);
    color: rgba(255, 255, 255, 0.95) !important;
}

.sidebar-heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.75rem;
    padding: 0 0.5rem;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-link {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7) !important;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95) !important;
}

.sidebar-link i {
    font-size: 1.125rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar-link.active {
    background-color: #1264a3;
    color: white !important;
}

/* Scrollbar styling for sidebar */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main content with sidebar */
.main-content {
    background-color: var(--bs-body-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Main content without sidebar (login page) */
.main-content:not(.flex-grow-1) {
    margin-left: 0;
}

/* Responsive sidebar */
@media (max-width: 991.98px) {
    .sidebar {
        width: 200px;
    }
}

@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        left: -240px;
        transition: left 0.3s ease;
        z-index: 1050;
    }

    .sidebar.show {
        left: 0;
    }

    .main-content {
        width: 100%;
    }
}

/* ===================================
   Agenda Personnel Autocomplete
   =================================== */

#agenda-personnel-results {
    width: calc(100% - 2rem);
    max-width: 400px;
    margin-top: 0.25rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
}

#agenda-personnel-results .list-group-item {
    cursor: pointer;
    border: none;
    border-bottom: 1px solid var(--gray-100);
}

#agenda-personnel-results .list-group-item:last-child {
    border-bottom: none;
}

#agenda-personnel-results .list-group-item:hover {
    background-color: var(--gray-50);
}

#agenda-selected-personnel {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background-color: var(--gray-50);
    min-height: 50px;
}

#agenda-selected-personnel:empty::before {
    content: "No personnel selected";
    color: var(--gray-400);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

#agenda-selected-personnel .badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
}

#agenda-selected-personnel .btn-close {
    padding: 0;
    margin-left: 0.375rem;
    opacity: 0.7;
}

#agenda-selected-personnel .btn-close:hover {
    opacity: 1;
}

/* ===================================
   Dark Mode Support (Optional)
   =================================== */

@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}
