* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff9900;
    --primary-dark: #e68a00;
    --primary-light: #ffaa22;
    --bg-dark: #0a0e14;
    --bg-medium: #1a1f2e;
    --bg-light: #252b3d;
    --text-primary: #ffffff;
    --text-secondary: #b8c1d9;
    --text-muted: #6b7a99;
    --border: rgba(255, 153, 0, 0.15);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
    --glow: 0 0 24px rgba(255, 153, 0, 0.3);
}

body {
    background: linear-gradient(135deg, #0a0e14 0%, #1a1f2e 100%);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    overflow: hidden;
}

.admin-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ============================================
   HEADER
============================================ */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.95) 0%, rgba(15, 19, 24, 0.95) 100%);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-btn {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 153, 0, 0.05);
}

.back-btn:hover {
    background: var(--primary);
    color: var(--bg-dark);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

.header-logo {
    height: 32px;
    width: auto;
    filter: drop-shadow(0 0 12px rgba(255, 153, 0, 0.4));
}

.admin-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    position: relative;
}

.admin-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.admin-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    background: rgba(255, 153, 0, 0.05);
    border-radius: 10px;
}

.admin-nav-links .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 20px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.admin-nav-links .nav-link:hover {
    background: rgba(255, 153, 0, 0.1);
    color: var(--primary);
    transform: translateY(-2px);
}

.admin-nav-links .nav-link.active {
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.2), rgba(255, 153, 0, 0.1));
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 16px rgba(255, 153, 0, 0.2);
}

.admin-nav-links .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.create-task-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--bg-dark);
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.25);
}

.create-task-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.4);
}

.create-task-btn:active {
    transform: translateY(0);
}

/* ============================================
   KANBAN BOARD
============================================ */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 24px;
    flex: 1;
    overflow: auto;
    background: url('data:image/svg+xml,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><rect width="40" height="40" fill="%231a1f2e" fill-opacity="0.1"/><path d="M0 40L40 0ZM0 0L40 40Z" stroke="%23ff9900" stroke-opacity="0.02" stroke-width="1"/></svg>');
}

.kanban-column {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.4), rgba(15, 19, 24, 0.6));
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    min-height: 400px;
    max-height: calc(100vh - 140px);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.kanban-column:hover {
    border-color: rgba(255, 153, 0, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.8), rgba(15, 19, 24, 0.9));
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.column-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3;
}

.column-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-count {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--bg-dark);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    min-width: 32px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
}

.column-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================
   TASK CARDS - MODERN DESIGN
============================================ */
.task-card {
    background: linear-gradient(135deg, rgba(37, 43, 61, 0.9), rgba(26, 31, 46, 0.9));
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 16px;
    cursor: move;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 153, 0, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.25s;
}

.task-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(255, 153, 0, 0.15), 0 0 0 1px rgba(255, 153, 0, 0.1);
    transform: translateY(-4px);
}

.task-card:hover::before {
    opacity: 1;
}

.task-card.dragging {
    opacity: 0.6;
    transform: scale(0.95);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

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

.task-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    line-height: 1.5;
    word-break: break-word;
}

.task-priority {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.task-priority.low {
    background: linear-gradient(135deg, rgba(107, 122, 153, 0.3), rgba(107, 122, 153, 0.2));
    color: #8896b3;
    border: 1px solid rgba(107, 122, 153, 0.3);
}

.task-priority.medium {
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.3), rgba(66, 153, 225, 0.2));
    color: #63b3ed;
    border: 1px solid rgba(66, 153, 225, 0.3);
}

.task-priority.high {
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.3), rgba(255, 153, 0, 0.2));
    color: var(--primary);
    border: 1px solid rgba(255, 153, 0, 0.3);
}

.task-priority.urgent {
    background: linear-gradient(135deg, rgba(252, 129, 129, 0.3), rgba(252, 129, 129, 0.2));
    color: #fc8181;
    border: 1px solid rgba(252, 129, 129, 0.3);
    animation: pulse-urgent 2s ease-in-out infinite;
}

@keyframes pulse-urgent {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(252, 129, 129, 0.2);
    }
    50% {
        box-shadow: 0 2px 12px rgba(252, 129, 129, 0.4);
    }
}

.task-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 153, 0, 0.1);
    font-size: 12px;
}

.task-assigned {
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-due {
    color: #fc8181;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.task-tag {
    background: rgba(255, 153, 0, 0.15);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(255, 153, 0, 0.2);
    transition: all 0.2s;
}

.task-tag:hover {
    background: rgba(255, 153, 0, 0.25);
    border-color: var(--primary);
}

/* ============================================
   MODAL - MODERN DESIGN
============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 20, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.25s ease-out;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a1f2e 0%, #0f1318 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.8), rgba(15, 19, 24, 0.9));
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.close-btn:hover {
    color: var(--primary);
    background: rgba(255, 153, 0, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 28px;
}

.field-group {
    margin-bottom: 20px;
}

.field-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.field-group input,
.field-group select,
.field-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(37, 43, 61, 0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(37, 43, 61, 0.9);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

.field-group textarea {
    resize: vertical;
    min-height: 100px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ============================================
   BUTTONS
============================================ */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    letter-spacing: 0.5px;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.save-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--bg-dark);
    flex: 1;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.25);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.4);
}

.delete-btn {
    background: linear-gradient(135deg, #fc8181, #f56565);
    color: #fff;
    box-shadow: 0 4px 12px rgba(252, 129, 129, 0.25);
}

.delete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 129, 129, 0.4);
}

.cancel-btn {
    background: rgba(107, 122, 153, 0.2);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.cancel-btn:hover {
    background: rgba(107, 122, 153, 0.3);
    border-color: var(--text-muted);
}

/* ============================================
   DRAG & DROP
============================================ */
.column-body.drag-over {
    background: rgba(255, 153, 0, 0.08);
    border: 2px dashed var(--primary);
    border-radius: 12px;
}

/* ============================================
   SCROLLBAR
============================================ */
.column-body::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.column-body::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: rgba(26, 31, 46, 0.3);
    border-radius: 4px;
}

.column-body::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 4px;
}

.column-body::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1400px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .header-left,
    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .kanban-board {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .admin-nav-links {
        order: 1;
    }

    .create-task-btn {
        width: 100%;
    }
}

/* ============================================
   EMPTY STATE
============================================ */
.column-body:empty::after {
    content: 'Drop tasks here';
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.5;
}
