/* ============================================================
   proyectos.css — Kanban Project Manager Stylesheet
   Style: dark primary #003da5, Inter font, clean cards
   NO EMOJIS — CSS/SVG only
   ============================================================ */

/* ==================== CSS Variables ==================== */
:root {
    --proy-primary: #003da5;
    --proy-primary-hover: #0056d6;
    --proy-primary-light: #dbeafe;
    --proy-success: #059669;
    --proy-warning: #f59e0b;
    --proy-danger: #dc2626;
    --proy-bg: #f8fafc;
    --proy-text: #1a1a2e;
    --proy-text-2: #52525b;
    --proy-text-3: #a1a1aa;
    --proy-border: #e0e0e0;
    --proy-ring: rgba(0, 61, 165, 0.12);
}

/* ==================== Reset & Base ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
}

body {
    background: var(--proy-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
    color: var(--proy-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== Main Container ==================== */
.proy-main {
    padding-top: 72px; /* fixed navbar 56px + 16px gap */
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 40px;
}

/* Kanban view: full-width override */
.proy-main.kanban-view {
    max-width: none;
}

/* ==================== Page Header ==================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--proy-text);
}

.page-subtitle {
    font-size: 13px;
    color: var(--proy-text-3);
    margin-top: 2px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ==================== Breadcrumb ==================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--proy-text-3);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--proy-primary);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-sep {
    color: var(--proy-border);
    font-size: 11px;
}

/* ==================== Buttons ==================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--proy-primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--proy-primary-hover);
    box-shadow: 0 4px 12px var(--proy-ring);
}

.btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: 1.5px solid var(--proy-border);
    color: var(--proy-text-2);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--proy-danger);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--proy-text-3);
    transition: color 0.15s, background 0.15s;
    font-family: inherit;
}

.btn-icon:hover {
    color: var(--proy-primary);
    background: var(--proy-primary-light);
}

.btn-icon.danger:hover {
    color: var(--proy-danger);
    background: #fef2f2;
}

/* ==================== Form Inputs ==================== */
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--proy-text-2);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1.5px solid var(--proy-border);
    outline: none;
    font-family: inherit;
    background: white;
    color: var(--proy-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
    border-color: var(--proy-primary);
    box-shadow: 0 0 0 3px var(--proy-ring);
}

.form-input::placeholder {
    color: var(--proy-text-3);
}

.form-input:disabled {
    background: #f4f4f5;
    cursor: not-allowed;
    opacity: 0.7;
}

.form-select {
    width: 100%;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1.5px solid var(--proy-border);
    outline: none;
    font-family: inherit;
    background: white;
    color: var(--proy-text);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a1a1aa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.form-select:focus {
    border-color: var(--proy-primary);
    box-shadow: 0 0 0 3px var(--proy-ring);
}

.form-textarea {
    width: 100%;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1.5px solid var(--proy-border);
    outline: none;
    font-family: inherit;
    background: white;
    color: var(--proy-text);
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-textarea:focus {
    border-color: var(--proy-primary);
    box-shadow: 0 0 0 3px var(--proy-ring);
}

.form-group {
    margin-bottom: 16px;
}

/* ==================== Badge ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.badge-success {
    background: #ecfdf5;
    color: var(--proy-success);
}

.badge-warning {
    background: #fffbeb;
    color: #b45309;
}

.badge-danger {
    background: #fef2f2;
    color: var(--proy-danger);
}

.badge-primary {
    background: var(--proy-primary-light);
    color: var(--proy-primary);
}

.badge-neutral {
    background: #f4f4f5;
    color: var(--proy-text-3);
}

/* ==================== Section Title ==================== */
.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--proy-text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==================== Empty State ==================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--proy-text-3);
    font-size: 14px;
    line-height: 1.6;
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    opacity: 0.35;
}

.empty-state p {
    margin-top: 4px;
    font-size: 13px;
}

/* ==================== Login Page ==================== */
.login-container {
    max-width: 400px;
    margin: 0 auto;
    padding-top: 120px;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--proy-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--proy-text);
    margin-bottom: 4px;
    text-align: center;
}

.login-subtitle {
    font-size: 13px;
    color: var(--proy-text-3);
    text-align: center;
    margin-bottom: 24px;
}

.login-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--proy-border);
    outline: none;
    font-size: 14px;
    font-family: inherit;
    background: white;
    color: var(--proy-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-input:focus {
    border-color: var(--proy-primary);
    box-shadow: 0 0 0 3px var(--proy-ring);
}

.login-input::placeholder {
    color: var(--proy-text-3);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--proy-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    margin-top: 8px;
}

.login-btn:hover {
    background: var(--proy-primary-hover);
    box-shadow: 0 4px 16px var(--proy-ring);
}

.login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.login-error {
    color: var(--proy-danger);
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
    display: none;
}

/* ==================== Category Filter Chips ==================== */
.category-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.category-chip {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid var(--proy-border);
    background: white;
    color: var(--proy-text-2);
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    user-select: none;
}

.category-chip:hover {
    border-color: var(--proy-primary);
    color: var(--proy-primary);
}

.category-chip.active {
    background: var(--proy-primary);
    color: white;
    border-color: var(--proy-primary);
}

/* ==================== Project List Grid ==================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: white;
    border: 1.5px solid var(--proy-border);
    border-radius: 14px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
    animation: slideIn 0.3s ease-out forwards;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--proy-ring);
    border-color: var(--proy-primary);
    color: inherit;
}

.project-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 8px;
}

.project-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--proy-text);
    line-height: 1.4;
}

.project-card-desc {
    font-size: 13px;
    color: var(--proy-text-2);
    line-height: 1.5;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--proy-text-3);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.project-card-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-card .progress-bar {
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    overflow: hidden;
    margin-bottom: 8px;
}

.project-card .progress-fill {
    height: 100%;
    background: var(--proy-success);
    border-radius: 2px;
    transition: width 0.5s ease-out;
}

.project-card .progress-label {
    font-size: 11px;
    color: var(--proy-text-3);
    text-align: right;
}

.project-card .category-chip {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.project-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f4f4f5;
}

.project-card-avatars {
    display: flex;
}

.project-card-avatars .card-avatar {
    margin-right: -6px;
}

.project-card-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--proy-text-3);
}

/* ==================== Kanban Board ==================== */
.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 16px 0 24px;
    min-height: calc(100vh - 160px);
    align-items: flex-start;
    -webkit-overflow-scrolling: touch;
}

.kanban-board::-webkit-scrollbar {
    height: 6px;
}

.kanban-board::-webkit-scrollbar-track {
    background: transparent;
}

.kanban-board::-webkit-scrollbar-thumb {
    background: var(--proy-border);
    border-radius: 3px;
}

/* ==================== Kanban Column ==================== */
.kanban-column {
    flex: 0 0 280px;
    min-width: 260px;
    max-width: 320px;
    background: white;
    border-radius: 12px;
    border: 1.5px solid var(--proy-border);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 160px);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.kanban-column.drag-hover {
    border-color: var(--proy-primary);
    box-shadow: 0 0 0 3px var(--proy-ring);
}

.kanban-column-header {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
    user-select: none;
}

.kanban-column-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.kanban-column-header .column-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.kanban-column-header .column-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kanban-column-header .column-count {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--proy-text-2);
    font-weight: 500;
    flex-shrink: 0;
}

.kanban-column-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.kanban-column-header-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--proy-text-3);
    padding: 4px 6px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    font-size: 13px;
    line-height: 1;
}

.kanban-column-header-actions button:hover {
    color: var(--proy-primary);
    background: var(--proy-primary-light);
}

.kanban-column-header-actions button.del:hover {
    color: var(--proy-danger);
    background: #fef2f2;
}

.kanban-column-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 60px;
}

.kanban-column-body::-webkit-scrollbar {
    width: 4px;
}

.kanban-column-body::-webkit-scrollbar-track {
    background: transparent;
}

.kanban-column-body::-webkit-scrollbar-thumb {
    background: var(--proy-border);
    border-radius: 2px;
}

.kanban-column-footer {
    padding: 8px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.kanban-column-empty {
    text-align: center;
    padding: 20px 12px;
    color: var(--proy-text-3);
    font-size: 12px;
    font-style: italic;
    border: 1.5px dashed var(--proy-border);
    border-radius: 8px;
    margin: 4px;
}

/* ==================== Add Column Button ==================== */
.kanban-add-column {
    flex: 0 0 280px;
    min-height: 100px;
    border: 2px dashed var(--proy-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--proy-text-3);
    font-size: 14px;
    font-weight: 500;
    gap: 8px;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    background: transparent;
    border-style: dashed;
    font-family: inherit;
}

.kanban-add-column:hover {
    border-color: var(--proy-primary);
    color: var(--proy-primary);
    background: var(--proy-primary-light);
}

/* ==================== Kanban Cards ==================== */
.kanban-card {
    background: white;
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    padding: 12px;
    cursor: grab;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
    animation: slideIn 0.3s ease-out forwards;
}

.kanban-card:hover {
    border-color: var(--proy-primary);
    box-shadow: 0 4px 12px var(--proy-ring);
}

.kanban-card:hover .card-archive-btn {
    opacity: 1;
}

.card-archive-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: white;
    border: 1px solid var(--proy-border);
    border-radius: 5px;
    padding: 3px 5px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
    color: var(--proy-text-3);
    display: flex;
    align-items: center;
    z-index: 2;
}

.card-archive-btn:hover {
    background: #f3f4f6;
    color: var(--proy-text);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card .card-color-bar {
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 2px;
}

/* when color bar is present, add left padding */
.kanban-card.has-color-bar {
    padding-left: 16px;
}

.kanban-card .card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--proy-text);
    margin-bottom: 8px;
    line-height: 1.4;
}

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

.kanban-card .card-label {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.02em;
}

.kanban-card .card-due {
    font-size: 11px;
    color: var(--proy-text-3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.kanban-card .card-due.overdue {
    color: var(--proy-danger);
    font-weight: 600;
}

.kanban-card .card-due.due-soon {
    color: var(--proy-warning);
    font-weight: 600;
}

.kanban-card .card-assignees {
    display: flex;
    align-items: center;
}

.kanban-card .card-assignees .card-avatar {
    margin-right: -6px;
}

.kanban-card .card-assignees .card-avatar:last-child {
    margin-right: 0;
}

.kanban-card .card-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid white;
    flex-shrink: 0;
}

.kanban-card .card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--proy-text-3);
    margin-top: 8px;
    flex-wrap: wrap;
}

.kanban-card .card-meta-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

.kanban-card .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.kanban-card .card-checklist-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.kanban-card .card-checklist-bar {
    height: 3px;
    border-radius: 2px;
    background: #e5e7eb;
    overflow: hidden;
    flex: 1;
    min-width: 40px;
}

.kanban-card .card-checklist-fill {
    height: 100%;
    background: var(--proy-success);
    border-radius: 2px;
    transition: width 0.3s ease-out;
}

.kanban-card .card-checklist-label {
    font-size: 10px;
    color: var(--proy-text-3);
    white-space: nowrap;
}

.kanban-card .card-recurrence-icon {
    color: var(--proy-primary);
    font-size: 11px;
}

/* ==================== Drag & Drop States ==================== */
.kanban-card.dragging {
    opacity: 0.3;
    transform: scale(0.96);
}

.kanban-card-ghost {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.85;
    transform: scale(1.03) rotate(1deg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.drop-indicator {
    height: 3px;
    background: var(--proy-primary);
    border-radius: 2px;
    margin: 4px 0;
    box-shadow: 0 0 6px var(--proy-ring);
    pointer-events: none;
}

/* ==================== Drag Handle ==================== */
.drag-handle {
    cursor: grab;
    color: var(--proy-text-3);
    padding: 4px;
    transition: color 0.15s;
    display: flex;
    align-items: center;
}

.drag-handle:hover {
    color: var(--proy-primary);
}

.drag-handle:active {
    cursor: grabbing;
}

/* ==================== Add Card Button ==================== */
.kanban-add-card-btn {
    width: 100%;
    background: none;
    border: none;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 13px;
    color: var(--proy-text-3);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s, background 0.15s;
}

.kanban-add-card-btn:hover {
    color: var(--proy-primary);
    background: var(--proy-primary-light);
}

/* ==================== Card Detail Page ==================== */
.card-detail {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    padding-top: 16px;
}

.card-detail-main {
    min-width: 0;
}

.card-detail-sidebar {
    min-width: 0;
}

.card-detail .editable-title {
    font-size: 22px;
    font-weight: 600;
    border: none;
    background: transparent;
    width: 100%;
    padding: 4px 0;
    outline: none;
    font-family: inherit;
    color: var(--proy-text);
    line-height: 1.3;
    border-bottom: 2px solid transparent;
    transition: border-color 0.15s;
}

.card-detail .editable-title:focus {
    border-bottom-color: var(--proy-primary);
}

.card-detail .editable-desc {
    font-size: 14px;
    color: var(--proy-text-2);
    border: none;
    background: transparent;
    width: 100%;
    min-height: 60px;
    resize: vertical;
    outline: none;
    font-family: inherit;
    line-height: 1.6;
    padding: 0;
    transition: background 0.15s, padding 0.15s, border-radius 0.15s;
}

.card-detail .editable-desc:focus {
    background: #f8fafc;
    border-radius: 8px;
    padding: 8px;
}

.card-detail-section {
    margin-bottom: 24px;
}

/* ==================== Sidebar Panels ==================== */
.sidebar-panel {
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}

.sidebar-panel-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--proy-text-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.sidebar-field {
    margin-bottom: 10px;
}

.sidebar-field-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--proy-text-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.sidebar-field-value {
    font-size: 13px;
    color: var(--proy-text);
    font-weight: 500;
}

.sidebar-field-value.muted {
    color: var(--proy-text-3);
    font-style: italic;
}

/* ==================== Checklist ==================== */
.checklist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f8f8f8;
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-item input[type="checkbox"] {
    accent-color: var(--proy-primary);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

.checklist-text {
    font-size: 13px;
    color: var(--proy-text);
    flex: 1;
    line-height: 1.4;
}

.checklist-item.completed .checklist-text {
    text-decoration: line-through;
    color: var(--proy-text-3);
}

.checklist-item-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s;
}

.checklist-item:hover .checklist-item-actions {
    opacity: 1;
}

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

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

.checklist-progress-fill {
    height: 100%;
    background: var(--proy-success);
    border-radius: 2px;
    transition: width 0.3s ease-out;
}

.checklist-progress-label {
    font-size: 11px;
    color: var(--proy-text-3);
    white-space: nowrap;
}

/* ==================== Comments ==================== */
.comment-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 4px;
}

.comment-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--proy-text);
}

.comment-time {
    font-size: 11px;
    color: var(--proy-text-3);
    margin-left: 4px;
}

.comment-text {
    font-size: 14px;
    color: var(--proy-text-2);
    margin-top: 2px;
    line-height: 1.5;
    word-break: break-word;
}

.comment-input-wrap {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    align-items: flex-start;
}

/* ==================== Attachments ==================== */
.attachment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f8fafc;
    margin-bottom: 6px;
    transition: background 0.15s;
}

.attachment-item:hover {
    background: var(--proy-primary-light);
}

.attachment-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--proy-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--proy-primary);
}

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

.attachment-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--proy-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-meta {
    font-size: 11px;
    color: var(--proy-text-3);
    margin-top: 2px;
}

.attachment-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* ==================== Activity Log ==================== */
.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    font-size: 12px;
    color: var(--proy-text-2);
    line-height: 1.5;
}

.activity-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--proy-primary);
    margin-top: 6px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-time {
    font-size: 11px;
    color: var(--proy-text-3);
    white-space: nowrap;
    margin-left: 4px;
}

/* ==================== Member Assignee Avatars ==================== */
.card-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid white;
    flex-shrink: 0;
}

.card-avatar-lg {
    width: 32px;
    height: 32px;
    font-size: 13px;
}

.card-avatar-xl {
    width: 40px;
    height: 40px;
    font-size: 15px;
}

/* ==================== Member picker ==================== */
.member-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 13px;
}

.member-item:hover {
    background: #f4f4f5;
}

.member-item.selected {
    background: var(--proy-primary-light);
}

.member-name {
    flex: 1;
    font-weight: 500;
    color: var(--proy-text);
}

.member-check {
    width: 16px;
    height: 16px;
    color: var(--proy-primary);
    flex-shrink: 0;
}

/* ==================== Priority Indicator ==================== */
.priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.priority-low { background: var(--proy-success); }
.priority-medium { background: var(--proy-warning); }
.priority-high { background: var(--proy-danger); }
.priority-critical {
    background: var(--proy-danger);
    box-shadow: 0 0 0 2px rgba(220,38,38,0.3);
    animation: priorityPulse 1.8s ease-in-out infinite;
}

@keyframes priorityPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==================== Color Swatch Picker ==================== */
.color-swatches {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s, border-color 0.15s;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.selected {
    border-color: var(--proy-text);
    transform: scale(1.1);
}

/* ==================== Date Input ==================== */
.date-input {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--proy-border);
    outline: none;
    font-family: inherit;
    background: white;
    color: var(--proy-text);
    cursor: pointer;
    transition: border-color 0.15s;
}

.date-input:focus {
    border-color: var(--proy-primary);
    box-shadow: 0 0 0 3px var(--proy-ring);
}

/* ==================== Modal Overlay ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.15s ease-out;
}

.modal-box {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.2s ease-out;
}

.modal-box-lg {
    max-width: 680px;
}

.modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--proy-text);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--proy-text-3);
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
}

.modal-close:hover {
    color: var(--proy-text);
    background: #f4f4f5;
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* ==================== Tabs ==================== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--proy-border);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--proy-text-3);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
}

.tab-btn:hover {
    color: var(--proy-text-2);
}

.tab-btn.active {
    color: var(--proy-primary);
    border-bottom-color: var(--proy-primary);
    font-weight: 600;
}

/* ==================== Search Bar ==================== */
.search-wrap {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--proy-text-3);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 9px 14px 9px 36px;
    font-size: 13px;
    font-family: inherit;
    border: 1.5px solid var(--proy-border);
    border-radius: 8px;
    outline: none;
    background: white;
    color: var(--proy-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
    border-color: var(--proy-primary);
    box-shadow: 0 0 0 3px var(--proy-ring);
}

.search-input::placeholder {
    color: var(--proy-text-3);
}

/* ==================== Toast Notifications ==================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    font-size: 13px;
    color: var(--proy-text);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 240px;
    max-width: 360px;
    pointer-events: all;
    border-left: 3px solid var(--proy-primary);
    animation: slideIn 0.25s ease-out;
}

.toast.toast-success { border-left-color: var(--proy-success); }
.toast.toast-danger { border-left-color: var(--proy-danger); }
.toast.toast-warning { border-left-color: var(--proy-warning); }

/* ==================== Loading Spinner ==================== */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--proy-border);
    border-top-color: var(--proy-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    flex-shrink: 0;
}

.spinner-lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== Scrollbar Styling ==================== */
.styled-scroll::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.styled-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.styled-scroll::-webkit-scrollbar-thumb {
    background: var(--proy-border);
    border-radius: 3px;
}

/* ==================== Divider ==================== */
.divider {
    height: 1px;
    background: var(--proy-border);
    margin: 16px 0;
}

/* ==================== Toolbar / View Controls ==================== */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.view-toggle {
    display: flex;
    border: 1.5px solid var(--proy-border);
    border-radius: 8px;
    overflow: hidden;
}

.view-toggle-btn {
    background: none;
    border: none;
    padding: 7px 10px;
    cursor: pointer;
    color: var(--proy-text-3);
    transition: color 0.15s, background 0.15s;
    font-family: inherit;
    display: flex;
    align-items: center;
}

.view-toggle-btn:hover {
    color: var(--proy-primary);
    background: var(--proy-primary-light);
}

.view-toggle-btn.active {
    color: var(--proy-primary);
    background: var(--proy-primary-light);
}

/* ==================== Dropdown ==================== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border: 1.5px solid var(--proy-border);
    border-radius: 10px;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 200;
    overflow: hidden;
    animation: fadeIn 0.15s ease-out;
    display: none;
}

.dropdown-menu.open {
    display: block;
}

.dropdown-item {
    padding: 9px 14px;
    font-size: 13px;
    cursor: pointer;
    color: var(--proy-text-2);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.1s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.dropdown-item:hover {
    background: #f4f4f5;
    color: var(--proy-text);
}

.dropdown-item.danger {
    color: var(--proy-danger);
}

.dropdown-item.danger:hover {
    background: #fef2f2;
}

.dropdown-divider {
    height: 1px;
    background: var(--proy-border);
    margin: 4px 0;
}

/* ==================== Animations ==================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .card-detail {
        grid-template-columns: 1fr;
    }

    .kanban-board {
        flex-direction: column;
        overflow-x: visible;
        min-height: unset;
    }

    .kanban-column {
        flex: none;
        width: 100%;
        max-width: none;
        max-height: none;
    }

    .kanban-add-column {
        width: 100%;
        flex: none;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .toolbar-right {
        width: 100%;
        justify-content: flex-end;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-box {
        max-width: 100%;
        border-radius: 12px;
    }

    .proy-main {
        padding-top: 68px;
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (max-width: 480px) {
    .category-chips {
        gap: 6px;
    }

    .category-chip {
        font-size: 12px;
        padding: 5px 12px;
    }

    .btn-primary,
    .btn-outline {
        font-size: 13px;
        padding: 7px 12px;
    }
}

/* ==================== Print styles ==================== */
@media print {
    .kanban-board {
        overflow: visible;
        flex-wrap: wrap;
    }

    .kanban-column {
        max-height: none;
        page-break-inside: avoid;
    }
}
