.admin-bar {
    background: #fff;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.login-form {
    display: flex;
    gap: 0.5rem;
}

.admin-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .login-form {
        flex-direction: column;
        width: 100%;
    }
    .login-form input, .login-form button {
        width: 100%;
    }
    .admin-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-controls {
        flex-direction: column;
        gap: 1rem;
    }
    .admin-status {
        width: 100%;
        text-align: center;
        order: 1;
    }
    .admin-buttons {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        order: 2;
    }
    .admin-buttons > *:nth-child(1) { grid-column: 1 / 2; width: 100%; }
    .admin-buttons > *:nth-child(2) { grid-column: 2 / 3; width: 100%; }
    .admin-buttons > *:nth-child(3) { grid-column: 1 / 3; width: 100%; }
    .admin-buttons > *:nth-child(4) { grid-column: 1 / 3; width: 100%; display: flex; justify-content: center; align-items: center; text-decoration: none; }
    
    .admin-buttons .btn {
        width: 100%;
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

.login-form input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-primary { background: var(--primary-color); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }

.table-container {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

/* Modern Status Badges & Styled Selects */
.status-badge, .cell-editor-styled {
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid transparent;
}

.notes-input {
    width: 100%;
    min-width: 100px;
    padding: 0.4rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
}

.btn-info { background: #6366f1; color: white; }
.btn-warning { background: #f59e0b; color: white; }

.table-container table tbody {
    user-select: none;
}

.copyable-name {
    cursor: copy;
    transition: color 0.2s;
    position: relative;
    user-select: none;
}

th {
    background: #f1f5f9;
    font-weight: 600;
    white-space: nowrap;
}

/* Modern Status Badges & Styled Selects */
.status-badge, .cell-editor-styled {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid transparent;
}

select.cell-editor-styled {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
}

/* Color logic for both badges and selects */
.status-göndermedi, select.status-göndermedi { background: #fee2e2; color: #dc2626; border-color: #fecaca; }
.status-gönderdi, select.status-gönderdi { background: #e0f2fe; color: #0284c7; border-color: #bae6fd; }
.status-tamamlandı, select.status-tamamlandı { background: #dcfce7; color: #16a34a; border-color: #bbf7d0; }
.status-eksik, select.status-eksik { background: #fef3c7; color: #d97706; border-color: #fde68a; }
.status-none, select.status-none { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }

.copyable-name {
    cursor: copy;
    transition: color 0.2s;
    position: relative;
}

.copyable-name:hover {
    color: var(--primary-color);
}

.copyable-name:active {
    color: var(--primary-hover);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

h4 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

body.dragging-active {
    user-select: none;
}

.dragging {
    opacity: 0.5;
    background: #e2e8f0 !important;
}

.drag-handle:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

.drag-handle:active {
    cursor: grabbing;
}
.drag-over-row {
    border-top: 3px solid var(--primary-color) !important;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

h4 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}



/* Group Labels */
.group-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 4px;
    display: inline-block;
}

/* Larger Delete Icon */
.col-delete-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: bold;
    line-height: 1;
    padding: 0 5px;
    transition: transform 0.2s;
}

.col-delete-btn:hover {
    transform: scale(1.2);
}

.notes-input {
    width: 100%;
    min-width: 150px;
    padding: 0.4rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
}


.editable-cell select, .editable-cell input {
    width: 100%;
    padding: 0.25rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.editable-cell select:focus, .editable-cell input:focus {
    border-color: var(--primary-color);
    outline: none;
    background: #f8fafc;
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
    white-space: nowrap;
    width: 1px; /* Shrink to fit content */
}

.table-container {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    table-layout: auto;
}

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    width: 100%;
    max-width: 400px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
}
