:root {
    --primary: #006491; /* Domino's Blue */
    --secondary: #E31837; /* Domino's Red */
    --bg: #eef2f5;
    --card-bg: #ffffff;
    --text: #1a202c;
    --text-light: #718096;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: radial-gradient(circle at top center, #ffffff 0%, var(--bg) 100%);
    color: var(--text);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    z-index: 10;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 900;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--secondary);
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 100, 145, 0.2);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #004d73;
    transform: translateY(-2px);
}

.btn-action-out {
    background: linear-gradient(135deg, #E31837 0%, #c5142e 100%);
    color: white;
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    margin-top: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(227, 24, 55, 0.25);
}
.btn-action-out:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(227, 24, 55, 0.4);
}
.btn-action-out:active {
    transform: translateY(0);
}

.btn-action-in {
    background: linear-gradient(135deg, #006491 0%, #004d73 100%);
    color: white;
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    margin-top: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 100, 145, 0.25);
}
.btn-action-in:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 100, 145, 0.4);
}
.btn-action-in:active {
    transform: translateY(0);
}

.board {
    display: flex;
    flex: 1;
    gap: 1.5rem;
    padding: 1.5rem;
    overflow: hidden;
    min-height: 0;
}

.column {
    flex: 1;
    background: var(--card-bg);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    min-height: 0;
}

.column-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 3px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.header-title h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.inside-column .column-header {
    border-bottom-color: var(--secondary);
}

.inside-column .header-title svg {
    color: var(--secondary);
}

.outside-column .column-header {
    border-bottom-color: var(--primary);
}

.outside-column .header-title svg {
    color: var(--primary);
}

.count {
    background: var(--text);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1.1rem;
}

.courier-list {
    flex: 1;
    overflow-y: auto;
    padding: 1.2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-height: 0;
}

/* Scrollbar */
.courier-list::-webkit-scrollbar {
    width: 6px;
}
.courier-list::-webkit-scrollbar-track {
    background: transparent;
}
.courier-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Card */
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.card:hover {
    box-shadow: 0 12px 20px rgba(0,0,0,0.06);
    border-color: #cbd5e1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.courier-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

.card.rank-1 {
    border: 2px solid var(--secondary);
    background: #fffafa;
    animation: pulseBorder 2.5s infinite, slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pulseBorder {
    0% { box-shadow: 0 0 0 0 rgba(227, 24, 55, 0.3); }
    70% { box-shadow: 0 0 0 8px rgba(227, 24, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(227, 24, 55, 0); }
}

.card.rank-1 .avatar {
    background: var(--secondary);
    color: white;
}

.card.rank-1::before {
    content: "SIRADA İLK";
    position: absolute;
    top: 8px;
    right: -32px;
    background: var(--secondary);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 35px;
    transform: rotate(45deg);
    letter-spacing: 1px;
}

.rank-badge {
    font-size: 1.4rem;
    font-weight: 900;
    color: #e2e8f0;
}

.card.rank-1 .rank-badge {
    color: rgba(227, 24, 55, 0.2);
}

.name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.time {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #f1f5f9;
    border: none;
    color: #94a3b8;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    line-height: 1;
    z-index: 5;
}
.delete-btn:hover {
    background: #fee2e2;
    color: var(--secondary);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(6px);
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 450px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.show .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 1.8rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.4rem;
    color: var(--text);
}

.close-btn {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #e2e8f0;
    color: var(--text);
}

.modal-body {
    padding: 1.8rem;
}

.modal-body input {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.2s;
    background: #f8fafc;
}

.modal-body input:focus {
    border-color: var(--primary);
    background: white;
}

.error-msg {
    color: var(--secondary);
    font-size: 0.95rem;
    margin-top: 10px;
    min-height: 1.2em;
    font-weight: 500;
}

.modal-footer {
    padding: 1.5rem 1.8rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    background: #f8fafc;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Utility Classes for Extracted Inline Styles */
.header-actions {
    display: flex;
    gap: 15px;
}

.btn-logs {
    background: transparent;
    border: 2px solid var(--text-light);
    color: var(--text-light);
    padding: 0.6rem 1.2rem;
}
.btn-logs:hover {
    background: var(--text-light);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(113, 128, 150, 0.2);
}

.btn-dark {
    background: var(--text);
    color: white;
}
.btn-dark:hover {
    background: #2d3748;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 32, 44, 0.2);
}

.btn-danger {
    border-color: var(--secondary);
    color: var(--secondary);
}
.btn-danger:hover {
    background: var(--secondary);
    color: white;
    box-shadow: 0 4px 12px rgba(227, 24, 55, 0.2);
}

.btn-icon {
    vertical-align: text-bottom;
    margin-right: 5px;
}

.text-center {
    text-align: center;
}

.modal-text {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: var(--text);
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.flex-1 {
    flex: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .board {
        flex-direction: column;
        overflow: auto;
    }
    .column {
        flex: none;
        height: auto;
        min-height: 400px;
    }
    .courier-list {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    body {
        height: auto;
        overflow: auto;
    }

    .header {
        flex-direction: column;
        padding: 1.2rem 1rem;
        gap: 15px;
    }

    .logo h1 {
        font-size: 1.6rem;
        text-align: center;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-actions .btn {
        flex: 1 1 calc(50% - 5px);
        padding: 0.8rem 0.5rem;
        font-size: 0.95rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .header-actions #addCourierBtn {
        flex: 1 1 100%;
    }

    .board {
        padding: 1rem;
        gap: 1.5rem;
        overflow: visible;
    }

    .column {
        min-height: 0;
        overflow: visible;
        border-radius: 15px;
    }

    .courier-list {
        overflow-y: visible;
        padding: 1rem;
        gap: 1rem;
    }

    .column-header {
        padding: 1.2rem 1rem;
    }

    .card {
        padding: 1.2rem;
    }

    .courier-info {
        gap: 12px;
    }

    .avatar {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .name {
        font-size: 1.2rem;
    }

    .card.rank-1::before {
        top: 10px;
        right: -35px;
        padding: 3px 35px;
        font-size: 0.65rem;
    }

    .btn-action-in, .btn-action-out {
        padding: 1rem;
        font-size: 1.1rem;
    }

    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }

    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .modal-buttons .btn {
        width: 100%;
    }
}
