#main-wrapper {
    display: flex;
/*    height: 100vh !important; 
	height: var(--dynamic-height);
	height: calc(var(--100vh) - 120px) !important; */
	height: calc(100vh - 200px);
}

#left-column {
    width: 100px;
    background: #2c3e50;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#left-column > * {
    width: 100%;
}

#kanban-wrapper {
    flex: 1;
    background: #ecf0f1;
    padding: 20px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.welcome-message {
    text-align: center;
    color: #7f8c8d;
}

.welcome-message h1 {
    margin-bottom: 10px;
    color: #2c3e50;
}

#load-kanban-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
    width: 100%;
    font-size: 12px;
}

#load-kanban-btn:hover {
    background: #2980b9;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 500px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input, textarea, select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

textarea {
    height: 100px;
    resize: vertical;
}

.btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
}

.btn:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
}

.btn-success:hover {
    background: #219a52;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin: 5px 0;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.user-checkbox {
    margin-right: 10px;
}

.user-name {
    flex: 1;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
}

.user-name:hover {
    background: #e9ecef;
}

.project-list {
    margin-top: 20px;
    width: 100%;
}

.project-title {
    background: #34495e;
    color: white;
    padding: 8px;
    margin: 5px 0;
    border-radius: 3px;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
    word-break: break-word;
    transition: background 0.3s;
}

.project-title:hover {
    background: #2c3e50;
}

.project-title.active {
    background: #e74c3c;
}

.role-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    z-index: 1001;
    width: 300px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.role-option {
    margin: 10px 0;
    display: flex;
    align-items: center;
}

.role-option input {
    width: auto;
    margin-right: 10px;
}

.selected-user-info {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
}

.kanban-menu {
    width: 100px;
    background: #34495e;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kanban-content {
    flex: 1;
    padding: 20px;
    background: white;
    margin-left: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.project-actions {
    display: flex;
    gap: 10px;
}

.project-title-large {
    font-size: 24px;
    color: #2c3e50;
    margin: 0;
}

.more-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.more-btn:hover {
    background: #7f8c8d;
}

.side-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1002;
    display: flex;
    flex-direction: column;
}

.side-panel.open {
    right: 0;
}

.panel-header {
    background: #34495e;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-tabs {
    display: flex;
    background: #ecf0f1;
    border-bottom: 1px solid #bdc3c7;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.tab-btn.active {
    background: white;
    border-bottom: 3px solid #3498db;
}

.tab-btn:hover {
    background: #d5dbdb;
}

.tab-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.kanban-columns {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    min-height: 500px;
}

.column {
    flex: 1;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    min-height: 400px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.column-title {
    font-weight: bold;
    color: #2c3e50;
}

.no-project-selected {
    text-align: center;
    color: #7f8c8d;
    padding: 40px;
}

.no-project-selected h2 {
    margin-bottom: 10px;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
}

.overlay.active {
    display: block;
}

.project-count {
    color: #95a5a6;
    font-size: 11px;
    text-align: center;
    margin-top: 10px;
}




/* Add to existing CSS */
.columns-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    min-height: 500px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.column {
    flex: 0 0 300px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    min-height: 400px;
    border: 2px dashed #dee2e6;
    display: flex;
    flex-direction: column;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.column-title {
    font-weight: bold;
    color: #2c3e50;
    font-size: 16px;
    flex: 1;
    padding: 5px;
    border-radius: 3px;
    transition: background 0.3s;
}

.column-title:hover {
    background: #e9ecef;
}

.column-actions {
    display: flex;
    gap: 5px;
}

.column-btn {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    border-radius: 3px;
    color: #6c757d;
    font-size: 14px;
}

.column-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.column-content {
    flex: 1;
    min-height: 200px;
    background: #ffffff;
    border-radius: 5px;
    padding: 10px;
    border: 1px solid #dee2e6;
}

.empty-column {
    text-align: center;
    color: #6c757d;
    padding: 40px 20px;
    font-style: italic;
}

.add-column-btn {
    flex: 0 0 300px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 100px;
}

.add-column-btn:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.add-column-btn .btn-text {
    color: #6c757d;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-column-btn:hover .btn-text {
    color: #3498db;
}

.column-modal .modal-content {
    width: 400px;
}

.ticket-count {
    background: #6c757d;
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 12px;
    margin-left: 5px;
}

.delete-confirm-modal .modal-content {
    width: 450px;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.warning-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
    color: #856404;
}

.warning-message strong {
    display: block;
    margin-bottom: 5px;
}

.column-with-tickets {
    border-color: #e74c3c;
}

.column-empty {
    border-color: #27ae60;
}




/* Drag & Drop Styles */
.column {
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
}

.column.dragging {
    opacity: 0.6;
    transform: rotate(5deg);
    cursor: grabbing;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.column.drag-over {
    border: 2px dashed #3498db;
}

.columns-container {
    cursor: grabbing;
}

.columns-container.dragging {
    cursor: grabbing;
}

/* Ticket Styles */
.ticket {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ticket:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.ticket-header {
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
}

.ticket-description {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
    line-height: 1.4;
}

.ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-state {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    color: white;
    font-weight: bold;
}

.add-ticket-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 10px;
    width: 100%;
    transition: background 0.3s;
}

.add-ticket-btn:hover {
    background: #2980b9;
}

.ticket-modal .modal-content {
    width: 500px;
}

.ticket-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.column-content {
    min-height: 100px;
}

.loading-tickets {
    text-align: center;
    color: #6c757d;
    padding: 20px;
    font-style: italic;
}

/* Column header improvements */
.column-header {
    cursor: grab;
}

.column-header:active {
    cursor: grabbing;
}

.drag-handle {
    cursor: grab;
    color: #6c757d;
    padding: 5px;
    margin-right: 5px;
}

.drag-handle:active {
    cursor: grabbing;
}




/* Drag & Drop Styles with Green Circle */
.column {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
}

.column.dragging {
    opacity: 0.6;
    transform: rotate(5deg);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.column.drag-over {
    border: 2px dashed #3498db;
}

.drag-handle {
    cursor: grab;
    color: #27ae60;
    background: #27ae60;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: all 0.3s;
    position: relative;
}

.drag-handle::before {
    content: "⋮⋮";
    color: white;
    font-size: 10px;
    font-weight: bold;
    transform: rotate(90deg);
    display: block;
}

.drag-handle:hover {
    background: #219a52;
    transform: scale(1.1);
}

.drag-handle:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.column-header {
    cursor: default;
}

.dragging .drag-handle {
    background: #e74c3c;
    transform: scale(1.2);
}

.drag-preview {
    background: rgba(39, 174, 96, 0.1);
    border: 2px dashed #27ae60;
    border-radius: 8px;
}

/* Drop indicator styles */
.drop-indicator {
    height: 4px;
    background: #27ae60;
    margin: 5px 0;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s;
}

.drop-indicator.active {
    opacity: 1;
}

.column-placeholder {
    border: 2px dashed #27ae60;
    background: rgba(39, 174, 96, 0.05);
    border-radius: 8px;
    min-height: 150px;
}

/* Ticket Styles (keep existing) */
.ticket {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ticket:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.ticket-header {
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
}

.ticket-description {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
    line-height: 1.4;
}

.ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-state {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    color: white;
    font-weight: bold;
}

.add-ticket-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 10px;
    width: 100%;
    transition: background 0.3s;
}

.add-ticket-btn:hover {
    background: #2980b9;
}

.ticket-modal .modal-content {
    width: 500px;
}

.column-content {
    min-height: 100px;
}

.loading-tickets {
    text-align: center;
    color: #6c757d;
    padding: 20px;
    font-style: italic;
}


/* Drag & Drop Styles */
.column {
    transition: all 0.3s ease;
    cursor: default;
}

.column.dragging {
    opacity: 0.3;
}

.drag-handle {
    cursor: grab;
    background: #27ae60;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.drag-handle::before {
    content: "⋮⋮";
    color: white;
    font-size: 10px;
    font-weight: bold;
    transform: rotate(90deg);
    display: block;
}

.drag-handle:hover {
    background: #219a52;
    transform: scale(1.1);
}

.drag-handle:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.column.dragging .drag-handle {
    background: #e74c3c;
}

/* Ghost element for dragging */
.ghost {
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 2px solid #27ae60;
}

/* Drop zone */
.drop-zone {
    transition: all 0.3s ease;
}


/* Column header layout */
.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.column-title-container {
    display: flex;
    align-items: center;
    flex: 1;
}

.column-title {
    font-weight: bold;
    color: #2c3e50;
    font-size: 16px;
    margin: 0;
}

.column-actions {
    display: flex;
    gap: 5px;
}

.column-btn {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    border-radius: 3px;
    color: #6c757d;
    font-size: 14px;
}

.column-btn:hover {
    background: #e9ecef;
    color: #495057;
}


/* ---------------------------- */

/* Ticket Styles */
.ticket {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ticket:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.ticket-header strong {
    color: #2c3e50;
    flex: 1;
    margin-right: 10px;
}

.ticket-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.ticket-btn {
    background: #3498db;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticket-btn:hover {
    background: #2980b9;
}

.ticket-order-select,
.ticket-column-select,
.ticket-parent-select {
    font-size: 11px;
    padding: 2px 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: white;
}

.ticket-description {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
    line-height: 1.4;
}

.ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-state {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    color: white;
    font-weight: bold;
}

.ticket-meta {
    font-size: 10px;
    color: #6c757d;
}

/* Subticket Styles */
.subtickets-container {
    margin-top: 10px;
    padding-left: 15px;
    border-left: 2px solid #e9ecef;
}

.subticket {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 8px;
    font-size: 11px;
}

.subticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.subticket-header strong {
    color: #495057;
    flex: 1;
    margin-right: 8px;
    font-size: 11px;
}

.subticket-actions {
    display: flex;
    gap: 3px;
    align-items: center;
}

.subticket-description {
    font-size: 10px;
    color: #6c757d;
    margin-bottom: 5px;
    line-height: 1.3;
}

.subticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Modal improvements */
.ticket-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.user-list-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
}

.ticket-count {
    background: #6c757d;
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    margin-bottom: 10px;
    display: inline-block;
}


/* ----------------------------- */

/* Limit Message Styles */
.limit-message {
    padding: 12px;
    margin: 10px 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid;
}

.limit-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.limit-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.limit-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* Update modal content to accommodate limit messages */
.modal-content {
    position: relative;
}

.limit-counter {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

.ticket-limit-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 13px;
}

/* --------------------- */
/* Ticket Display Styles */
.ticket {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ticket:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    border-color: #3498db;
    transform: translateY(-1px);
}

.ticket-title {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
    padding: 5px 0;
    word-break: break-word;
}

.ticket-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.add-subticket-btn {
    background: #27ae60;
    color: white;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.add-subticket-btn:hover {
    background: #219a52;
    transform: scale(1.1);
}

/* Subticket Styles */
.subtickets-container {
    margin-top: 8px;
    padding-left: 15px;
    border-left: 2px solid #e9ecef;
}

.subticket {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 6px 8px;
    margin-bottom: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subticket:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.subticket-title {
    color: #495057;
    font-weight: 400;
    word-break: break-word;
}

/* Empty State */
.empty-column {
    text-align: center;
    color: #6c757d;
    padding: 20px;
    font-style: italic;
    font-size: 14px;
}

/* Modal Overlay for Subticket */
.subticket-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    display: none;
}

.subticket-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 10px;
    z-index: 1001;
    width: 500px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Edit Ticket Modal */
.edit-ticket-modal .modal-content {
    width: 500px;
}

.edit-ticket-form {
    padding: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Parent Column/Ticket Select Styles */
.parent-select-group {
    margin-bottom: 15px;
}

.parent-select-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.parent-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

.parent-select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Column content improvements */
.column-content {
    min-height: 100px;
    max-height: 600px;
    overflow-y: auto;
    padding: 5px;
}

.column-content::-webkit-scrollbar {
    width: 6px;
}

.column-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.column-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.column-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ======================================================================== */
/*
#main-wrapper {
    display: flex;
    height: 100vh;
}

#left-column {
    width: 100px;
    background: #2c3e50;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#left-column > * {
    width: 100%;
}
*/
#kanban-wrapper {
    flex: 1;
    background: #ecf0f1;
    padding: 20px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.welcome-message {
    text-align: center;
    color: #7f8c8d;
}

.welcome-message h1 {
    margin-bottom: 10px;
    color: #2c3e50;
}

#load-kanban-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
    width: 100%;
    font-size: 12px;
}

#load-kanban-btn:hover {
    background: #2980b9;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 500px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input, textarea, select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

textarea {
    height: 100px;
    resize: vertical;
}

.btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
}

.btn:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
}

.btn-success:hover {
    background: #219a52;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin: 5px 0;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.user-checkbox {
    margin-right: 10px;
}

.user-name {
    flex: 1;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
}

.user-name:hover {
    background: #e9ecef;
}

.project-list {
    margin-top: 20px;
    width: 100%;
}

.project-title {
    background: #34495e;
    color: white;
    padding: 8px;
    margin: 5px 0;
    border-radius: 3px;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
    word-break: break-word;
    transition: background 0.3s;
}

.project-title:hover {
    background: #2c3e50;
}

.project-title.active {
    background: #e74c3c;
}

.role-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    z-index: 1001;
    width: 300px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.role-option {
    margin: 10px 0;
    display: flex;
    align-items: center;
}

.role-option input {
    width: auto;
    margin-right: 10px;
}

.selected-user-info {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
}

.kanban-menu {
    width: 100px;
    background: #34495e;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kanban-content {
    flex: 1;
    padding: 20px;
    background: white;
    margin-left: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.project-actions {
    display: flex;
    gap: 10px;
}

.project-title-large {
    font-size: 24px;
    color: #2c3e50;
    margin: 0;
}

.more-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.more-btn:hover {
    background: #7f8c8d;
}

.side-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1002;
    display: flex;
    flex-direction: column;
}

.side-panel.open {
    right: 0;
}

.panel-header {
    background: #34495e;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-tabs {
    display: flex;
    background: #ecf0f1;
    border-bottom: 1px solid #bdc3c7;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.tab-btn.active {
    background: white;
    border-bottom: 3px solid #3498db;
}

.tab-btn:hover {
    background: #d5dbdb;
}

.tab-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.columns-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    min-height: 500px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.column {
    flex: 0 0 300px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    min-height: 400px;
    border: 2px dashed #dee2e6;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: default;
}

.column.dragging {
    opacity: 0.3;
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.column-title-container {
    display: flex;
    align-items: center;
    flex: 1;
}

.column-title {
    font-weight: bold;
    color: #2c3e50;
    font-size: 16px;
    margin: 0;
}

.column-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.column-btn {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    border-radius: 3px;
    color: #6c757d;
    font-size: 14px;
}

.column-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.drag-handle {
    cursor: grab;
    background: #27ae60;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.drag-handle::before {
    content: "⋮⋮";
    color: white;
    font-size: 10px;
    font-weight: bold;
    transform: rotate(90deg);
    display: block;
}

.drag-handle:hover {
    background: #219a52;
    transform: scale(1.1);
}

.drag-handle:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.column.dragging .drag-handle {
    background: #e74c3c;
}

.ghost {
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 2px solid #27ae60;
}

.drop-zone {
    transition: all 0.3s ease;
}

.column-content {
    flex: 1;
    min-height: 100px;
    max-height: 600px;
    overflow-y: auto;
    padding: 5px;
}

.column-content::-webkit-scrollbar {
    width: 6px;
}

.column-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.column-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.column-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.empty-column {
    text-align: center;
    color: #6c757d;
    padding: 20px;
    font-style: italic;
    font-size: 14px;
}

.add-column-btn {
    flex: 0 0 300px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 100px;
}

.add-column-btn:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.add-column-btn .btn-text {
    color: #6c757d;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-column-btn:hover .btn-text {
    color: #3498db;
}

.column-modal .modal-content {
    width: 400px;
}

.ticket-count {
    background: #6c757d;
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    margin-bottom: 10px;
    display: inline-block;
}

.delete-confirm-modal .modal-content {
    width: 450px;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.warning-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
    color: #856404;
}

.warning-message strong {
    display: block;
    margin-bottom: 5px;
}

.column-with-tickets {
    border-color: #e74c3c;
}

.column-empty {
    border-color: #27ae60;
}

.project-count {
    color: #95a5a6;
    font-size: 11px;
    text-align: center;
    margin-top: 10px;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
}

.overlay.active {
    display: block;
}

.no-project-selected {
    text-align: center;
    color: #7f8c8d;
    padding: 40px;
}

.no-project-selected h2 {
    margin-bottom: 10px;
}

/* Ticket Display Styles */
.ticket {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ticket:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    border-color: #3498db;
    transform: translateY(-1px);
}

.ticket-title {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
    padding: 5px 0;
    word-break: break-word;
}

.ticket-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.add-subticket-btn {
    background: #27ae60;
    color: white;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.add-subticket-btn:hover {
    background: #219a52;
    transform: scale(1.1);
}

/* Subticket Styles */
.subtickets-container {
    margin-top: 8px;
    padding-left: 15px;
    border-left: 2px solid #e9ecef;
}

.subticket {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 6px 8px;
    margin-bottom: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subticket:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.subticket-title {
    color: #495057;
    font-weight: 400;
    word-break: break-word;
}

/* Modal Overlay for Subticket */
.subticket-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    display: none;
}

.subticket-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 10px;
    z-index: 1001;
    width: 500px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Edit Ticket Modal */
.edit-ticket-modal .modal-content {
    width: 500px;
}

.edit-ticket-form {
    padding: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Parent Column/Ticket Select Styles */
.parent-select-group {
    margin-bottom: 15px;
}

.parent-select-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.parent-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

.parent-select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Ticket Form Grid */
.ticket-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.user-list-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
}

/* Limit Message Styles */
.limit-message {
    padding: 12px;
    margin: 10px 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid;
}

.limit-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.limit-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.limit-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.limit-counter {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

.ticket-limit-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 13px;
}


/* ----------------------- */

/* Add to css/style.css */
.loading-tickets {
    text-align: center;
    color: #6c757d;
    padding: 20px;
    font-style: italic;
}

.error-message {
    text-align: center;
    color: #e74c3c;
    padding: 20px;
    background: #f8d7da;
    border-radius: 4px;
    margin: 10px 0;
}

.empty-state {
    text-align: center;
    color: #6c757d;
    padding: 40px 20px;
}

.empty-state p {
    margin: 0;
    font-style: italic;
}



/* ------------------------------ */

/* Edit Column Button Styles */
.edit-column-btn {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    border-radius: 3px;
    color: #3498db;
    font-size: 14px;
    transition: all 0.2s ease;
}

.edit-column-btn:hover {
    background: #e3f2fd;
    color: #2980b9;
    transform: scale(1.1);
}

.column-actions {
    display: flex;
    gap: 3px;
    align-items: center;
}

.column-btn {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    border-radius: 3px;
    color: #6c757d;
    font-size: 14px;
    transition: all 0.2s ease;
}

.column-btn:hover {
    background: #e9ecef;
    color: #495057;
}

/* Edit Column Modal Styles */
.column-modal .modal-content {
    width: 400px;
}

/* Column header improvements */
.column-title-container {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.column-title {
    font-weight: bold;
    color: #2c3e50;
    font-size: 16px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}



/* ---------------------- */

/* Enhanced Edit Ticket Modal Styles */
.edit-ticket-modal .modal-content {
    width: 600px;
    max-height: 90vh;
}

.edit-ticket-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.edit-ticket-form .form-group {
    margin-bottom: 15px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: " Loading...";
    color: #3498db;
    font-style: italic;
}

/* Success/Error messages */
.message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ------------ */

/* Loading state for forms */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: "Loading...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 5px;
    color: #3498db;
    font-weight: bold;
    z-index: 1000;
}

/* Edit ticket modal specific styles */
.edit-ticket-modal .modal-content {
    width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.edit-ticket-form .ticket-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.edit-ticket-form .form-group-full {
    grid-column: 1 / -1;
}

/* Close button for modals */
.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-button:hover {
    color: #000;
}

/* ----------------------------------- */

/* Subticket specific styles */
.subticket {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subticket:hover {
    background: #e9ecef;
    border-color: #3498db;
    transform: translateX(2px);
}

.subticket-title {
    color: #495057;
    font-weight: 400;
    word-break: break-word;
    flex: 1;
    padding: 2px 0;
}

.subticket-actions {
    display: flex;
    gap: 3px;
    align-items: center;
}

/* Limit info styling */
.limit-counter {
    font-size: 12px;
    color: #6c757d;
    margin: 10px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #3498db;
}

.limit-counter.warning {
    border-left-color: #f39c12;
    background: #fff3cd;
    color: #856404;
}

.limit-counter.error {
    border-left-color: #e74c3c;
    background: #f8d7da;
    color: #721c24;
}

/* -------------------------- */

/* Archive Button Styles */
.archive-btn {
    background: #f39c12;
    color: white;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 5px;
}

.archive-btn:hover {
    background: #e67e22;
    transform: scale(1.1);
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

/* Archive Modal Styles */
.archive-modal .modal-content {
    width: 800px;
    max-height: 80vh;
}

.archive-controls {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.archive-content {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
}

.archived-ticket {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.archived-ticket:hover {
    background: #e9ecef;
}

.archived-ticket-info {
    flex: 1;
}

.archived-ticket-title {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
}

.archived-ticket-meta {
    font-size: 11px;
    color: #6c757d;
}

.archived-ticket-actions {
    display: flex;
    gap: 5px;
}

.restore-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.restore-btn:hover {
    background: #219a52;
}

.delete-permanently-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.delete-permanently-btn:hover {
    background: #c0392b;
}

.empty-archive {
    text-align: center;
    color: #6c757d;
    padding: 40px 20px;
    font-style: italic;
}

/* Subticket archive styles */
.archived-subticket {
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px 10px;
    margin: 5px 0 5px 20px;
    font-size: 12px;
}

.archived-subticket .archived-ticket-title {
    font-size: 12px;
    font-weight: 400;
}


/* ------------------------- */

/* Archive Stats Styles */
.archive-stats {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 5px;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.archive-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #1976d2;
}

.stat-label {
    font-size: 12px;
    color: #546e7a;
}

/* ------------------------------- */

/* Archive Column Styles */
.archive-column {
    border: 2px solid #f39c12;
    background: #fffaf0;
}

.archive-column .column-title {
    color: #f39c12;
    font-weight: bold;
}

.archived-ticket-column {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 4px solid #f39c12;
}

.archived-subticket-column {
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-left: 4px solid #e67e22;
    margin-left: 20px;
}

/* Archived Ticket Details Modal */
.ticket-details {
    margin: 20px 0;
}

.detail-group {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.detail-group label {
    font-weight: bold;
    color: #2c3e50;
    display: block;
    margin-bottom: 5px;
}

.detail-value {
    color: #495057;
    padding: 5px;
    background: white;
    border-radius: 3px;
    border: 1px solid #dee2e6;
}

.action-buttons {
    border-top: 1px solid #dee2e6;
    padding-top: 15px;
}

/* Archive button in top menu */
#show-archive-btn, #back-to-kanban-btn {
    margin: 0 5px;
}

/* Orphaned Subtickets Section */
.orphaned-subtickets-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px dashed #95a5a6;
}

.section-title {
    font-weight: bold;
    color: #7f8c8d;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}


.crm-user-checkbox { width: 20px; }