
:root {
    --sidebar-width: 260px;
    --header-height: 56px;
    --primary-color: #0079bf;
    --board-bg: #0079bf;
}

* { font-family: 'Inter', sans-serif; }

body {
    background-color: #f4f5f7;
    overflow-x: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: #fff;
    border-right: 1px solid #e2e4e9;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e4e9;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav {
    padding: 0.75rem 0;
}

.sidebar-nav .nav-link {
    padding: 0.625rem 1.25rem;
    color: #5e6c84;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0;
    transition: all 0.2s;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: #e4f0f6;
    color: var(--primary-color);
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.top-navbar {
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid #e2e4e9;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
}

.content-wrapper {
    padding: 1.5rem;
}

.board-container {
    background: var(--board-bg);
    min-height: calc(100vh - var(--header-height));
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 1rem;
}

.board-list {
    display: inline-block;
    vertical-align: top;
    width: 280px;
    background: #ebecf0;
    border-radius: 12px;
    margin-right: 12px;
    max-height: calc(100vh - var(--header-height) - 2rem);
    overflow-y: auto;
}

.board-list-header {
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #172b4d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.board-list-content {
    padding: 0 0.5rem 0.5rem;
    min-height: 50px;
}

.card-item {
    background: #fff;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    white-space: normal;
}

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

.card-cover {
    height: 120px;
    border-radius: 6px 6px 0 0;
    margin: -0.75rem -0.75rem 0.5rem;
    background-size: cover;
    background-position: center;
}

.card-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 0.5rem;
}

.card-label-text {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
}

.card-badges {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #5e6c84;
}

.card-badges i {
    margin-right: 3px;
}

.card-members {
    display: flex;
    margin-left: auto;
}

.card-members .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: -6px;
    border: 2px solid #fff;
}

.modal-card-detail .modal-dialog {
    max-width: 768px;
}

.modal-sidebar {
    width: 200px;
    padding-left: 1rem;
}

.modal-sidebar .btn-sidebar {
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    background: #eaecf0;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #172b4d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-sidebar .btn-sidebar:hover {
    background: #dfe1e6;
}

.checklist-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.checklist-progress-bar {
    flex: 1;
    height: 8px;
    background: #e2e4e9;
    border-radius: 4px;
    overflow: hidden;
}

.checklist-progress-fill {
    height: 100%;
    background: #61bd4f;
    border-radius: 4px;
    transition: width 0.3s ease;
}

[data-bs-theme="dark"] body {
    background-color: #1d2125;
}

[data-bs-theme="dark"] .sidebar {
    background: #161a1d;
    border-color: #2c333a;
}

[data-bs-theme="dark"] .top-navbar {
    background: #161a1d;
    border-color: #2c333a;
}

[data-bs-theme="dark"] .board-list {
    background: #22272b;
}

[data-bs-theme="dark"] .card-item {
    background: #2c333a;
    color: #b6c2cf;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
    }
}

.sortable-ghost {
    opacity: 0.4;
    background: #c9daf8 !important;
}

.sortable-drag {
    cursor: grabbing;
    transform: rotate(3deg);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #bfc4ce;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a5adba;
}
/* Quill Editor File Attachments */
.ql-file-attachment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    margin: 8px 0;
    transition: background 0.2s;
}

.ql-file-attachment:hover {
    background: #e9ecef;
    text-decoration: none;
    color: inherit;
}

.ql-file-attachment .file-icon {
    width: 40px;
    height: 40px;
    background: #0079bf;
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ql-file-attachment .file-info {
    flex: 1;
    min-width: 0;
}

.ql-file-attachment .file-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #172b4d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ql-file-attachment .file-size {
    font-size: 0.75rem;
    color: #6c757d;
}

.ql-file-attachment .file-download {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    border-radius: 6px;
    transition: all 0.2s;
}

.ql-file-attachment .file-download:hover {
    background: #dee2e6;
    color: #495057;
}

/* Video embed in Quill */
.ql-editor .ql-video {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
}

/* Image in Quill */
.ql-editor img {
    max-width: 100%;
    border-radius: 8px;
    margin: 8px 0;
}

/* Custom toolbar buttons */
.ql-file::before {
    content: '📎';
    font-size: 1.1rem;
}
.btn-primary{


            --bs-btn-bg: #002f87 !important;
            --bs-btn-border-color: #002f87 !important;

            --bs-btn-hover-bg: #002f87 !important;
            --bs-btn-hover-border-color: #002f87 !important;

            --bs-btn-active-bg: #002f87 !important;
            --bs-btn-active-border-color: #002f87 !important;


            --bs-btn-disabled-bg: #002f87 !important;
            --bs-btn-disabled-border-color: #002f87 !important;

}


.btn-success {

    --bs-btn-bg: #d70b74 !important;
    --bs-btn-border-color: #d70b74 !important;

    --bs-btn-hover-bg: #d70b74 !important;
    --bs-btn-hover-border-color: #d70b74 !important;


    --bs-btn-active-bg: #d70b74 !important;
    --bs-btn-active-border-color: #d70b74 !important;

    --bs-btn-disabled-bg: #d70b74 !important;
    --bs-btn-disabled-border-color: #d70b74 !important;
}
.toggle-password{
cursor: pointer;
    position: absolute;
    top: 50%;
    /*transform: translateY(-50%);*/
    right: 10px;
    color: #7b7b7b;
    }


.workspace-description {
    max-height: 400px;
    overflow-y: auto;
}
.workspace-description img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
}
.workspace-description video {
    max-width: 100%;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
}
.workspace-description blockquote {
    border-left: 4px solid #dee2e6;
    padding-left: 1rem;
    margin-left: 0;
    color: #6c757d;
}
.workspace-description pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}
.workspace-description .ql-file-attachment {
    max-width: 100%;
}
.panel-heading.note-toolbar{
    background: #ccc !important;

    box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px !important;
}
#toast-container > .toast {
    opacity: 1 !important;
    color: #fff !important;
}

#toast-container > .toast-success {
    background-color: #198754 !important;
}

#toast-container > .toast-error {
    background-color: #dc3545 !important;
}

#toast-container > .toast-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

#toast-container > .toast-info {
    background-color: #0dcaf0 !important;
    color: #000 !important;
}
.note-editor .note-dropdown-menu {
    z-index: 9999 !important;
    display: block;
}

.note-editor .note-dropdown-menu:not(.show) {
    display: none;
}

.note-editor .dropdown-menu {
    min-width: 160px;
    background-color: #fff;
}



.upload-block {
    margin-bottom: 25px;
}

.resumable-input {
    display: none;
}

/* الشكل الخارجي */
.upload-label {
    display: inline-block;
    padding: 12px 20px;
    background: #4a75f7;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    border: 2px solid transparent;
}

.upload-label:hover {
    background: #345fe0;
}

.input-title {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 6px;
}

/* مكان الصور والفيديو */
.preview-wrapper img,
.preview-wrapper video {
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
}
.progress {
    background: #e5e5e5;
    border-radius: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4a75f7, #00c4ff);
    width: 0%;
    border-radius: 20px;
    transition: width 0.25s ease-in-out;
}

/* --- Modern Dashboard Custom Styles --- */
.dashboard-header-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    border: 1px solid #1e293b;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}
.dashboard-header-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
}
[data-bs-theme="dark"] .dashboard-header-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #38424d;
}

.modern-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modern-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #6366f1;
}
[data-bs-theme="dark"] .modern-card {
    background: #2c333a;
    border-color: #454f5b;
}
[data-bs-theme="dark"] .modern-card:hover {
    border-color: #818cf8;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}
.modern-card:hover .icon-box {
    transform: scale(1.1) rotate(3deg);
}

/* Colors with soft transparencies for light/dark support */
.icon-box.bg-primary-soft { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.icon-box.bg-success-soft { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.icon-box.bg-danger-soft { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.icon-box.bg-warning-soft { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.icon-box.bg-indigo-soft { background: rgba(99, 102, 241, 0.15); color: #6366f1; }
.icon-box.bg-purple-soft { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }

[data-bs-theme="dark"] .icon-box.bg-primary-soft { background: rgba(59, 130, 246, 0.25); color: #60a5fa; }
[data-bs-theme="dark"] .icon-box.bg-success-soft { background: rgba(16, 185, 129, 0.25); color: #34d399; }
[data-bs-theme="dark"] .icon-box.bg-danger-soft { background: rgba(239, 68, 68, 0.25); color: #f87171; }
[data-bs-theme="dark"] .icon-box.bg-warning-soft { background: rgba(245, 158, 11, 0.25); color: #fbbf24; }
[data-bs-theme="dark"] .icon-box.bg-indigo-soft { background: rgba(99, 102, 241, 0.25); color: #818cf8; }
[data-bs-theme="dark"] .icon-box.bg-purple-soft { background: rgba(139, 92, 246, 0.25); color: #a78bfa; }

.modern-progress {
    height: 6px;
    border-radius: 3px;
    background-color: #f1f5f9;
    overflow: hidden;
}
[data-bs-theme="dark"] .modern-progress {
    background-color: #1d2125;
}
.modern-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.leaderboard-item-box {
    background: #f8fafc;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}
.leaderboard-item-box:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
[data-bs-theme="dark"] .leaderboard-item-box {
    background: #1d2125;
    border-color: #3e4752;
}
[data-bs-theme="dark"] .leaderboard-item-box:hover {
    background: #22272b;
    border-color: #454f5b;
}

.modern-filter-bar {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
[data-bs-theme="dark"] .modern-filter-bar {
    background: #2c333a;
    border-color: #454f5b;
}

.card-value {
    color: #0f172a !important;
}
[data-bs-theme="dark"] .card-value {
    color: #f8fafc !important;
}
.card-label {
    color: #475569 !important;
}
[data-bs-theme="dark"] .card-label {
    color: #94a3b8 !important;
}

.modern-input {
    border: 1px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
}
[data-bs-theme="dark"] .modern-input {
    border-color: #454f5b !important;
    background-color: #1d2125 !important;
    color: #f8fafc !important;
}




